The Vasicek model assumes that the short rate $y(t)$ evolves according to an Ornstein-Uhlenbeck process, capturing mean-reverting behavior. Its dynamics are given by: $ dy= \alpha(\bar y- y) \, dt + \sigma \,dB_t$ where: - $\alpha>0$ is the speed of the mean reversion. - $\bar y$ is the long-term mean (level) to which $y$ reverts. - $\sigma$ is the volatility, constant in the basic Vasicek model. - $B_t$ is a standard [[Brownian Motion]] (under some measure, which will be risk-neutral $\mathbb Q$ once we have adjusted the drift). ## Market Price of Risk To price interest-rate-dependent instruments, we often move from the real-world measure, to the risk-neutral measure $\mathbb Q$. This change in measure requires adjusting for the drift of $y(t)$ by the [[Bond Pricing One Factor Model#Market Price of Risk|Market Price of Risk]] $\eta$. A common assumption is that $\eta$ is either constant or linear in the short-rate $y$. $ \eta = c_0 +c_1 y$ Under the framework of a [[Bond Pricing One Factor Model]], the drift term in the PDE can be written generally as $f(t, y)$. From the definition, we have: $ \begin{align} f(t,y)&= b \eta -a \\ f(t,y)&=\sigma (c_0+c_1y)-\alpha (\bar y -y) \end{align} $ To simplify notation, we can change variables for $\alpha$ and $\bar y$: $ \alpha^\prime = \alpha+ \sigma c_1, \quad \bar y^\prime = \frac{1}{\alpha^\prime}(\alpha \bar y - \sigma c_0)$ Which leads to: $ \begin{align} f(t,y) &= \sigma c_0 + \sigma c_1y - \alpha \bar y + \alpha y \\ &=\sigma c_0 + y(\sigma c_1+ \alpha)- \alpha \bar y \\ &=y\alpha^\prime + \sigma c_0 - \alpha \bar y \\ &=y\alpha^\prime - \bar y^\prime \alpha^\prime \\ &=\alpha^\prime(y-\bar y) \\ -f(t,y) &=\alpha^\prime(\bar y-y) \end{align}$ >[!note:] >So under the risk-neutral measure $\mathbb Q$, the mean reversion speed becomes $\alpha^\prime$, and the long-term mean becomes $\bar y ^\prime$. ## Linking $f(t,y)$ and the Model Parameters In the [[Bond Pricing One Factor Model]] the PDE for a zero coupon bond $V(t,y)$ has the following form, where $f(t,y)$ is the drift term that depends on time and on the short-rate. $ \left(\frac{\partial V}{\partial t} + \frac{b^2}{2}\frac{\partial^2 V}{\partial y^2}-Vy\right) + \underbrace{\alpha^\prime (\bar y^\prime -y)}_{-f(t,y)}*\frac{\partial V}{\partial y}= 0 $ >[!note:] >Here $b=\sigma$ given the form of $dy$, where $\sigma$ is the pre-factor of $dB_t$. This PDE can be solved analytically for plain-vanilla zero-coupon bonds. We can calibrate $\alpha^\prime, \bar y^\prime$ and $\sigma$ directly to market data (i.e. bond yields) and solve the PDE for $V$. However, when pricing path-dependent derivatives, a Monte Carlo approach (simulating many paths of $y(t)$ is often necessary, which requires the integrated SDE form of $y(t)$. ## Integrating the Short-Rate SDE Recall the original Ornstein-Uhlenbeck–type SDE: $ dy= \alpha(\bar y- y) \, dt + \sigma \,dB_t$ Integrating $dy$ is not straight-forward as $y$ appears inside its own drift term. A standard approach for linear SDEs like this is the *exponential trick*, which involves a change of variable. ## Exponential Trick We introduce a new process $z(t)$ via: $ y(t) = F(t,z(t))= e^{-\alpha t} z(t)$ Since $y$ is a function of time $t$ and the stochastic variable $z$ we can apply [[Itô Processes and Itô's Lemma#Itô's Lemma for $F(t, X_t)$|Itô's Lemma]]. $ dy \equiv dF(t,z) = \frac{\partial F}{\partial t}dt+\frac{\partial F}{\partial z}dz+\frac{b^2}{2}\frac{\partial^2 F}{\partial z^2}dz$ The partial derivatives are as follows: $ \frac{\partial F}{\partial t} = - \alpha e^{-\alpha t} z, \quad \frac{\partial F}{\partial z} = e^{-\alpha t}, \quad \frac{\partial^2 F}{\partial z^2}= 0$ Hence we solve Itô's Lemma: $ dy=-\alpha e^{-\alpha t} z\, dt+e^{-\alpha t} \, dz$ No we can equate this with the original SDE: $ \begin{align} -\alpha e^{-\alpha t} z\, dt+e^{-\alpha t} \, dz &=\alpha(\bar y-y)dt + \sigma \, dB \tag{1}\\[2pt] -\alpha e^{-\alpha t} z\, dt+e^{-\alpha t} \, dz &= \alpha \bar y \,dt -\alpha e^{-\alpha t}z \,dt + \sigma \, dB \tag{2}\\[2pt] e^{-\alpha t} \, dz &= \alpha \bar y \,dt + \sigma \, dB \tag{3}\\[2pt] dz &= e^{\alpha t}(\alpha \bar y \,dt + \sigma \, dB) \tag{4} \end{align} $ where: - (2) Multiply out the right hand side $\alpha(\bar y -y) dt$. - (3) Recognize that the term $(-\alpha e^{-\alpha t}z\, dt)$ cancels out on both sides. - (4) Divide by $(e^{-\alpha t})$ which is the same as multiplying by $(e^{\alpha t})$. Thus, the *mean-reverting drift* $\alpha(\bar{y}-y)$ transforms into a *simpler drift* term $\alpha\bar{y}$​ for the $z$-process multiplied by the exponential factor $e^{\alpha t}$. $ \boxed{dz = e^{\alpha t}(\alpha \bar y \,dt + \sigma \, dB) \vphantom{\frac{1}{1}}}$ ## Integrating $z(t)$ and Recovering $y(t)$ We can now integrate $dz$ from $0$ to $t$: $ z(t) - z(0)=\int_0^t \alpha \bar y e^{\alpha s} \, ds + \sigma \int_0^t e^{\alpha s} dB_s$ The *first term* is a standard (deterministic) integral, where we can pull the constants $\alpha, \bar y$ out of the integral and integrate the exponential function. $ \int_0^t \alpha \bar y e^{\alpha s} ds= \alpha \bar y \int_0^t e^{\alpha s} ds=\alpha \bar y \left[\frac{1}{\alpha}e^{\alpha s} \right]_0^t =\alpha \bar y \left(\frac{1}{\alpha}e^{\alpha t}-\frac{1}{\alpha}\right) = \bar y(e^{\alpha t}-1)$ The *second term* is an Itô integral, which has a [[Gaussian Distribution|Normal Distribution]] with zero mean. Hence we can write the overall integral as: $ z(t) = z(0)+ \bar y ( e^{\alpha t}-1)+ \sigma \int_0^t e^{\alpha s} dB_s$ Since $y(t) = e^{-\alpha t}z(t)$, we can substitute $z(t) = e^{\alpha t} y(t)$. $ \begin{align} e^{\alpha t} y(t) &= e^{\alpha 0} y(0)+ \bar y e^{\alpha t}-\bar y+ \sigma \int_0^t e^{\alpha s} dB_s \\[2pt] y(t) &= y(0)\,e^{-\alpha t}+ \bar y -e^{-\alpha t}\bar y+ \sigma e^{-\alpha t} \int_0^t e^{\alpha s} dB_s \end{align}$ Finally we obtain the closed-form solution for $y(t)$. $ \boxed{y(t) = y(0)\,e^{-\alpha t}+ \bar y\left(1-e^{-\alpha t}\right)+ \sigma e^{-\alpha t} \int_0^t e^{\alpha s} dB_s \vphantom{\frac{\int}{\int}}}$