Quants are in the business of making helpful assumptions around modelling the characteristics of an asset. But when it comes to interest rates, many of those simplifying conventions tend to break down. That has prompted a growing number of quants to explore the use of machine-learning techniques to better predict the term structure of interest rates.
For instance, it is not uncommon to model stock price returns by assuming they are driven by a normal distribution and a volatility that is independent of the level of the stock. But movements in interest rates have been shown to depend heavily on the absolute level of rates at a given point in time. The behaviour of the curve when rates are low or very close to zero is different from the behaviour when rates are high. Second, rates come in varying tenors that are all dependent on each other – that is, they move together.
These dynamics are not necessarily captured well by existing methods such as principal component analysis (PCA), for instance.
PCA is a technique that tries to reduce a large set of variables describing a dataset by decomposing a covariance matrix of correlated variables into a set of uncorrelated ones, called principal components, wherein the first component explains most of the variance of the dataset. A linear combination of the components should give the full dynamics of the dataset.
For rates pricing, PCA has its limitations, says Alexei Kondratyev, a managing director in the data analytics group at Standard Chartered in London.
“When we produce a covariance matrix from the data set, effectively we are trying to encode a lot of information into a very small square matrix. It means, inevitably, we are going to lose a lot of useful information. The covariance matrix approach assumes everything is linear, normally distributed and stationary – which is not really the case in reality,” he says. “Even if the world is linear and normal, we still can have different periods; periods of small volatility, periods of large volatility.”
In this month’s technical, Curve dynamics with artificial neural networks, Kondratyev, proposes a non-parametric machine-learning algorithm that does not make any pre-specified assumptions about the movement of rates and can capture non-linear relationships in term structure dynamics.
The quant achieves this using artificial neural networks (ANN), which imitate the neural pathways found in the brain.
When we produce a covariance matrix from the data set, effectively we are trying to encode a lot of information into a very small square matrix. It means, inevitably, we are going to lose a lot of useful informationAlexei Kondratyev, Standard Chartered
ANN consists of networks that can learn how to behave based on data provided to it. So it can take in the input dataset – which is used to train the algorithm – and through many iterations of non-linear regressions, estimate the coefficients or variables that drive the rates. With each step, the network propagates the error between model output and actual output based on the data backwards so coefficients can be adjusted to better reflect actual dynamics.
“For example, the network can learn that if our curve was very steep and upward sloping, then it is likely the short end will move more than the far end and it is encoded in the value of coefficients. At the same time, if we face a situation where the curve is steep and downward-sloping, then it is reasonable for ANN to adjust coefficients in such a way that the curve is going to flatten over time, so there would be a strong pull to flatten term structure,” says Kondratyev.
One issue with this is overfitting, a problem many detractors of machine-learning techniques are quick to point out. When a machine learns from a given dataset, it is likely that any resulting model will fit the given dataset very well, but may be useless outside of that dataset.
The StanChart quant tries to fix this by applying a technique called regularisation, which assigns zero or very low values to some coefficients to limit their number – the larger the number, the greater the overfitting.
“We can force a lot of them to be zeros, which would effectively cut some connections in our network – our network will become simpler. Or instead of putting them exactly at zero we can at least force them to take smaller values,” says Kondratyev. “Effectively we try to make it less non-linear and slightly more linear.”
Validation results show the resulting model performs better than PCA – a properly trained ANN achieves lower overall error when tested against PCA on the validation dataset.
Interest rates dynamics have always been difficult for quants to model, especially because of idiosyncratic features that show up at specific levels of the curve. For instance, at low levels, rates tend to be sticky and less volatile. At higher levels they tend to be more volatile. Many traditional models also assume rates are always positive, which is no longer the case. In addition, any attempt to model rates at various tenors would have to align with a broader view on the shape of the yield curve.
Since the entry of machine-learning techniques into finance, some large banks have been privately exploring their scope in term structure modelling. Kondratyev’s paper throws some of that discussion into the open, and hopefully will start a more serious dialogue around leveraging the technique for complex modelling problems such as interest rate dynamics.
Editing by Tom Osborn
The week on Risk.net, August 4–10Receive this by email