Nelson-Siegel Yield Curve Model

(Yield curves are obtained by bootstrapping the interest rate information contained in a range of risk-free/ near risk-free fixed income instruments (deposit rate, LIBOR, FRA, interest rate futures, interest rates wap, OIS swap, government bond…).  Rather than treating each data point as separate, many are more interested in the term structure of the yield curve. Nelson-Siegel (and its extension Nelson-Seigel-Svensson) exponential components framework is one of the most popular yield curve models.  The forward rates are readily available once a Nelson-Siegel model is obtained.  As shown by Diebold & Li, the three time-varying components in Nelson-Siegel can be interpreted as factors corresponding to level, slope and curvature.   These factors have also been shown by Diebold & Li to have some forecasting power. We will go through the meaning of various components of Nelson-Siegelmodel, its implementation and other alternatives in yield curve modelling. ` Continue reading “Nelson-Siegel Yield Curve Model”

Nelson Siegel Model – Python Source Code

This program implements Nelson-Siegel and Nelson-Siegel-Svensson Yield Curve models.  Grid-based OLS is chosen as the parameter estimation algorithm.  Last update: change OLS to weighted OLS to improve model fitting performance.
  • Author: David Y
  • Date of release: 2019-11-13
  • Date of last update: 2019-12-01
  • Version: 1.1.0
  • License: BSD
  • Language: Python (tested in python 3.7.1)

click here to download

Pairs Trade – Practice

In the last post, we had reviewed some theory related to pairs trade.  In this post, we will go through a textbook case of arbitrage to show how various test-statistics should look like.  We also introduce the half-life of mean-reversion and the Hurst Exponent as performance indicators.  We then look into a possible implementation for mean-reversion strategy before discussing the real-world issue in pairs trade. 

Continue reading “Pairs Trade – Practice”

Pairs Trade – Theory

Pairs trade is one of the simplest market-neutral statistical arbitrage strategies.  The goal is to find a pair of securities which historically move up and down in highly correlated fashion but the price differential between them is temporarily at an extreme.  We then long the relatively cheap security and simultaneously short the other.  Hopefully, the price differential would promptly revert back to normal such that we can realise some profit.  We would review some useful statistical concept (such as co-integration, stationary process) and discuss the types of securities that are likely to form good trading pairs.   Continue reading “Pairs Trade – Theory”

Demystify the Volatility Cone

Volatility cone is a visualisation tool for the display of historical volatility term structure. It was introduced by Burghardt and Lane[1] in early 1990 and is popular in the option trading community. Using the same methodology, we can extend the use of such chart for periodic return data. I find these charts useful not only for options but also for the general market. Continue reading “Demystify the Volatility Cone”

One Factor Interest Rate Model – C# Source Code

I have looked into the analytics for callable bonds lately [1][2].   The involves the use of an interest rate tree.  I thus implemented the Hull-White and Black-Karasinski one-factor short rate trees illustrated in Hull’s Options, Futures and Other Derivatives 6th Ed.  Ch28.7.   I included procedures to calibrate the rates tree using the premium of interest rate cap.   Once a tree is generated, it can be used to price and calculate the OAS for callable bonds (both fixed and floating rate with flexible call schedule).

  • Author: David Y
  • Date of first release:2014-08-03
  • Version: 1.0.0
  • License: BSD
  • Language: C# (tested in VS Express 2013 for Desktop)
  • Model: Hull-White and Black-Karasinski one-factor short rate trees
  • Dependence: ALGLIB numeric library (for optimisation code)

Click Here to Download