My undergraduate thesis: Analysis of the characteristics of China’s national debt yield curve and macroeconomic variables
Abstract
Treasury yield curve describes the yield of Treasury bonds with different maturities and the relationship between them. It is generally believed that in an effective financial market, the Treasury yield curve contains abundant economic information, which is of great significance to both micro-economic and macro-economic. In this article, through Nelson-Siegel-Svensson model, China and the United States
Treasuries yield curve structures were estimated, and then were showed by the three-dimensional figure.
Compared the descriptive statistics relative to the United States, China’s inter-bank bond yield curve short term interest rate fluctuation is bigger, and more discrete, medium and long-term yield spreads are much smaller than in the us. After that, principal component analysis was carried out, and it was clear that horizontal factor, slope factor and curvature factor were the main influencing factors of yield curve characteristics, and the relationship between principal component and macroeconomic variables was
further explored. The level factor contains the inflation information, the slope factor can reflect the market
participant’s confidence and the anticipated change, the yield curve characteristic reflects quicker than the
money supply response to the monetary policy. Finally, the characteristics of the bond yield curve are
recognized. This paper believes that only by enriching the bond varieties and stimulating the vitality of
the bond market, can the bond market further play the role of interest rate discovery.
presentation
thesis
Some work details
This repo contains codes for my undergraduate thesis.
I found that there are some NS/NSS model implementation in python/R/matlab. Some models rate and maturity, some like QuantLib allows users model price and maturity. The jupyter notebook and R markdown will make it easier for a naive user to learn to run and use the model.
There are some requirements like Quantlib and fbonds package. Although not listed together, you can find the instruction of how to install them.
Some other analysis including PCA and a 3D+contour plot. You can also find the plot settings in figure_template.py quite useful.
Some codes are not the final version cause I wrote some codes in my girl friend’s mac. All the codes can be run by a simple beginner :-D
NS/NSS model optimization
we have fbonds in R and quantlib in python taking both rate and price as input to estimate term structure.
- Term structure optimized by fbonds in R. Using rate as input
PCA analysis
- Loadings of PCA
- PCA ind arrow plot
- screen plot
Visualization
- PCA year/month plot
- tSNE-plot
- 3D plot
- rate distribution