For each weekday from Jan 18th, 2021, February 1st, 2021 (inclusive, 2 weeks worth, 10 days), collect all historical close prices for the 32 Canadian Government Bonds which have a maturity less than 10 years from January 18th, 2021 on the Frankfurt Exchange; I.e., all bonds listed via the following two links:
&bondtype=2%2c3%2c4%2c16&coupon=¤cy=184&rating=&country=19
&bondtype=2%2c3%2c4%2c16&coupon=¤cy=184&rating=&country=19
The data surrounding the 32 bonds found on the above two links will be used for calculating the yield curve (ytm curve), spot curve, and forward curve. Please familiarize yourself with these definitions, as per the links, as those will be the definitions used for this assignment.
For each bond, you will also need to collect the following information: coupon, ISIN, issue date, maturity date. All this data is available on the Snapshot page before clicking through to the Historical page.
This assignment is split into 2 parts, the first asks questions about some fundamentals of fixed income and mathematical finance. The second will be an empirical exercise in generating yield curves, and in particular the 1, 2, 3, 4 and 5 year rates, and analyzing these rates through PCA.
1.2 Expectations
- You may use R, Python, or any programming language (no Excel without approval from TA beforehand) of your choice to answer the empirical questions.
- Please have your final report typeset using LATEXand the following template: template. The website:
www.overleaf.com is particularly useful.
- Important/New: Your report must be no longer than 3 pages long in total (excluding references).
- Each of the fundamental questions must be answered in clear and coherent full sentences.
- At the end of your report you must cite all references and include a link to a GitHub repository with
all your code used for the project.
- You may, and are encouraged, to discuss how to do these questions with your peers. However, your write-up must be done individually, and the sharing of your write-up or code before the deadline is prohibited.
- A 5% penalty per day past the deadline up until 1 week (35%) will apply for late submissions.
Additional Notes: Marks will be awarded for each question as either full-, half-, or zero-marks according to if the question was answered with a few small mistakes, substantial mistakes but fundamental idea still correct, or fundamental idea wrong / no answer respectively. -10 marks (each) if expectations 2, 3, or 4 not adhered to. 2
2 Questions
2.1 Fundamental Questions
- (One sentence each.)
- Why do governments issue bonds and not simply print more money?
- Give a hypothetical example of why the long-term part of a yield curve might flatten.
- Explain what quantitative easing is and how the (US) Fed has employed this since the beginning of the COVID-19 pandemic.
- ) We asked you to pull data for 32 bonds, but if youd like to construct a yield a 0-5 year yield & spot curves, as the government of Canada issues all of its bonds with a semi-annual coupon, when bootstrapping youll only need 10 or 11 bonds to perform this task. Ideally, the bonds in any yield curve should be consistent in some way with one another so that yields are easier to compare. Select (list) 10 bonds that you will use to construct the aforementioned curves with an explanation of why you selected those 10 bonds based on the characteristics we asked you to collect for each bond (coupon, issue date, maturity date, etc.).
Note: 1) There is a unique ideal answer, 2) To easily refer to a bond, please use the following convention: CAN 2.5 Jun 24 refers to the Canadian Government bond with a maturity in June 24 and a coupon of 2.5.
- In a few plain English sentences, in general, if we have several stochastic processes for which each process represents a unique point along a stochastic curve (assume points/processes are evenly distributed along the curve), what do the eigenvalues and eigenvectors associated with the covariance matrix of those stochastic processes tell us?
(Hint: This is called Principal Component Analysis)
2.2 Empirical Questions
-
- First, calculate each of your 10 selected bonds yield (ytm). Then provide a welllabeled plot with a 5-year yield curve (ytm curve) corresponding to each day of data (Jan 2 to Jan 15) superimposed on-top of each other. You may use any interpolation technique you deem appropriate provided you include a reasonable explanation for the technique used.
- Write a pseudo-code (explanation of an algorithm) for how you would derive the spot curve with terms ranging from 1-5 years from your chosen bonds in part 2. (Please recall the day convention simplifications provided in part 2 as well.) Then provide a well-labeled plot with a 5-year spot curve corresponding to each day of data superimposed on-top of each other.
- Write a pseudo-code for how you would derive the 1-year forward curve with terms ranging from 2-5 years from your chosen bonds in part 2 (I.e., a curve with the first point being the 1yr-1yr forward rate and the last point being the 1yr-4yr rate). Then provide a well-labeled plot with a forward curve corresponding to each day of data superimposed on-top of each other.
- Calculate two covariance matrices for the time series of daily log-returns of yield, and forward rates (no spot rates). In other words, first calculate the covariance matrix of the random variables Xi, for i = 1,,5, where each random variable Xi has a time series Xi,j given by:
Xi,j = log(ri,j+1/ri,j), j = 1,,9
then do the same for the following forward rates the 1yr-1yr, 1yr-2yr, 1yr-3yr, 1yr-4yr.
- Calculate the eigenvalues and eigenvectors of both covariance matrices, and in one sentence, explain what the first (in terms of size) eigenvalue and its associated eigenvector imply.
Reviews
There are no reviews yet.