{"categories":["Fixed Income"],"contentHtml":"<h2>Continuing Adjustments</h2>\n<p>Timing and quanto adjustments, we also looked at nonstandard swaps, LIBOR for LES? Another kind of nonstandard swap is…</p>\n<h2>Constant Maturity Swaps (CMS)</h2>\n<p>The definition of a CMS is</p>\n<p><strong>an interest rate swap where the floating rate equals the swap rate for another reference swap for a certain life</strong></p>\n<p>If you want to write an example, here you can say</p>\n<p>floating payment on a CMS can be made every six months at rate equal to 5-year swap rate.</p>\n<p>The frequency of this CMS rate must be smaller than the reference rate. Usually the swap rate is equal to a previously observed swap rate.</p>\n<p>Furthermore, if we assume that we have reset dates \\(t_0, t_1, t_2 \\ldots\\)</p>\n<p>And payment dates: \\(t_1, t_2, t_3 \\ldots\\)</p>\n<p>We will also consider L = notional principal</p>\n<p>What is going to be the floating payment? At \\(t_{i+1}\\), this would be the</p>\n<p>swap rate \\(s_i\\) applied to the principal for a period \\(\\tau_i\\)</p>\n<p>$$\n\\tau_i L s_i\n$$</p>\n<p>where \\(\\tau_i = t_{i+1} - t_i\\)</p>\n<p>Now we have to do some adjustments. The convexity adjustment is, the frequency of these coupons is going to be the same as the bonds.</p>\n<p>We will also have to do a timing adjustment, a combination of these two. If you apply these to another currency, then we will also have a quanto adjustment.</p>\n<p>Let’s say \\(y_i\\) is the forward value of the swap rate.</p>\n<p>By using a convexity/timing adjustment.</p>\n<p>We can say the <strong>realized swap rate</strong> is assumed:</p>\n<p>$$\ny_i - \\frac{1}{2} y_i^2 \\sigma^2_{y_i} t_i \\frac{G_i''(y)}{G_i' (y)} - \\frac{y_i \\tau_i F_i\\rho_i \\sigma_{y,i} \\sigma_{F,i} t_i}{1 + \\bar{T}_i \\tau_i}\n$$</p>\n<p>where</p>\n<p>\\(\\sigma_{y, i}\\) is the volatility of the forward swap rate</p>\n<p>\\(F_i\\) is the current forward interest rate between \\(t_i\\) and \\(t_{i+1}\\)</p>\n<p>\\(\\sigma_{F, i}\\) is the volatility of the forward rate</p>\n<p>\\(G_i(x)\\) this is basically the price of a bond which pays at time i, the same amount as the reference swap.</p>\n<p>The forward rate will be implied by the “Kaplan?” prices.</p>\n<p>\\(\\rho_i\\) the correlation can be estimated from historical data.</p>\n<h3>Example</h3>\n<p>6 year CMS swap (life of swap is 6 years)</p>\n<p>5 year swap rate is received, fixed rate of 5% is paid on notional $100M</p>\n<p>exchange of payments is semiannual, on both 5-year underlying swap and on CMS swap.</p>\n<p>The exchange rate on the payment date is determined from the swap rate on the previous payment date.</p>\n<p>The term structure is flat at 5% per annum with semiannual compounding. (that’s where the timing adjustment comes in)</p>\n<p>The volatility of the options on five-year swaps have 15% IV (\\(\\sigma_{y, i}\\)) and in this simplified problem we’ll say caplets with 6 month tenor have a 20% IV. The correlation \\(\\rho_i\\) between each cap rate and each swap rate is 0.7</p>\n<p>The fixed rate \\(y_i\\) is 0.05. This is semiannual payment, so \\(\\tau_i = 0.5\\). Given volatility \\(\\sigma_{F, i} = 0.20\\). Then the forward rate is also \\(F_i = 0.05\\) from the term structure, and the correlation given is \\(\\rho_i = 0.7\\).</p>\n<p>Then what is the relevant function G in this case?</p>\n<p>We have the reference rate which is a 5 year swap rate, which has a semiannual payment.</p>\n<p>We can express this as a bond, so a sum of coupons. The 2.5M is the coupon payment (halved</p>\n<p>$$\nG_i(x) = \\sum_{i=1}^{10} \\frac{2.5}{1 + \\tfrac{x}{2})^i} + \\frac{100}{(1 + \\tfrac{x}{2})^10}\n$$</p>\n<p>Then the derivative is</p>\n<p>$$\nG_i'(y_i) = -437.603, G_i'' (y_i) = 2261.23\n$$</p>\n<p>Then the total convexity/timing adjustment is, \\(0.0001197t_i\\)</p>\n<p>We’re going to have different values, so for example the 5 year swap rate t = 4 should be assumed to be 5.0479% instead of 5%.</p>\n<p>Therefore the net cash flow at t = 4.5 should be 0.5 * 0.000479 * 100M.</p>\n<p>Then we can calculate for all these cash payments, the value of the CMS</p>\n<h2>Models of the Short Rate</h2>\n<p>There are different specifications of such models. The models presented so far in our previous discussions make the assumption that the probability distribution of variables (interest rates, bond prices, …) are log normally distributed. That allows us to use Black’s model.</p>\n<p>There are some issues with this kind of approach.</p>\n<ul>\n<li>These models do not provide a description on how the interest rates evolve in time, just the underlying distribution.</li>\n<li>Cannot be used to value American style options.</li>\n</ul>\n<p>In this lecture, we will discuss the <strong>“term structure model”</strong>. Such interest rate model will describe the evolution of all zero-coupon interest rates, a little more general.</p>\n<p>We will focus on some classical models.</p>\n<p>The behavior of the <strong>“short-rate”</strong> or instantaneous short rate. This rate is considered in a risk-neutral world. Basically, that means in a very short period of time, between t and \\(t + \\Delta t\\), investors earn \\(r(t) \\Delta t\\), the risk-free interest rate.</p>\n<p>For example, the dollar money market account is a security that is worth $1 at time 0 and earns the instantaneous risk-free rate r at any given time. This r may be stochastic.</p>\n<p>Furthermore, if g equals the money market account, then the process \\(dg = rg dt\\). Here we can see that the r the risk-free rate can be stochastic, so this will be the drift of g being stochastic, with volatility being 0.</p>\n<p>We saw last lecture that</p>\n<p>\\(\\frac{f}{g}\\) is a martingale in a world where the market price of risk is 0.</p>\n<p>Therefore the expected value is</p>\n<p>$$\nf_0 = g_0 \\hat{\\mathbb{E}}[\\frac{f_T}{g_T}]\n$$</p>\n<p>Then if you take g as the money market account, then by definition</p>\n<p>$$\ng_0 = 1\n$$</p>\n<p>And for \\(g_T\\)? You might expect the e^rt general, but because this is stochastic, we express this as</p>\n<p>$$\ng_T = e^{\\int_0^T r dt}\n$$</p>\n<p>Therefore, the expectation of f at T must be discounted</p>\n<p>$$\nf_0 = \\mathbb{E}[f_T e^{-\\int_0^T r dt}]\n$$</p>\n<p>You could also express this as</p>\n<p>$$\nf_0 = \\hat{E}[e^{-\\bar{r}T} f_T]\n$$</p>\n<p>where \\(\\bar{r}\\) is the average value of r.</p>\n<h2>Interest Rate Derivative Valuation</h2>\n<p>A regular way to value an interest rate derivative, typically these will follow these steps:</p>\n<ol>\n<li>Simulate short-term interest rate paths. (in some cases we will have closed-form solutions, but generally we simulate)</li>\n<li>Calculate expected payoff on these paths.</li>\n<li>Discount at average value of short rate on the sampled path.</li>\n</ol>\n<p>In general, the value at time t of an interest rate derivative is based on providing a payoff \\(f_T\\) at time T</p>\n<p>$$\n\\hat{\\mathbb{E}}[f_T e^{-\\bar{r}(T - t)}]\n$$</p>\n<p>Basically you calculate the value of such derivatives between t and T.</p>\n<p>Furthermore, if you refer back to \\(P(t, T)\\) for the price function at time t of a ZCB with payoff of $1 at time T, we can say that</p>\n<p>$$\nP(t, T) = \\hat{\\mathbb{E}} [e^{-\\bar{r}(T - t)}]\n$$</p>\n<p>Now we will make connection to the interest rate.</p>\n<p>Generally, if R(t, T) is continuously compounded interest rate at time t, for a term (T - t), then we can say</p>\n<p>$$\nP(t, T) = e^{-R(t, T)(T - t)}\n$$</p>\n<p>then we can rearrange as</p>\n<p>$$\nR(t, T) = -\\frac{1}{T - t} \\ln P(t, T)\n$$</p>\n<p>Then finally we will arrive at the relationship</p>\n<p>$$\nR(t, T) = -\\frac{1}{T-t} \\ln \\hat{\\mathbb{E}}[e^{-\\bar{r}(T-t)}]\n$$</p>\n<p>This equation is what enables the calculation of the term structure of the interest rate at any given time.</p>\n<p>Based on the description of the risk-free rate, which may be stochastic, can help you describe the entire curve.</p>\n<p>All the models we discuss will be models of this short rate, there are some models of the instantaneous forward, but generally they will be instantaneously spot. These classical models give descriptions of stochastic processes that the short rate will have this particular expression.</p>\n<p>And this is the zero curve</p>\n<h2>Equilibrium Models</h2>\n<p>Rendleman &amp; Bartter, Vasicek, Cox Ingersoll &amp; Ross</p>\n<p>These models start with some assumptions about the economic variables, then the variable process from the short rate r. This will explore what the process for r implies about the bond prices and option prices. This model might be one factor, or two factor. We will look now just at one factor models.</p>\n<p>In a one factor equilibrium model, the process for r involves only one source of uncertainty.</p>\n<p>$$\ndr = m(r) dt + s(r) dW\n$$</p>\n<p>This general specification, m(r) is the instantaneous drift, and s(r) is the instantaneous volatility (stdev).</p>\n<p>For these models, m(r) and s(r) are <em>assumed</em> to be a function of r, but <em>independent</em> of time.</p>\n<p>This is different from the no-arbitrage models.</p>\n<p>Some of these models, historically, have been proposed. Some of them are not necessarily very good (lol).</p>\n<h3>Rendleman and Bartter</h3>\n<p>$$\ndr = \\mu r dt + \\sigma r dW\n$$</p>\n<p>Where \\(\\mu\\) and \\(\\sigma\\) are constant, it basically means that r follows GBM.</p>\n<p>But this is bad because r doesn’t follow GBM.</p>\n<p>These interest rates have some mean-reverting behavior, so that has to be included somehow. When r is high, it will tend to have negative drift, and when it’s low, it will tend to have positive drift.</p>\n<p>Economic argument, high r will cause the economy to slow down, less borrowing, and vice versa. These models can also be calibrated, will be discussed next time.</p>\n<h3>Vasicek</h3>\n<p>$$\ndr = a(b - r) td + \\sigma dW\n$$</p>\n<p>where a, b, σ are constants. Here we can see the mean reverting component. In the long-run, the value, when r is small, it will be a positive number and increase, and vice versa. a is the speed of mean reversion, b is the mean.</p>\n<p>This model has an analytical solution. Vasicek shows that if</p>\n<p>$$\nP(t, T) = \\hat{\\mathbb{E}}\\left[e^{-\\bar{r}(T-t)}\\right]\n$$</p>\n<p>then the price will be a function</p>\n<p>$$\nP(t, T) = A(t, T) e^{-B(t, T) \\cdot r(t)}\n$$</p>\n<p>This is a general form for the analytical solution to the Vasicek model, where</p>\n<p>$$\nB(t, T) = \\frac{1 - e^{-a(T - t)}}{a}\n$$</p>\n<p>$$\nA(t, T) = \\exp\\{\\frac{[B(t, T) - T + t](a^2 b - \\tfrac{\\sigma^2}{2})}{a^2} - \\frac{\\sigma^2B^2(t, T)}{4a}\\}\n$$</p>\n<p>Gives you more flexibility, it’s an alternative.</p>\n<p>There’s one more alternative…</p>\n<h3>Cox-Ingersoll-Ross</h3>\n<p>$$\ndr = a(b - r) dt + \\sigma \\sqrt{r} dW\n$$</p>\n<p>Again a, b, σ constants.</p>\n<p>What is the advantage of this model? You can look at the evolution of term structure over time. It’s observed that as the interest rate changes, the volatility also changes. Therefore the model should include this behavior.</p>\n<p>The price function for CIR has the same general expression as Vasicek:</p>\n<p>$$\nP(t, T) = A(t, T) e^{-B(t, T) r(t)}\n$$</p>\n<p>The functions are just slightly different. We will discuss the similarities and properties of these models.</p>\n<p>$$\nB(t, T) = \\frac{2\\left(e^{\\gamma(T-t)} - 1\\right)}{(\\gamma + a)\\left(e^{\\gamma(T-t)} - 1\\right) + 2\\gamma}\n$$</p>\n<p>$$\nA(t, T) = \\left[\\frac{2\\gamma e^{(a + \\gamma)(T - t)/2}}{(\\gamma + a)(e^{\\gamma(T - t)} - 1) + 2\\gamma}\\right]^{2ab/\\sigma^2}\n$$</p>\n<p>where</p>\n<p>$$\n\\gamma = \\sqrt{a^2 + 2 \\gamma^2}\n$$</p>\n<p>Basically, it has an analytical solution.</p>\n<h3>Properties of CIR vs Vasicek</h3>\n<p>A(t, T) and B(t, T) are different, but</p>\n<p>P(t, T) is fundamentally the same general expression.</p>\n<p>$$\n\\frac{\\partial P(t, T)}{r(t)} = -B(t, T) \\cdot P(t, T)\n$$\nThis function B can be used therefore as an alternative to duration.</p>\n<p>From the rate expression,</p>\n<p>$$\nR(t, T) = -\\frac{1}{T - t} \\ln P(t, T)\n$$\nThe zero rate at time t for a period T - t is, if you take the natural log of this general AB expression, because it’s a product, you will get</p>\n<p>$$\nR(t, T) = -\\frac{1}{T-t} \\ln A(t, T) + \\frac{1}{T-t} B(t, T) r(t)\n$$</p>\n<p>Here in this case, the entire term structure can be determined as a function of r(t) <em>if</em> a, b, σ are known.</p>\n<p>Here we define the modified duration of a bond Q.</p>\n<p>$$\n\\hat{D} = B(t, T)\n$$</p>\n<p>The shape is going to be a function of r(t), and dependent on t.</p>\n<p>The duration of such bond</p>\n<p>$$\n\\frac{\\Delta Q}{Q} = -D \\Delta y\n$$\nIf you consider that the yield of a bond.</p>\n<p>Alternatively, the duration by Vasicek &amp; CIR is</p>\n<p>$$\n\\frac{\\Delta Q}{Q} = - \\hat{D} \\Delta r\n$$</p>\n<p>or</p>\n<p>$$\n\\frac{\\partial Q}{\\partial r} = -\\hat{D} Q\n$$</p>\n<h3>Example</h3>\n<p>Let’s consider the zero-coupon bond lasting four years.</p>\n<p>Duration s = 4, so 10bps parallel shift in the term structure should lead to decrease of 0.4% in the bond price, this is the sensitivity of the model. If we use Vasicek’s model, with a = 0.1, then</p>\n<p>$$\n\\hat{D} = B(0, 4) = \\frac{1 - e^{-0.1 \\cdot 4}}{0.1} = 3.29\n$$</p>\n<p>The duration is a function of the mean-reversion rate.</p>\n<p>That means the short rate is 0.329%.</p>\n<p>Can you calibrate a using the duration? Hmmmm.</p>\n<p>Consider Q a portfolio of ZCBs (a coupon-bearing bond).</p>\n<p>$$\nP(t, T_i) (1 \\leq i \\leq m)\n$$</p>\n<p>\\(c_i\\) is the principal of the \\(i^{\\text{th}}\\) bond.</p>\n<p>Then the duration of our portfolio is</p>\n<p>$$\n\\hat{D} = -\\frac{1}{Q} \\frac{\\partial Q}{\\partial r} = - \\frac{1}{Q} \\sum_{i-1}^m \\frac{\\partial P(t, T_i)}{\\partial r} c_i = \\sum_{i=1}^m \\frac{c_i P(t, T_i)}{Q} \\hat{D}_i\n$$</p>\n<p>Where we have \\(\\hat{D}\\) for a coupon bearing bond being the weighted average of the duration of the underlying ZCBs.</p>\n<h3>Vasicek/CIR Pricing Example</h3>\n<p>Suppose we are given a = 0.1, b = 0.1. The initial short rate is 10%. The initial stdev of short rate change in a short time Δt is \\(\\sqrt{\\Delta t}\\)</p>\n<p>Then we will get one point in the term structure, but we can use code to get the entire term structure.</p>\n<h2>No-Arbitrage Model</h2>\n<p>These models are designed to be consistent with today’s term structure.</p>\n<p>Even if it’s used as parameters, it may not be exact.</p>\n<p>Equilibrium models generate today’s term structure.</p>\n<p>No-arbitrage models use term structure (the observed rates in the market) as an input.</p>\n<p>In equilibrium models, drift is not a function of time.</p>\n<p>In no-arbitrage models, drift <em>is</em> a function of time.</p>\n<p>We will look briefly at the Ho-Lee and Hull-White model.</p>\n<h3>Ho-Lee Model</h3>\n<p>$$dr = \\theta(t) dt + \\sigma dW$$</p>\n<p>\\(\\sigma\\) is the instantaneous standard deviation of the short rate.</p>\n<p>These parameters are defined so they fit the initial term structure.</p>\n<p>\\(\\theta(t)\\) can be calculated analytically. For the instantaneous forward rate \\(F_t = \\frac{\\partial F}{\\partial t}\\).</p>\n<p>$$\\theta(t) = F_t(0, t) + \\sigma^2 t$$</p>\n<p>As an approximation, you can take</p>\n<p>$$\\sigma(t) \\approx F_t(0, t)$$</p>\n<p>This is something kind of similar to what we observe before. The drift is no longer a constant, it is chosen to match the initial term structure.</p>\n<p>However, the price of a zero coupon bond.</p>\n<p>$$P(t, T) = A(t, T) e^{-r(t) (T - t)}$$</p>\n<p>has the analytical solution (skipping derivations)\n$$\\ln A(t, T) = \\ln \\frac{P(0, T)}{P(0, t)} + (T - t) F(0, t) - \\frac{1}{2} \\sigma^2 t (T - t)^2$$</p>\n<p>The advantage of this over previous models is that this will match our term structure. But it’s deficient in some components so it’s not so popular.</p>\n<p>Assumes that all forward rates have the same stdev</p>\n<h3>Hull-White Model</h3>\n<p>$$dr = [\\theta(t) - ar]dt + \\sigma dW$$</p>\n<p>or</p>\n<p>$$dr = a[\\tfrac{\\theta(t)}{a} - r] dt + \\sigma dW$$</p>\n<p>a, σ are constant</p>\n<p>This is the golden goose one factor model. It can be viewed as an extension of the Vasicek model that fits the term structure, with a time-dependent reversion level.</p>\n<p>Or we can say that it’s similar to Ho-Lee with time-dependent reversion level.</p>\n<p>$$\\theta(t) = F_t(0, t) + aF(0, t) + \\frac{\\sigma^2}{2a}(1 - e^{-2at})$$</p>\n<p>That last term is small, so we can approximate it.</p>\n<p>We can say that r follows the slope of the initial instantaneous forward rate curve. Basically this is the partial derivative.</p>\n<p>Then we can calculate the bond prices,</p>\n<p>$$P(t, T) = A(t, T) e^{-B(t, T) r(t)}$$</p>\n<p>$$B(t, T) = \\frac{1 - e^{-a(T-t)}}{a}$$</p>\n<p>$$\\ln A(t, T) = \\ln \\frac{P(0, T)}{P(0, t)} + B(t, T) F(0, t) - \\frac{1}{4a^3} \\gamma^2 (e^{-aT} - e^{-at})^2 (e^{2at} - 1)$$</p>\n<h2>Some other models</h2>\n<p>Black-Derman-Toy</p>\n<p>$$d \\ln(r) = [\\theta(t) - a(t) \\ln(r) ] dt + \\sigma(t) dW$$</p>\n<p>where \\(a(t) = -\\frac{\\sigma'(t)}{\\sigma(t)}\\)</p>\n<p>Then volatility is related to the speed of mean reversion.</p>\n<p>Black-Karasinski model is more general,</p>\n<p>a(t) and σ(t) are determined independently.</p>\n<p>It has the advantage that interest rates cannot be negative, and the future value is lognormal. However, it’s very difficult to model analytically.</p>\n<p>These are simple one-factor models as well. The only thing is that they are very difficult to calibrate, especially the more general they get.</p>\n<h3>Bond Options</h3>\n<p>We can also have closed form solution for the price of a bond option for Vasicek and Hull-White models:</p>\n<p>$$LP(0, s)N(h) - KP(0, T)N(H - \\sigma_P)$$</p>\n<p>where h and σ are VERY COMPLICATED.</p>\n<p>The idea is that you have a closed form solution and can solve using analytical methods.</p>\n<h2>Assignment 1 (BTW)</h2>\n<p><a href=\"https://github.com/pola-rs/polars/issues/5255#issuecomment-1857124471\" rel=\"noopener noreferrer\">https://github.com/pola-rs/polars/issues/5255#issuecomment-1857124471</a></p>\n<p>See this why you can’t have float linspace. Workaround is to multiply by 10 to an integer, floor, cast to int, do an arange, then recast to float and divide by the same magnitude.</p>","contentMarkdown":"## Continuing Adjustments\n\nTiming and quanto adjustments, we also looked at nonstandard swaps, LIBOR for LES? Another kind of nonstandard swap is…\n\n## Constant Maturity Swaps (CMS)\n\nThe definition of a CMS is\n\n**an interest rate swap where the floating rate equals the swap rate for another reference swap for a certain life**\n\n\n\nIf you want to write an example, here you can say\n\nfloating payment on a CMS can be made every six months at rate equal to 5-year swap rate.\n\n\n\nThe frequency of this CMS rate must be smaller than the reference rate. Usually the swap rate is equal to a previously observed swap rate.\n\n\n\nFurthermore, if we assume that we have reset dates \\\\(t_0, t_1, t_2 \\\\ldots\\\\)\n\nAnd payment dates: \\\\(t_1, t_2, t_3 \\\\ldots\\\\)\n\nWe will also consider L \\= notional principal\n\nWhat is going to be the floating payment? At \\\\(t_{i+1}\\\\), this would be the\n\nswap rate \\\\(s_i\\\\) applied to the principal for a period \\\\(\\\\tau_i\\\\)\n\n$$\n\\\\tau_i L s_i\n$$\n\nwhere \\\\(\\\\tau_i = t_{i+1} - t_i\\\\)\n\n\n\nNow we have to do some adjustments. The convexity adjustment is, the frequency of these coupons is going to be the same as the bonds.\n\n\n\nWe will also have to do a timing adjustment, a combination of these two. If you apply these to another currency, then we will also have a quanto adjustment.\n\n\n\nLet’s say \\\\(y_i\\\\) is the forward value of the swap rate.\n\nBy using a convexity/timing adjustment.\n\n\n\nWe can say the **realized swap rate** is assumed:\n\n$$\ny_i - \\\\frac{1}{2} y_i^2 \\\\sigma^2_{y_i} t_i \\\\frac{G_i''(y)}{G_i' (y)} - \\\\frac{y_i \\\\tau_i F_i\\\\rho_i \\\\sigma_{y,i} \\\\sigma_{F,i} t_i}{1 + \\\\bar{T}_i \\\\tau_i}\n$$\n\nwhere\n\n\\\\(\\\\sigma_{y, i}\\\\) is the volatility of the forward swap rate\n\n\\\\(F_i\\\\) is the current forward interest rate between \\\\(t_i\\\\) and \\\\(t_{i+1}\\\\)\n\n\\\\(\\\\sigma_{F, i}\\\\) is the volatility of the forward rate\n\n\\\\(G_i(x)\\\\) this is basically the price of a bond which pays at time i, the same amount as the reference swap.\n\nThe forward rate will be implied by the “Kaplan?” prices.\n\n\\\\(\\\\rho_i\\\\) the correlation can be estimated from historical data.\n\n### Example\n\n6 year CMS swap (life of swap is 6 years)\n\n5 year swap rate is received, fixed rate of 5% is paid on notional $100M\n\nexchange of payments is semiannual, on both 5-year underlying swap and on CMS swap.\n\nThe exchange rate on the payment date is determined from the swap rate on the previous payment date.\n\nThe term structure is flat at 5% per annum with semiannual compounding. (that’s where the timing adjustment comes in)\n\nThe volatility of the options on five-year swaps have 15% IV (\\\\(\\\\sigma_{y, i}\\\\)) and in this simplified problem we’ll say caplets with 6 month tenor have a 20% IV. The correlation \\\\(\\\\rho_i\\\\) between each cap rate and each swap rate is 0.7\n\n\n\nThe fixed rate \\\\(y_i\\\\) is 0.05. This is semiannual payment, so \\\\(\\\\tau_i = 0.5\\\\). Given volatility \\\\(\\\\sigma_{F, i} = 0.20\\\\). Then the forward rate is also \\\\(F_i = 0.05\\\\) from the term structure, and the correlation given is \\\\(\\\\rho_i = 0.7\\\\).\n\nThen what is the relevant function G in this case?\n\n\n\nWe have the reference rate which is a 5 year swap rate, which has a semiannual payment.\n\n\n\nWe can express this as a bond, so a sum of coupons. The 2.5M is the coupon payment (halved\n\n$$\nG_i(x) = \\\\sum_{i=1}^{10} \\\\frac{2.5}{1 + \\\\tfrac{x}{2})^i} + \\\\frac{100}{(1 + \\\\tfrac{x}{2})^10}\n$$\n\nThen the derivative is\n\n$$\nG_i'(y_i) = -437.603, G_i'' (y_i) = 2261.23\n$$\n\nThen the total convexity/timing adjustment is, \\\\(0.0001197t_i\\\\)\n\nWe’re going to have different values, so for example the 5 year swap rate t \\= 4 should be assumed to be 5.0479% instead of 5%.\n\nTherefore the net cash flow at t \\= 4.5 should be 0.5 \\* 0.000479 \\* 100M.\n\nThen we can calculate for all these cash payments, the value of the CMS\n\n## Models of the Short Rate\n\nThere are different specifications of such models. The models presented so far in our previous discussions make the assumption that the probability distribution of variables (interest rates, bond prices, …) are log normally distributed. That allows us to use Black’s model.\n\n\n\nThere are some issues with this kind of approach.\n\n- These models do not provide a description on how the interest rates evolve in time, just the underlying distribution.\n- Cannot be used to value American style options.\n\nIn this lecture, we will discuss the **“term structure model”**. Such interest rate model will describe the evolution of all zero-coupon interest rates, a little more general.\n\n\n\nWe will focus on some classical models.\n\nThe behavior of the **“short-rate”** or instantaneous short rate. This rate is considered in a risk-neutral world. Basically, that means in a very short period of time, between t and \\\\(t + \\\\Delta t\\\\), investors earn \\\\(r(t) \\\\Delta t\\\\), the risk-free interest rate.\n\nFor example, the dollar money market account is a security that is worth $1 at time 0 and earns the instantaneous risk-free rate r at any given time. This r may be stochastic.\n\nFurthermore, if g equals the money market account, then the process \\\\(dg = rg dt\\\\). Here we can see that the r the risk-free rate can be stochastic, so this will be the drift of g being stochastic, with volatility being 0\\.\n\nWe saw last lecture that\n\n\\\\(\\\\frac{f}{g}\\\\) is a martingale in a world where the market price of risk is 0.\n\n\n\nTherefore the expected value is\n\n$$\nf_0 = g_0 \\\\hat{\\\\mathbb{E}}[\\\\frac{f_T}{g_T}]\n$$\n\nThen if you take g as the money market account, then by definition\n\n$$\ng_0 = 1\n$$\n\nAnd for \\\\(g_T\\\\)? You might expect the e^rt general, but because this is stochastic, we express this as\n\n$$\ng_T = e^{\\\\int_0^T r dt}\n$$\n\nTherefore, the expectation of f at T must be discounted\n\n$$\nf_0 = \\\\mathbb{E}[f_T e^{-\\\\int_0^T r dt}]\n$$\n\nYou could also express this as\n\n$$\nf_0 = \\\\hat{E}[e^{-\\\\bar{r}T} f_T]\n$$\n\nwhere \\\\(\\\\bar{r}\\\\) is the average value of r.\n\n\n\n## Interest Rate Derivative Valuation\n\nA regular way to value an interest rate derivative, typically these will follow these steps:\n\n1. Simulate short-term interest rate paths. (in some cases we will have closed-form solutions, but generally we simulate)\n2. Calculate expected payoff on these paths.\n3. Discount at average value of short rate on the sampled path.\n\nIn general, the value at time t of an interest rate derivative is based on providing a payoff \\\\(f_T\\\\) at time T\n\n$$\n\\\\hat{\\\\mathbb{E}}[f_T e^{-\\\\bar{r}(T - t)}]\n$$\n\nBasically you calculate the value of such derivatives between t and T.\n\nFurthermore, if you refer back to \\\\(P(t, T)\\\\) for the price function at time t of a ZCB with payoff of $1 at time T, we can say that\n\n$$\nP(t, T) = \\\\hat{\\\\mathbb{E}} [e^{-\\\\bar{r}(T - t)}]\n$$\n\n\n\nNow we will make connection to the interest rate.\n\nGenerally, if R(t, T) is continuously compounded interest rate at time t, for a term (T \\- t), then we can say\n\n$$\nP(t, T) = e^{-R(t, T)(T - t)}\n$$\n\nthen we can rearrange as\n\n$$\nR(t, T) = -\\\\frac{1}{T - t} \\\\ln P(t, T)\n$$\n\nThen finally we will arrive at the relationship\n\n$$\nR(t, T) = -\\\\frac{1}{T-t} \\\\ln \\\\hat{\\\\mathbb{E}}[e^{-\\\\bar{r}(T-t)}]\n$$\n\nThis equation is what enables the calculation of the term structure of the interest rate at any given time.\n\nBased on the description of the risk-free rate, which may be stochastic, can help you describe the entire curve.\n\nAll the models we discuss will be models of this short rate, there are some models of the instantaneous forward, but generally they will be instantaneously spot. These classical models give descriptions of stochastic processes that the short rate will have this particular expression.\n\nAnd this is the zero curve\n\n## Equilibrium Models\n\nRendleman & Bartter, Vasicek, Cox Ingersoll & Ross\n\nThese models start with some assumptions about the economic variables, then the variable process from the short rate r. This will explore what the process for r implies about the bond prices and option prices. This model might be one factor, or two factor. We will look now just at one factor models.\n\n\n\nIn a one factor equilibrium model, the process for r involves only one source of uncertainty.\n\n$$\ndr = m(r) dt + s(r) dW\n$$\n\nThis general specification, m(r) is the instantaneous drift, and s(r) is the instantaneous volatility (stdev).\n\nFor these models, m(r) and s(r) are *assumed* to be a function of r, but *independent* of time.\n\nThis is different from the no-arbitrage models.\n\nSome of these models, historically, have been proposed. Some of them are not necessarily very good (lol).\n\n\n\n### Rendleman and Bartter\n\n$$\ndr = \\\\mu r dt + \\\\sigma r dW\n$$\n\nWhere \\\\(\\\\mu\\\\) and \\\\(\\\\sigma\\\\) are constant, it basically means that r follows GBM.\n\nBut this is bad because r doesn’t follow GBM.\n\nThese interest rates have some mean-reverting behavior, so that has to be included somehow. When r is high, it will tend to have negative drift, and when it’s low, it will tend to have positive drift.\n\nEconomic argument, high r will cause the economy to slow down, less borrowing, and vice versa. These models can also be calibrated, will be discussed next time.\n\n### Vasicek\n\n$$\ndr = a(b - r) td + \\\\sigma dW\n$$\n\nwhere a, b, σ are constants. Here we can see the mean reverting component. In the long-run, the value, when r is small, it will be a positive number and increase, and vice versa. a is the speed of mean reversion, b is the mean.\n\nThis model has an analytical solution. Vasicek shows that if\n\n$$\nP(t, T) = \\\\hat{\\\\mathbb{E}}\\\\left[e^{-\\\\bar{r}(T-t)}\\\\right]\n$$\n\nthen the price will be a function\n\n$$\nP(t, T) = A(t, T) e^{-B(t, T) \\\\cdot r(t)}\n$$\n\nThis is a general form for the analytical solution to the Vasicek model, where\n\n$$\nB(t, T) = \\\\frac{1 - e^{-a(T - t)}}{a}\n$$\n\n$$\nA(t, T) = \\\\exp\\\\{\\\\frac{[B(t, T) - T + t](a^2 b - \\\\tfrac{\\\\sigma^2}{2})}{a^2} - \\\\frac{\\\\sigma^2B^2(t, T)}{4a}\\\\}\n$$\n\nGives you more flexibility, it’s an alternative.\n\nThere’s one more alternative…\n\n### Cox-Ingersoll-Ross\n\n$$\ndr = a(b - r) dt + \\\\sigma \\\\sqrt{r} dW\n$$\n\nAgain a, b, σ constants.\n\nWhat is the advantage of this model? You can look at the evolution of term structure over time. It’s observed that as the interest rate changes, the volatility also changes. Therefore the model should include this behavior.\n\nThe price function for CIR has the same general expression as Vasicek:\n\n$$\nP(t, T) = A(t, T) e^{-B(t, T) r(t)}\n$$\n\nThe functions are just slightly different. We will discuss the similarities and properties of these models.\n\n$$\nB(t, T) = \\\\frac{2\\\\left(e^{\\\\gamma(T-t)} - 1\\\\right)}{(\\\\gamma + a)\\\\left(e^{\\\\gamma(T-t)} - 1\\\\right) + 2\\\\gamma}\n$$\n\n$$\nA(t, T) = \\\\left[\\\\frac{2\\\\gamma e^{(a + \\\\gamma)(T - t)/2}}{(\\\\gamma + a)(e^{\\\\gamma(T - t)} - 1) + 2\\\\gamma}\\\\right]^{2ab/\\\\sigma^2}\n$$\n\nwhere\n\n$$\n\\\\gamma = \\\\sqrt{a^2 + 2 \\\\gamma^2}\n$$\n\nBasically, it has an analytical solution.\n\n### Properties of CIR vs Vasicek\n\nA(t, T) and B(t, T) are different, but\n\nP(t, T) is fundamentally the same general expression.\n\n$$\n\\\\frac{\\\\partial P(t, T)}{r(t)} = -B(t, T) \\\\cdot P(t, T)\n$$\nThis function B can be used therefore as an alternative to duration.\n\nFrom the rate expression,\n\n$$\nR(t, T) = -\\\\frac{1}{T - t} \\\\ln P(t, T)\n$$\nThe zero rate at time t for a period T \\- t is, if you take the natural log of this general AB expression, because it’s a product, you will get\n\n$$\nR(t, T) = -\\\\frac{1}{T-t} \\\\ln A(t, T) + \\\\frac{1}{T-t} B(t, T) r(t)\n$$\n\nHere in this case, the entire term structure can be determined as a function of r(t) *if* a, b, σ are known.\n\nHere we define the modified duration of a bond Q.\n\n$$\n\\\\hat{D} = B(t, T)\n$$\n\nThe shape is going to be a function of r(t), and dependent on t.\n\nThe duration of such bond\n\n$$\n\\\\frac{\\\\Delta Q}{Q} = -D \\\\Delta y\n$$\nIf you consider that the yield of a bond.\n\nAlternatively, the duration by Vasicek & CIR is\n\n$$\n\\\\frac{\\\\Delta Q}{Q} = - \\\\hat{D} \\\\Delta r\n$$\n\nor\n\n$$\n\\\\frac{\\\\partial Q}{\\\\partial r} = -\\\\hat{D} Q\n$$\n\n### Example\n\nLet’s consider the zero-coupon bond lasting four years.\n\nDuration s \\= 4, so 10bps parallel shift in the term structure should lead to decrease of 0.4% in the bond price, this is the sensitivity of the model. If we use Vasicek’s model, with a \\= 0.1, then\n\n$$\n\\\\hat{D} = B(0, 4) = \\\\frac{1 - e^{-0.1 \\\\cdot 4}}{0.1} = 3.29\n$$\n\nThe duration is a function of the mean-reversion rate.\n\nThat means the short rate is 0.329%.\n\nCan you calibrate a using the duration? Hmmmm.\n\n\n\nConsider Q a portfolio of ZCBs (a coupon-bearing bond).\n\n$$\nP(t, T_i) (1 \\\\leq i \\\\leq m)\n$$\n\n\\\\(c_i\\\\) is the principal of the \\\\(i^{\\\\text{th}}\\\\) bond.\n\nThen the duration of our portfolio is\n\n$$\n\\\\hat{D} = -\\\\frac{1}{Q} \\\\frac{\\\\partial Q}{\\\\partial r} = - \\\\frac{1}{Q} \\\\sum_{i-1}^m \\\\frac{\\\\partial P(t, T_i)}{\\\\partial r} c_i = \\\\sum_{i=1}^m \\\\frac{c_i P(t, T_i)}{Q} \\\\hat{D}_i\n$$\n\nWhere we have \\\\(\\\\hat{D}\\\\) for a coupon bearing bond being the weighted average of the duration of the underlying ZCBs.\n\n### Vasicek/CIR Pricing Example\n\nSuppose we are given a \\= 0.1, b \\= 0.1. The initial short rate is 10%. The initial stdev of short rate change in a short time Δt is \\\\(\\\\sqrt{\\\\Delta t}\\\\)\n\nThen we will get one point in the term structure, but we can use code to get the entire term structure.\n\n## No-Arbitrage Model\n\nThese models are designed to be consistent with today’s term structure.\n\nEven if it’s used as parameters, it may not be exact.\n\nEquilibrium models generate today’s term structure.\n\nNo-arbitrage models use term structure (the observed rates in the market) as an input.\n\nIn equilibrium models, drift is not a function of time.\n\nIn no-arbitrage models, drift *is* a function of time.\n\n\n\nWe will look briefly at the Ho-Lee and Hull-White model.\n\n### Ho-Lee Model\n\n$$dr \\= \\\\theta(t) dt \\+ \\\\sigma dW$$\n\n\\\\(\\sigma\\\\) is the instantaneous standard deviation of the short rate.\n\nThese parameters are defined so they fit the initial term structure.\n\n\n\n\\\\(\\theta(t)\\\\) can be calculated analytically. For the instantaneous forward rate \\\\(F_t = \\\\frac{\\\\partial F}{\\\\partial t}\\\\).\n\n$$\\\\theta(t) \\= F\\_t(0, t) \\+ \\\\sigma^2 t$$\n\nAs an approximation, you can take\n\n$$\\\\sigma(t) \\\\approx F\\_t(0, t)$$\n\nThis is something kind of similar to what we observe before. The drift is no longer a constant, it is chosen to match the initial term structure.\n\nHowever, the price of a zero coupon bond.\n\n$$P(t, T) \\= A(t, T) e^{-r(t) (T \\- t)}$$\n\nhas the analytical solution (skipping derivations)\n$$\\\\ln A(t, T) \\= \\\\ln \\\\frac{P(0, T)}{P(0, t)} \\+ (T \\- t) F(0, t) \\- \\\\frac{1}{2} \\\\sigma^2 t (T \\- t)^2$$\n\nThe advantage of this over previous models is that this will match our term structure. But it’s deficient in some components so it’s not so popular.\n\nAssumes that all forward rates have the same stdev\n\n### Hull-White Model\n\n$$dr \\= \\[\\\\theta(t) \\- ar\\]dt \\+ \\\\sigma dW$$\n\nor\n\n$$dr \\= a\\[\\\\tfrac{\\\\theta(t)}{a} \\- r\\] dt \\+ \\\\sigma dW$$\n\na, σ are constant\n\nThis is the golden goose one factor model. It can be viewed as an extension of the Vasicek model that fits the term structure, with a time-dependent reversion level.\n\nOr we can say that it’s similar to Ho-Lee with time-dependent reversion level.\n\n$$\\\\theta(t) \\= F\\_t(0, t) \\+ aF(0, t) \\+ \\\\frac{\\\\sigma^2}{2a}(1 \\- e^{-2at})$$\n\nThat last term is small, so we can approximate it.\n\n\n\nWe can say that r follows the slope of the initial instantaneous forward rate curve. Basically this is the partial derivative.\n\nThen we can calculate the bond prices,\n\n$$P(t, T) \\= A(t, T) e^{-B(t, T) r(t)}$$\n\n$$B(t, T) = \\\\frac{1 - e^{-a(T-t)}}{a}$$\n\n$$\\\\ln A(t, T) \\= \\\\ln \\\\frac{P(0, T)}{P(0, t)} \\+ B(t, T) F(0, t) \\- \\\\frac{1}{4a^3} \\\\gamma^2 (e^{-aT} \\- e^{-at})^2 (e^{2at} \\- 1)$$\n\n## Some other models\n\nBlack-Derman-Toy\n\n$$d \\\\ln(r) \\= \\[\\\\theta(t) \\- a(t) \\\\ln(r) \\] dt \\+ \\\\sigma(t) dW$$\n\nwhere \\\\(a(t) = -\\\\frac{\\\\sigma'(t)}{\\\\sigma(t)}\\\\)\n\nThen volatility is related to the speed of mean reversion.\n\n\n\nBlack-Karasinski model is more general,\n\na(t) and σ(t) are determined independently.\n\n\n\nIt has the advantage that interest rates cannot be negative, and the future value is lognormal. However, it’s very difficult to model analytically.\n\n\n\nThese are simple one-factor models as well. The only thing is that they are very difficult to calibrate, especially the more general they get.\n\n### Bond Options\n\nWe can also have closed form solution for the price of a bond option for Vasicek and Hull-White models:\n\n$$LP(0, s)N(h) \\- KP(0, T)N(H \\- \\\\sigma\\_P)$$\n\nwhere h and σ are VERY COMPLICATED.\n\nThe idea is that you have a closed form solution and can solve using analytical methods.\n\n## Assignment 1 (BTW)\n\n[https://github.com/pola-rs/polars/issues/5255\\#issuecomment-1857124471](https://github.com/pola-rs/polars/issues/5255#issuecomment-1857124471)\n\nSee this why you can’t have float linspace. Workaround is to multiply by 10 to an integer, floor, cast to int, do an arange, then recast to float and divide by the same magnitude.","dataUrl":"https://sharifhsn.dev/api/posts/advanced-derivatives-week-05.json","date":"2025-02-27","datePublished":"2025-02-27","description":"Timing and quanto adjustments, we also looked at nonstandard swaps, LIBOR for LES? Another kind of nonstandard swap is…","site":"https://sharifhsn.dev","slug":"advanced-derivatives-week-05","source":"Advanced Derivatives","sourceUrl":null,"tags":["Fixed Income","Constant Maturity Swaps","Short Rate Models","Vasicek","Cox-Ingersoll-Ross","Hull-White"],"title":"Constant Maturity Swaps and Short-Rate Models","url":"https://sharifhsn.dev/blog/advanced-derivatives-week-05/","version":"1","wordCount":2811}