Implementing HJM Model in Python
Implementing HJM Model in Python
1. Investors use HJM model to determine the price of securities which are affected by interest rate
fluctuations. By being able to price securities, investors can engage in arbitrage opportunities to
earn a riskless profit if there are differences between security price in the market and security
price based on HJM Model.
2. HJM Model can be used to price financial derivatives because the value of derivatives depends
on the term structure of underlying assets. For example, the underlying asset for credit
derivatives is the price of risky-zero coupon bonds.
3. It can be used in asset-liability management.
CAPLET
Caplets are interest rate options designed to cap the risk of rising interest. These options use an
interest rate, rather than a price, as basis for a strike. Caplets are shorter term (90 days) in
duration.
HJM CALIBRATION AND PRICING
We calibrate HJM Model with historical daily yield curve data over the last five years. The yield
curve structure contains 51 patterns ranging from 1 Month to 25 years. The principal component
analysis is used to identify common factors which are driving movements in rates. Typically, 3-5
factors are sufficient to explain dynamics of the yield curve. Once the volatility factors are
identified in historical data by PCA technique, cubic spline interpolation is used to fit these
factors. This interpolation is used to generate discrete mesh of tenors for the purpose of Monte
Carlo Simulation. Risk- Neutral Drift Function is calculated using numerical integration over fitted
volatility functions. We price an Interest Rate Caplet with strike 3% using Monte Carlo Simulation.