Fun with the Vasicek Interest Rate Model (2024)

[This article was first published on stotastic » R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

A common model used in the financial industry for modelling the short rate (think overnight rate, but actually an infinitesimally short amount of time) is the Vasicek model. Although it is unlikely to perfectly fit the yield curve, it has some nice properties that make it a good model to work with. The dynamics of the Vasicek model are describe below.

Fun with the Vasicek Interest Rate Model (1)

In this model, the parameters Fun with the Vasicek Interest Rate Model (2) are constants, and the random motion is generated by the Q measure Brownian motion Fun with the Vasicek Interest Rate Model (3). An important property of the Vasicek model is that the interest rate is mean reverting to Fun with the Vasicek Interest Rate Model (4), and the tendency to revert is controlled by Fun with the Vasicek Interest Rate Model (5). Also, this process is a diffusion process, hence Markovian, which will lead to some nice closed form formulas. Finally, the future value of the interest rate is normally distributed with the distribution Fun with the Vasicek Interest Rate Model (6).

To give you an idea of what this process looks like, I have generate some sample paths using the Euler discretization method.

One important things you will notice is that this process starts at 0.03, but is pulled towards 0.10, which is the value of Fun with the Vasicek Interest Rate Model (8). I’ve added dashed lines to highlight this, as well as lines for the expected value of the process and confidence bands representing two standard deviations. Also, you may notice the major problem with this process is that the interest rate can drop below 0%. In the real world, this shouldn’t happen. The Cox-Ross-Ingersoll model, or CIR model, actually corrects for this, but the process is no longer normally distributed. The following is the R code used to generate the chart above.

## Simulate Sample Paths #### define model parametersr0 <- 0.03theta <- 0.10k <- 0.3beta <- 0.03## simulate short rate pathsn <- 10 # MC simulation trialsT <- 10 # total timem <- 200 # subintervalsdt <- T/m # difference in time each subintervalr <- matrix(0,m+1,n) # matrix to hold short rate pathsr[1,] <- r0for(j in 1:n){ for(i in 2:(m+1)){ dr <- k*(theta-r[i-1,j])*dt + beta*sqrt(dt)*rnorm(1,0,1) r[i,j] <- r[i-1,j] + dr }} ## plot pathst <- seq(0, T, dt)rT.expected <- theta + (r0-theta)*exp(-k*t)rT.stdev <- sqrt( beta^2/(2*k)*(1-exp(-2*k*t)))matplot(t, r[,1:10], type="l", lty=1, main="Short Rate Paths", ylab="rt") abline(h=theta, col="red", lty=2)lines(t, rT.expected, lty=2) lines(t, rT.expected + 2*rT.stdev, lty=2) lines(t, rT.expected - 2*rT.stdev, lty=2) points(0,r0)

One can show that a zero coupon bond with a maturity at time T can be found by calculating the following expectation under the risk neutral measure Fun with the Vasicek Interest Rate Model (9) where the short rate process Fun with the Vasicek Interest Rate Model (10) can be pretty much any process. We could estimate this expectation using Monte Carlo simulation, but the Vasicek model allows us to calculate the value of the zero coupon bond by using the Markov property and PDE techniques. Using this method, we can price the bond by the following equations.

Fun with the Vasicek Interest Rate Model (11)

This closed form solution for a zero coupon bond makes our lives much easier since we don’t need to compute the expectation under the martingale measure to find the price of a bond. Additionally, it will allow us to easily calculate the yield curve implied by the model. If we note that Fun with the Vasicek Interest Rate Model (12) where Fun with the Vasicek Interest Rate Model (13) is the continuous time yield for a zero coupon bond with maturity T, then we can use our model estimate of the bond price to rearrange this formula and solve for the yield by Fun with the Vasicek Interest Rate Model (14). Finally, to demonstrate some of the possible curve shapes allowed by the Vasicek model, I produced the following chart. Notice that the yield curve can be both increasing or decreasing with maturity.

The following R code implements the closed form pricing function for a bond under the Vasicek model, and then uses the pricing function to generate the chart above.

## function to find ZCB price using Vasicek modelVasicekZCBprice <- function(r0, k, theta, beta, T){ b.vas <- (1/k)*(1-exp(-T*k)) a.vas <- (theta-beta^2/(2*k^2))*(T-b.vas)+(beta^2)/(4*k)*b.vas^2 return(exp(-a.vas-b.vas*r0))}## define model parameters for plotting yield curvestheta <- 0.10k <- 0.5beta <- 0.03r0 <- seq(0.00, 0.20, 0.05)n <- length(r0)yield <- matrix(0, 10, n)for(i in 1:n){ for(T in 1:10){ yield[T,i] <- -log(VasicekZCBprice(r0[i], k, theta, beta, T))/T }}maturity <- seq(1, 10, 1)matplot(maturity, yield, type="l", col="black", lty=1, main="Yield Curve Shapes")abline(h=theta, col="red", lty=2)

Just to make sure the bond pricing formula was implemented correctly, I compared the price using the formula versus the price using Monte Carlo simulation to estimate the expectation under the martingale measure. Below are the results and R code. Seems everything is in order, although the Euler discretization method seems to be causing some error in the Monte Carlo results.

Exact Vasicek Price: 0.9614MC Price: 0.9623MC Standard Error: 0.0005

## define model parametersr0 <- 0.03theta <- 0.10k <- 0.3beta <- 0.03## simulate short rate pathsn <- 1000 # MC simulation trialsT <- 1 # total timem <- 200 # subintervalsdt <- T/m # difference in time each subintervalr <- matrix(0,m+1,n) # matrix to hold short rate pathsr[1,] <- r0for(j in 1:n){ for(i in 2:(m+1)){ dr <- k*(theta-r[i-1,j])*dt + beta*sqrt(dt)*rnorm(1,0,1) r[i,j] <- r[i-1,j] + dr }} ## calculate Monte Carlo bond price and compare to Exact Vasicek solutionss <- colSums(r[2:(m+1),]*dt) # integral estimatec <- exp(-ss)estimate <- mean(c)stdErr <- sd(c)/sqrt(n)exact <- VasicekZCBprice(r0, k, theta, beta, T)cat('Exact Vasicek Price:', round(exact,4), 'n')cat('MC Price:', round(estimate,4), 'n')cat('MC Standard Error:', round(stdErr,4), 'n')

Related

To leave a comment for the author, please follow the link and comment on their blog: stotastic » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Fun with the Vasicek Interest Rate Model (2024)

FAQs

What is the Vasicek model of interest rates? ›

The Vasicek Interest Rate Model is a single-factor short-rate model that predicts where interest rates will end up at the end of a given period of time. It outlines an interest rate's evolution as a factor composed of market risk, time, and equilibrium value.

What are the advantages of Vasicek model? ›

Flexibility: One of the key advantages of the Vasicek Model is its flexibility in capturing interest rate movements. The model allows for the estimation of various parameters, such as the mean reversion speed and the volatility of interest rates, which can be adjusted to fit different market conditions.

What is the drawback of Vasicek model? ›

Limitations of the Vasicek Model

The volatility of the market (or market risk) is the only factor that affects interest rate changes in the Vasicek model. However, multiple factors may affect the interest rate in the real world, which makes the model less practical.

What is the Vasicek approach? ›

The Vasicek model relates the probability of default to the value of a factor. That factor can be considered a measure of the recent health of the economy. It uses the Gaussian copula model to define the correlation between defaults.

Is Vasicek model arbitrage free? ›

1 Answer. Short rate models are broadly divided into equilibrium models and no-arbitrage models. The models from Vasicek, Dothan and Cox, Ingersoll and Ross are examples of equilibrium short rate models. The models from Ho-Lee, Hull-White and Black-Karasinski are no-arbitrage models.

How does Vasicek model explain credit risk? ›

The Vasicek model uses three inputs to calculate the probability of default (PD) of an asset class. One input is the through-the-cycle PD (TTC_PD) specific for that class. Further inputs are a portfolio common factor, such as an economic index over the interval (0,T) given by S.

What are the applications of Vasicek model? ›

The Vasicek model can be used to estimate the expected return and risk of a bond or a bond portfolio under different assumptions of the interest rate process parameters, such as the mean, volatility, and speed of mean reversion.

What is the volatility of the Vasicek model? ›

In the Vasicek specification, volatility is independent of the level of the short rate as in equation (17.1) and is referred to as the normal model. In the normal model, it is possible for negative interest rates to be generated. In the Dothan specification, volatility is proportional to the short rate.

What is the advantage of the CIR model over the Vasicek model? ›

The CIR model is a linear mean reverting stochastic model, which avoids the possibility of negative interest rates experienced in the Vasicek model.

What is the difference between Hull White and Vasicek model? ›

The Hull-White model allows for a time-varying volatility of the short rate, while the Vasicek model assumes a constant volatility. This means that the Hull-White model can capture more complex dynamics of interest rate movements, such as mean reversion, stochastic volatility, and volatility smiles.

What is the Vasicek model for PD? ›

Vasicek's one-factor model is characterised by its ability to transform a PiT PD into TtC PD. The model estimates the state of the economy by using a correlation-dependent weight to the long-term average (TtC) PD and another correlation-dependent weight to a macroeconomic factor, specifically the default rate.

How to calibrate Vasicek? ›

The calibration is done by maximizing the likelihood of zero coupon bond log prices, using mean and covariance functions computed analytically, as well as likelihood derivatives with respect to the parameters. The maximization method used is the conjugate gradients.

What are the advantages of the Vasicek model? ›

Flexibility: One of the key advantages of the Vasicek Model is its flexibility in capturing interest rate movements. The model allows for the estimation of various parameters, such as the mean reversion speed and the volatility of interest rates, which can be adjusted to fit different market conditions.

What is the interest rate model Vasicek? ›

The Vasicek interest rate model is a widely useful mathematical model that describes the behavior of interest rates over time. It was proposed by Czech mathematician Oldřich Vašíček in 1977. It assumes that interest rates follow a mean-reverting process, meaning they tend to move towards a long-term average level.

What is the Vasicek technique? ›

Vasicek's Technique

If β1 is the average beta, across the sample of stocks, in the historical period, then the Vasicek technique involves taking a weighted average of β1, and the historic beta for security j.

What is volatility in interest rate model? ›

~ Interest Rate Volatility: The variance of changes in the level of the yield curve. level of interest rate volatility is. even more variable.

What is the Vasicek model of default? ›

This model states that a counterparty defaults because it cannot meet its obligations at a fixed assessment horizon, because the value of its assets is lower than its due amount. Basically it states that the value of assets serve to pay off debt. The value of a company's assets vary through time.

What is the Merton Vasicek approach? ›

The Vasicek approach is applied to the firms characterized by the same probability of default. In turn, the Vasicek-Merton approach requires not only the same probability of default, but additionally the same volatility of assets value.

What is the loanable funds model of the interest rate? ›

The loanable funds market illustrates the interaction of borrowers and savers in the economy. Borrowers demand loanable funds, and savers supply loanable funds. The market is in equilibrium when the real interest rate adjusts to the point that the amount of borrowing equals the amount of saving.

References

Top Articles
Latest Posts
Article information

Author: Mr. See Jast

Last Updated:

Views: 6009

Rating: 4.4 / 5 (55 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Mr. See Jast

Birthday: 1999-07-30

Address: 8409 Megan Mountain, New Mathew, MT 44997-8193

Phone: +5023589614038

Job: Chief Executive

Hobby: Leather crafting, Flag Football, Candle making, Flying, Poi, Gunsmithing, Swimming

Introduction: My name is Mr. See Jast, I am a open, jolly, gorgeous, courageous, inexpensive, friendly, homely person who loves writing and wants to share my knowledge and understanding with you.