1. Introduction
The Heath-Jarrow-Morton (HJM) model has long served as a cornerstone for modeling the term structure of interest rates. However, its traditional application has focused on risk-neutral modeling, often neglecting the impact of macroeconomic shocks. In today’s volatile economic landscape, with the decline of forward guidance from major central banks, fluctuations in key macroeconomic indicators have become critical drivers of yield curve dynamics and forward rates.
As central banks become increasingly data-dependent, the unpredictability of macroeconomic shifts introduces heightened volatility into rate forecasts, necessitating adaptations to models that reflect these economic sensitivities.
In this article, we investigate how integrating macroeconomic shocks into the HJM framework can enhance rate predictions, offering valuable tools for national institutions to shape monetary policies and for financial institutions to price interest rate-sensitive derivatives.
Our objective is twofold: first, to explore the implementation and practical application of a theoretical and mathematical model; and second, to extend the model by incorporating additional macroeconomic information to improve precision. This project demonstrates how simple statistical and mathematical techniques can yield plausible predictive outcomes.
2. Theoretical Framework
Before proceeding with the implementation of the model, it is essential to provide an overview of the quantitative methods that form the building blocks of the framework.
2.1 Heath-Jarrow-Morton Model
The Heath-Jarrow-Morton (HJM) model focuses on modeling the evolution of the forward rate curve \( f(t, T) \) over time. The key objectives of the model are to ensure that:
- • The model is arbitrage-free, adhering to fundamental principles of financial markets.
- • The dynamics of \( f(t, T) \) align with observed market behavior, such as historical yield curve data.
- • The model supports pricing interest rate derivatives, including caps, floors, and swaptions.
The forward rate curve's evolution is inherently random and does not depend on past information. To describe its stochastic nature, we employ stochastic differential equations (SDEs) as a mathematical framework.
A stochastic process is a collection of random variables, often indexed by time t
. For every point in time t
, there is an associated random variable whose value is governed by probabilistic laws defined within the model. This is particularly suited for modeling financial systems where randomness and uncertainty are critical components.
On the other hand, a differential equation is a mathematical equation that relates a function to its derivatives. It is used to describe dynamic systems that evolve over time or space.
Applying SDEs to the Forward Rate Curve
To model the forward rate curve f(t, T)
, we define a stochastic differential equation that:
- • Represents the random fluctuations of the forward rates.
- • Reflects the probabilistic laws governing the market's interest rate dynamics.
- • Is consistent with observed market behaviors, such as yield curve trends.
By using the HJM framework and SDEs, we aim to describe how the forward rate curve evolves over time, ensuring the model is reliable for derivative pricing and risk management in financial markets.
Let us define a stochastic differential equation (SDE) to model the forward rate curve:
\[ df(t, T) = \mu(t, T) dt + \sigma(t, T) dW_t \]Where we define:
- • \( f(t, T) \): The instantaneous forward rate at time \( t \) for maturity \( T \).
- • \( \mu(t, T) \): The drift of the forward rate, representing the predictable part of its evolution.
- • \( \sigma(t, T) \): The volatility, encapsulating the random shocks affecting the forward rate.
- • \( W_t \): The Brownian motion, a random walk that introduces randomness to the forward rate evolution.
- • \( d_t \): A small time increment.
Understanding the SDE involves breaking it into two parts: the drift term, which reflects the expected evolution of the forward rate, and the volatility term, which captures the random fluctuations in the forward rate due to market uncertainty.
Now, thinking back to our objective, how do we manipulate the SDE to model the forward rate curve? Let us first revisit the assumptions of our model, specifically the no-arbitrage condition. To maintain a no-arbitrage condition, the price of a zero-coupon bond can be expressed as:
\[ Z(t, T) = \exp\left(-\int_t^T f(t, s) ds\right) \]Let:
\[ X_t = \int_t^T f(t,s) \, ds \]
Using Ito’s Lemma for our bond \( Z_{tT} = \exp(-X_t) \), we get:
\[ dZ_{tT} = -Z_{tT} \, dX_t + \frac{1}{2} Z_{tT} (dX_t)^2 \]
Differentiating \( X_t \) with respect to time \( t \), we have:
\[ dX_t = -f(t,t) \, dt - \int_t^T \frac{\partial f(t,s)}{\partial t} \, ds \]
Ignoring stochastic volatility over small time intervals we know that:
\[ \frac{\partial f(t,s)}{\partial t} \approx \mu(t,s) \]
Substituting \( \mu(t,s) \) and \( \sigma(t,s) \) into \( dX_t \):
\[ dX_t = -f(t,t) \, dt - \left(\int_t^T \mu(t,s) \, ds\right) dt - \int_t^T \sigma(t,s) \, dW_t \]
And
\[ (dX_t)^2 = \left(-f(t,t) \, dt - \left(\int_t^T \mu(t,s) \, ds\right) dt - \int_t^T \sigma(t,s) \, dW_t \right)^2 \]
Where after expanding, the deterministic terms cancel out as \( dt^2 \to 0 \) in stochastic calculus, so we are left with:
\[ -\int_t^T \sigma(t,s) \, dW_t \]
Finally, since \( W_t \) follows a Brownian motion, we have that \( dW_t \sim N(0,dt) \), it follows a normal distribution with variance \( dt \) and thus satisfies \( (dW_t)^2 = dt \). From this we have:
\[ \left(\int_t^T \sigma(t,s) \, dW_t \right)^2 \approx \left(\int_t^T \sigma(t,s) \, ds\right)^2 \, dt \]
Bringing the two last steps together we get that:
\[ (dX_t)^2 = \left(\int_t^T \sigma(t,s) \, ds\right)^2 \, dt \]
Now substituting \( dX_t \) and \( (dX_t)^2 \) into \( dZ_{tT} \) we got from Ito’s Lemma:
\[ dZ_{tT} = -Z_{tT} \, dX_t + \frac{1}{2} Z_{tT} \, (dX_t)^2 \]
Becomes:
\[ dZ_{tT} = Z_{tT} \left(f(t,t) \, dt + \int_t^T \mu(t,s) \, ds \, dt\right) + \int_t^T \sigma(t,s) \, dW_t - \frac{1}{2} Z_{tT} \left(\int_t^T \sigma(t,s) \, ds\right)^2 \, dt \]
We have developed an accurate representation of the \( Z_{tT} \), the bond price.
To keep a no arbitrage condition, we must have that our bond price grows on average at the risk-free rate \( r(t) \), this means the dynamics of \( Z_{tT} \) must satisfy the following:
\[ dZ_{tT} = -r(t) Z_{tT} \, dt \]
This is a big implication as it tells us that the deterministic terms of the drift (the terms proportional to \( dt \)) in the dynamics of \( Z_{tT} \) must match \( =-r(t) Z_{tT} \, dt \). On the other hand, we leave aside the stochastic term as it does not affect the no arbitrage condition.
As follows, the terms of the drift proportional to \( dt \) (left side of the equation) must be equal to the short rate (left side of equation):
\[ f(t,t) + \int_t^T \mu(t,s) \, ds - \frac{1}{2} \left(\int_t^T \sigma(t,s) \, ds\right)^2 = f(t,t) \]
Rearranging,
\[ \int_t^T \mu(t,s) \, ds = \frac{1}{2} \left(\int_t^T \sigma(t,s) \, ds\right)^2 \]
Differentiating on both sides we get that,
\[ \mu(t,T) = \sigma(t,T) \int_t^T \sigma(t,s) \, ds \]
We have developed an accurate representation of the \( Z_{tT} \), the bond price.
To keep a no arbitrage condition, we must have that our bond price grows on average at the risk-free rate \( r(t) \), this means the dynamics of \( Z_{tT} \) must satisfy the following:
\[ dZ_{tT} = -r(t) Z_{tT} \, dt \]
This is a big implication as it tells us that the deterministic terms of the drift (the terms proportional to \( dt \)) in the dynamics of \( Z_{tT} \) must match \( =-r(t) Z_{tT} \, dt \). On the other hand, we leave aside the stochastic term as it does not affect the no arbitrage condition.
As follows, the terms of the drift proportional to \( dt \) (left side of the equation) must be equal to the short rate (left side of equation):
\[ f(t,t) + \int_t^T \mu(t,s) \, ds - \frac{1}{2} \left(\int_t^T \sigma(t,s) \, ds\right)^2 = f(t,t) \]
Rearranging,
\[ \int_t^T \mu(t,s) \, ds = \frac{1}{2} \left(\int_t^T \sigma(t,s) \, ds\right)^2 \]
Differentiating on both sides we get that,
\[ \mu(t,T) = \sigma(t,T) \int_t^T \sigma(t,s) \, ds \]
By enforcing the no-arbitrage condition, which ensures that the bond price grows at the risk-free rate \( f(t,t) \) (the short rate), we have demonstrated that the drift term in the forward rate dynamics is entirely determined by the volatility structure. This relationship is critical for modeling the forward rate curve because it ties the drift to market-observed volatility, eliminating the need for arbitrary assumptions about the drift.
Later in this paper, we perform a Principal Component Analysis (PCA) to extract the dominant trends in historical volatility. Since the forward rate dynamics depend solely on the volatility, these extracted volatility factors enable us to accurately simulate the evolution of forward rates, ensuring consistency with observed market behavior and the no-arbitrage condition.
2.2 Macroeconomic Shocks
In the post-pandemic macroeconomic landscape, global economies have witnessed intensifying economic imbalances, which have prompted a significant change in central banks' approach to monetary policies. Shocks experienced by global supply chains, changes in demand, and persistent uncertainties have contributed to an environment in which inflation and economic growth have become highly volatile variables that are difficult to predict with traditional economic models.
Policy responses to these imbalances have marked a turning point in the work of central banks. Traditionally, many monetary policy institutions relied on “forward guidance” as a tool to guide market expectations. This framework involved a commitment by central banks to maintain low interest rates or follow certain monetary policy paths for extended periods, based on long-term economic forecasts. However, the flexibility required to respond to post-pandemic imbalances has led many of these institutions to reduce their reliance on this tool, making macroeconomic data more important than ever before.
Instead of relying on long-term commitments, central banks began to base their decisions on concrete, current macroeconomic data, adopting a more responsive, data-driven approach. This change in strategy was motivated by the need to respond quickly to unexpected fluctuations in inflation, which often exceeded analysts' forecasts during the post-crisis period. Inflationary measures were subject to rapid changes due to factors such as disruptions in supply chains and changes in consumption behaviour. The adoption of data-driven monetary policies has meant an increased focus on monitoring key indicators such as inflation rates, unemployment levels, industrial production and consumption data.
In a context of such importance of macroeconomic data, we decided to incorporate a component related to the latter to have an additional degree of explicability to what might turn out to be the most realistic scenarios of the forward curve trend. Specifically, we decided to incorporate 4 key variables: CPI, GDP, unemployment rate, and Non-Farm Payroll (NFP). Based on the federal reserve's meetings and reports, we think these 4 metrics provide a realistic picture of the state of the U.S. economy and are relevant data for the central bank's monetary policy decisions as well as market expectations.
Before proceeding with the description of the methodology for incorporating macro variables into the model, it is important to clarify what is meant by Macro Shock. A macro shock is intended as a piece of data that surprises market expectations to the upside or downside. The rationale behind it is due to the market's reaction to the macro shock, which tends to make the asset value align with the unexpected data.
In an environment characterized by uncertainty and difficulty in forecasting macroeconomic data trends, it is becoming increasingly complex to make accurate estimates of economic variables. This challenge stems mainly from the increasing volatility of data, which widens forecasting intervals and reduces the accuracy of forecasting models. As a result, reference market reactions increase in magnitude, with larger adjustments significantly affecting forward curve movements. These adjustments are taking on an increasingly important role in explaining market dynamics.
3. Model Description and Data
As explained above, two critical pieces of information are required to utilize the model: Volatility and Drift. The first step, therefore, is to acquire data from historical forward rates. Bloomberg is the only source capable of providing the large volume of data necessary for this analysis. For our study, we selected the Secured Overnight Financing Rate (SOFR), which is derived from swap contracts and reflects the cost of borrowing cash overnight collateralized by Treasury securities.
The available data spans two dimensions: the starting date of the contract and its duration (tenors). By visualizing the data in three dimensions, we can better understand the dataset on which our model was trained.
Date 0 corresponds to January 1, 2019, and the last date is January 1, 2024, providing us with five years of data points. Each color displayed represents a forward curve, while changes in color correspond to different starting dates of the swap contracts from which the data was extracted. By isolating a single starting date, the data can be more effectively visualized in two dimensions, as shown below.
Each color here represents a different tenor of the swap contract, indicating how long the contract will last. As mentioned earlier, the first element we aim to extract from our historical series is volatility. The mathematical technique used in this model is Principal Component Analysis (PCA).
Principal Component Analysis is a dimensionality reduction technique used to simplify large datasets by transforming them into uncorrelated variables, called Principal Components, which capture the most important information in the dataset by explaining its variance.
Since the shape of rate curves is critical in pricing bonds, derivatives, and swaps, PCA is particularly valuable as it helps identify patterns in the movement of the yield curve. In practice, the same components tend to emerge across different markets because interest rates are largely driven by a few fundamental forces. The most observed factors in the curve are Level, Slope, and Curvature.
- • Level: Refers to parallel shifts of the entire curve up or down, these are often related to central banks rates.
- • Slope: Is affected by short-term monetary policy or long-term economic growth, reflecting the steepness of the curve.
- • Curvature: Reflects how mid-term rates move relative to short and long-term rates, often influenced by market expectations regarding economic cycles (particularly inflation-related data).
Given that only a few macroeconomic factors influence the curve, isolating each factor individually can be particularly useful.
The first step of this analysis involves creating a matrix with different dates on one axis, representing when the curve was measured, and the tenors contained in the curve on the other axis. Next, the covariance matrix is computed. This matrix measures how much the futures vary together, helping to identify the sources of variance.
From this covariance matrix, we compute eigenvectors, which represent the directions of variance, and eigenvalues, which indicate the amount of variance captured along those directions. The eigenvectors are then sorted in descending order based on the eigenvalues, and the three most significant directions of variance become the three principal components.
The results then require further processing. First, the eigenvalues are squared to calculate the standard deviation associated with each component. To determine volatility, the matrix of standard deviations is multiplied by the matrix of principal components obtained earlier, resulting in a new matrix that represents volatility. This final matrix captures the time-varying impact of the principal components on the yield curve's volatility.
The volatility we have obtained is spiky and cannot be used to calculate accurate values across all maturities. Another step required in the process is polynomial interpolation, which helps produce a smooth volatility function that can later be used to extract drift. For the first component (level), we use a 0-degree polynomial because parallel shifts are consistent across tenors. For the second and third components, we use a 3-degree polynomial (cubic interpolation) as it provides flexibility while minimizing the risk of overfitting. This is how a three-degree polynomial models the volatility:
This method not only provides a smoothed estimate of volatility based on historical rates (allowing for drift calculation) but also reduces the impact of noise in the analyzed data. As demonstrated previously, drift is directly calculated from volatility, a process that ensures arbitrage-free conditions. For the HJM model to remain arbitrage-free, the following relationship must be satisfied:
The main measure that prevents the model from allowing arbitrage is adherence to the risk-neutral measure, where the expected return on any asset is adjusted for the risk-free rate. Any excess drift beyond volatility would create arbitrage opportunities. If the drift were not derived from volatility, it would imply inconsistencies in the pricing of different instruments, such as zero-coupon bonds and interest rate derivatives.
The results of our volatility construction are as follows:
To finally obtain the drift, we discretize the fitted volatility. The drift, expressed as m(t,T), is calculated using integration over the fitted volatility:
Once the drift is obtained, we perform a Monte Carlo simulation. This simulation is used to estimate the value of a random variable. In this model, it simulates the evolution of forward rates. The simulation generates a multitude of possible trajectories, sampled from a random distribution. In our case, we are using a normal distribution.
The precision of the Monte Carlo simulation improves as the number of iterations increases, because the average of the simulated outcomes converges to the expected value, which aligns with the spot curve on SOFR in our case. The randomness of the simulation, as explained above, comes from the Brownian motion, which in our simulation is represented by random increments sampled from a normal distribution. This result demonstrates what this model can achieve.
In this graph, given a point on the x-axis, the y-coordinates represent a point on the forward curve, and each color corresponds to a different tenor. A single simulation represents one possible outcome, and when combined with multiple simulations, it forms a forward curve distribution. The center of this distribution is the median, which corresponds to the spot curve.
This model, refined through continuous comparison with live market data and cross-parallel back testing across different markets, can serve as a useful tool for generating forward curves under normal economic conditions. Our objective in this article was to develop an expansion of the model by incorporating the impact of unexpected financial market news.
The curve we initially generated represents just one of the possible paths that the Wiener process can produce. Our next goal is to enhance this theoretical framework by implementing the capability to predict curve reactions to unexpected macroeconomic events.
3.1 Adding the Jump
The Black-Scholes equation, used to price derivatives in the market and originally developed by Fischer Black and Myron Scholes in 1973, was further improved in 1976 with the work of Robert Merton. What Merton noticed was that while the model was very precise under normal conditions, it produced inconsistent results when sporadic events occurred.
The key additions to the original pricing model were the Poisson process, the jump distribution, and the jump frequency. The Poisson process models the occurrence of jumps, where dQ=1 if a jump occurs and dQ=0 if nothing happens. The magnitude of the jump is often modeled as a lognormal distribution, and the third term accounts for the frequency of jumps, as captured by the following formula:
The main feature is the ability to price derivatives under extraordinary conditions such as Earning call surprises, M&A activities, lawsuits, or systemic shocks. These events are rare on equity markets and prices often vary influenced by a great multitude of factors each with his little (and hard to measure) impact on the price.
Our idea is to adapt this concept to the rates market, where the forces that play a major role are less in number and their impact can be measured with higher precision, as shown in the precedent PCA analysis.
Where \( J \sim N(\text{magnitude}, \sigma^2) \).
First, we must define what we see as a macroeconomic shock. There are plenty of events that can affect expectations on future rates but every few weeks, important key economic indicators that affect interest rates. The biggest influence is carried out by Inflation related data, the ones about the Labour Market and those about Business sentiment. The market creates expectation about this data, which poses the base of forward rates pricing. As we have seen in recent years, rapid and relevant changes happen when these data are not aligned with markets’ expectations.
What we wanted to achieve is being able to predict how the curve would change if we expected that one of these key indicators won’t be aligned with expectations.
The first step was to identify how shocks affected rates in the past and how sensible every tenor was to misalignments. The Macro indicators that we selected were Consumer Price Index, which measures the average change in prices paid by consumers for goods and services (inflation), the Nonfarm Payroll, which measures the change in number of employed people and finally the GDP Growth. An example of reaction that markets could experience is that if Consumer price Index is published way above expectations, inflation was higher than expected, therefore the market will price less cuts in the near future, bringing up the short end of the curve. Again, if the Nonfarm Payrolls came out higher than expected, this would be a signal of economic expansion above expectations and less cuts will be priced.
To find how markets systematically react to these surprises we performed a linear regression between daily change in SOFR, and the difference (expressed in percentage change) of the macro indicator from his expectations. Different results are obtained when comparing different tenors. For example, we already know that tenors close to 30 years track GDP growth more steadily, while shorter tenors are more linked to Federal rates.
The data the linear regression was performed with include the entirety of the dataset, therefore about 170 regressions were performed, finding each corresponding beta.
Given the few occurrences of large differences in expectations, some results were less relevant than other, but an extensive dataset was obtained.
Direction in reactions to an unexpected data is preserved thanks to beta being express with corresponding sign. For example, we expect Unemployment to move in opposite direction with rates. If unemployment is higher than expected, we are likely to see central banks cutting rates to protect the economy, therefore a move in the opposite direction on the futures. Betas found in the model reflected these relationships as market consistently moved in opposite direction in the past few years.
4. Results
5. Conclusion
The Monte Carlo simulation incorporates both the inherent randomness of macroeconomic data and its historical effects on interest rates, leveraging the HJM framework to capture the relationship between economic indicators and the yield curve. By comparing the baseline scenario with the simulated paths, users can evaluate potential changes in the curve, such as steepening or flattening, and measure sensitivity at both the short and long ends. The model also generates a probability distribution of possible outcomes, providing insight into the likelihood of different shifts in the curve. This enables market participants to effectively hedge risks based on the probability of various market movements.
Beyond scenario analysis, the model is an effective tool for stress testing, enabling the simulation of extreme macroeconomic shocks or deviations beyond historical norms. This feature helps assess how the yield curve might respond under adverse conditions, allowing market participants to evaluate portfolio resilience, identify vulnerabilities, and implement measures to manage tail risks in volatile environments. Moreover, the model’s capability to simulate future interest rate paths extends to the pricing of rate derivatives such as swaptions and interest rate swaps. By accurately reflecting the dynamics of the yield curve under different scenarios, the model provides a robust framework for valuing these instruments, capturing the stochastic behavior of rates and their sensitivity to macroeconomic shocks.
Written by: Giorgio Gusella, Giulio Losano, Edoardo Bini, Maxime Vallot