Data Analysis Model: Bond Volatility, Importance in Finance

Posted on Jan 23, 2020
The skills I demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.

LinkedInGitHubEmail | Data | Web App


Understanding the concept of volatility is incredibly important in finance. The term is analogous to risk and has a myriad of applications in quantitative finance. Volatility is used in options pricing, trading, and risk management; however, for our purposes, we will apply it to modeling bonds. 

A bond is a fixed income instrument that represents a loan made by an investor to a borrower (typically corporate or governmental). Bonds are used by companies, municipalities, states, and sovereign governments to finance projects and operations. Owners of bonds are debtholders, or creditors, of the issuer.


We will build a model to study the nature of volatility in the case of US government bond yields. These yields are published by the US Federal Reserve Data Releases. 


A yield curve is a line that plots yields of bonds with differing maturity dates. The bonds we will focus on consist of maturities ranging from 1-year to 30 years. Yields vary depending on maturity; however, yields of neighboring maturities are relatively closer to each other and also move together.

Visualizing the yields over time we see that the longer yields tend to be less volatile as opposed to the shorter yields. Setting the 1-year and 20-year maturities side by side allows us to examine the difference. The yields show similar but slightly different characteristics. The difference in characteristics can be the result of multiple factors such as the monetary policy of the FED or the fact that the investors might be different.

1-Year Maturity
20-Year Maturity

Upon closer observation, we examine the returns following each other have some unique properties. The direction of a return is mostly independent of the previous day's return. In other words, you don't know if the next day's return will be positive or negative just by looking at the time series. The magnitude of the return is similar to the previous day's return. This means if markets are calm today, we expect the same tomorrow. And during a volatile market investors should expect a similarly turbulent tomorrow.


A GARCH (Generalized AutoRegressive Conditional Heteroskedasticity) model is the most well known econometric tool to handle changing volatility in financial time series data. 

GARCH models can be used in the analysis of a number of different types of financial data, such as macroeconomic data, financial institutions typically use them to estimate the volatility of returns for stocks, bonds, and market indices. They use the resulting information to help determine pricing and judge which assets will potentially provide higher returns, as well as to forecast the returns of current investments to help in their asset allocation, hedging, risk management, and portfolio optimization decisions.


From the comparison of the 1-year and 20-year maturity above, we can see that the 1-year GARCH model shows a similar but more erratic behavior compared to the 20-year GARCH model. Not only does the 1-year model have greater volatility, but the volatility of its volatility is larger than the 20-year model. Below, we can analyze how the fitted GARCH model transformed the distribution. The blue distribution is before GARCH, the red is after GARCH and yellow is the the normal distribution.

1-Year Distribution
20-Year Distribution

The density plots help magnify two statistical facts of financial markets not mentioned yet i.e the unconditional (before GARCH) distribution of the yield differences has heavier tails than the normal distribution and the distribution of the yield differences adjusted by the GARCH model has lighter tails than the unconditional distribution, but they are still heavier than the normal distribution.

Although we see that the two distributions from the GARCH models are different from the normal distribution of the data, the tails, where the differences are the most profound, are hard to see. Using a Q-Q plot will help us focus in on the tails.


The quantile-quantile (q-q) plot is a graphical technique for determining if two data sets come from populations with a common distribution. With the help of the QQ plot we can quickly assess whether the distribution are normal.

1-Year QQ-Plot
20-Year QQ-Plot

In both cases we observe how the GARCH process has transformed the distribution. The tails of our "After GARCH (red)" distribution are closer to the normal (gray line) than the "Before GARCH (black)' distribution. The GARCH process has brought the residuals closer to the normal distribution. 


We fit a GARCH model to develop a better understanding of how bond volatility evolves over time and its effects on the probability distribution. By bringing the residuals closer to the normal, our distributions are now closely aligned to a normal distribution.

Conforming to a normal distribution allows us to make useful inferences. For example, we can be reasonably sure where its value will fall about 95% of the time. Without normally distributed variables, our inferences could be disastrously wrong. In the world of finance, the consequences of our inaccurate inferences can range from a few hundred to millions of dollars in losses. 

About Author

Leave a Comment

No comments found.

View Posts by Categories

Our Recent Popular Posts

View Posts by Tags

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI