9 Data Report on Yield Curve
You are tasked with preparing a data report on yield curves. The report should be prepared using R Markdown and must be a minimum of two pages long, containing both graphs and text.
Before you commence with the report, ensure you have completed the preparations detailed in Chapter 9.1. Your report should adhere to the guidelines set out in Chapter 9.2 and Chapter 9.3. Please submit your completed data report through the course website (Blackboard).
9.1 Preparations
As preparation for this assignment, please work through the following chapters of this book:
- Chapter 1: Software Overview
- Chapter 2: Software Installation
- Chapter 3: RStudio Interface
- Chapter 4: R Data Types and Structures
- Chapter 5: Importing Data in R
- Chapter 6: Downloading Data in R
- Chapter 7: Writing Reports with R Markdown
- Chapter 8: Learning R with DataCamp
In addition, complete the following courses on DataCamp as per the guidelines in Chapter 8:
9.2 Data Guidelines
Chapter 5.2 provides instruction on how to import yield curve data, as well as methods for visualizing and interpreting the data. For your report, plot both the most recent yield curve and the yield curve from your date of birth. If yield curve data is unavailable for your birth date (either due to being born prior to 1990 or on a non-trading day), use the data from the next available trading day.
Perform a comparative analysis of the yield curves from your birth date and the most recent one available. Leverage the insights provided in Chapter 5.2 to interpret the shapes of these yield curves. If the concept of yields and yield curves is new to you, consider conducting further online research. A good starting point for your research would be the U.S. Treasury website, from where you sourced your data.
9.3 R Markdown Guidelines
Your assignment is to write a data report on yield curves using R Markdown. If you need an introduction to R Markdown, you can refer to Chapter 7. Your final output, produced by knitting your R Markdown file, should be a professional, dynamic PDF document, following these standards:
- The final submission should be a PDF file. Submissions in R, R Markdown, or Microsoft Word formats will not be accepted.
- The PDF document should be directly generated from RStudio, not converted from another format such as a Microsoft Word file.
- Even though the report is dynamically generated using R chunks, the reader should not be aware of this. Hence, take care of the following:
- To prevent the display of R messages (e.g., Loading required package: xts), set
message = FALSE
andwarning = FALSE
as default options. See Chapter 7.4 for more details. - To avoid showing R code in the PDF file (e.g.,
PV <- FV / (1 + YTM)^4
), setecho = FALSE
as the default option. Further information is provided in Chapter 7.4. - Avoid the use of hash tags in your document (e.g., \(\#\# \ 123.45\)), which usually appear when you print numbers or tables directly from an R chunk. Instead, integrate numbers within the Markdown text as described in Chapter 7.5. And when it comes to printing tables, use the
kable
function, as explained in Chapter 7.7.
- To prevent the display of R messages (e.g., Loading required package: xts), set
- Every number, plot, and table must be accurately labeled and accompanied by a descriptive text.
- All sentences should be grammatically correct and complete, with no missing verbs or unfinished thoughts.
Please follow these guidelines closely to ensure your report is professional, understandable, and visually appealing, offering an insightful presentation of the yield curve data.