{"categories":["Fixed Income"],"contentHtml":"<h3>From Last Time</h3><p>We started to look at interest rates. In the first part we’re going to discuss various interpolation methods, functions that are useful for modeling the yield curve.</p><p>That’s useful because many times you might have to discount or use forward rates or discount factors for maturities that are not available. For this reason you have to do some interpolation.</p><h3>Yield Curve Interpolation Methods</h3><p>What do we want to achieve?</p><p>In general, the interpolation problem can be expressed in the following format:</p><ul><li>given some data as a function of time <math><msub><mi>𝑡</mi><mn>1</mn></msub><mo>,</mo><msub><mi>𝑡</mi><mn>2</mn></msub><mo>,</mo><mi>…</mi><mo>,</mo><msub><mi>𝑡</mi><mi>𝑛</mi></msub></math> and <math><msub><mi>𝑥</mi><mn>1</mn></msub><mo>,</mo><msub><mi>𝑥</mi><mn>2</mn></msub><mo>,</mo><mi>…</mi><mo>,</mo><msub><mi>𝑥</mi><mi>𝑛</mi></msub></math> known</li><li>construct a continuous function <math><mi>𝑥</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑡</mi><mo stretchy=\"false\">)</mo></math> that satisfies <math><mi>𝑥</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><msub><mi>𝑡</mi><mi>𝑖</mi></msub><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><msub><mi>𝑥</mi><mi>𝑖</mi></msub></math> for <math><mi>𝑖</mi><mo>=</mo><mn>1</mn><mo>,</mo><mn>2</mn><mo>,</mo><mi>…</mi><mo>,</mo><mi>𝑛</mi></math></li></ul><p>What does it mean that the function is continuous? It means that at all points, the limit on left and right is the same, and that it passes through all points.</p><h3>Criteria for choosing the Interpolation Method</h3><ul><li>Smoothness of the forward curve is desirable</li></ul><p>What does this mean? The derivative should be continuous i.e.&nbsp;it should be differentiable. If the model has smooth curves, it should be more accurate because there’s no reason to have rough changes in curvature.</p><ul><li>How local is the interpolation method?</li></ul><p>If an input changes, does the interpolation function change locally or globally? Simple interpolation, linear interpolation have a local impact. Typically, each input just changes</p><p>It’s good to have interpolation that impacts globally, but maybe not with very high sensitivity.</p><ul><li>Are the forwards not only continuous, but also stable?</li></ul><p>The <strong>degree of stability</strong> is the maximum basis point change in the forward curve given a basis point change in move in input (???? look this up)</p><h3>Linear Methods</h3><p>Let’s graph t against r</p><p>For <math><msub><mi>𝑡</mi><mrow><mi>𝑖</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></msub><mo>&lt;</mo><mi>𝑡</mi><mo>&lt;</mo><msub><mi>𝑡</mi><mi>𝑖</mi></msub></math> (this is the general case for local interpolation</p><math display=\"block\"><mi>𝑟</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑡</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mfrac><mrow><mi>𝑡</mi><mo>−</mo><msub><mi>𝑡</mi><mrow><mi>𝑖</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></msub></mrow><mrow><msub><mi>𝑡</mi><mi>𝑖</mi></msub><mo>−</mo><msub><mi>𝑡</mi><mrow><mi>𝑖</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></msub></mrow></mfrac><mo lspace=\"0.2222222222222222em\" rspace=\"0.2222222222222222em\">⋅</mo><msub><mi>𝑟</mi><mi>𝑖</mi></msub><mo>+</mo><mfrac><mrow><msub><mi>𝑡</mi><mi>𝑖</mi></msub><mo>−</mo><mi>𝑡</mi></mrow><mrow><msub><mi>𝑡</mi><mi>𝑖</mi></msub><mo>−</mo><msub><mi>𝑡</mi><mrow><mi>𝑖</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></msub></mrow></mfrac><mo lspace=\"0.2222222222222222em\" rspace=\"0.2222222222222222em\">⋅</mo><msub><mi>𝑟</mi><mrow><mi>𝑖</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></msub></math><p>This is a simple rate from drawing a straight line between two points and picking the rate that corresponds to time</p><p>What is important for this class is to have consistent curves, to prevent arbitrage.</p><p>If this is the rate, how do we get the forward?</p><p>The price of a zero coupon bond is the continuously discounted forward rate</p><math display=\"block\"><mi>𝑃</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mn>0</mn><mo>,</mo><msub><mi>𝑡</mi><mn>1</mn></msub><mo>,</mo><msub><mi>𝑡</mi><mn>2</mn></msub><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mn>0</mn><mo rspace=\"0em\">,</mo><msub><mi>𝑡</mi><mn>1</mn></msub><mo rspace=\"0em\">,</mo><msub><mi>𝑡</mi><mn>2</mn></msub><mo form=\"postfix\" stretchy=\"false\">)</mo><mo lspace=\"0em\" rspace=\"0em\">⋅</mo><mo form=\"prefix\" stretchy=\"false\">(</mo><msub><mi>𝑡</mi><mn>2</mn></msub><mo lspace=\"0em\" rspace=\"0em\">−</mo><msub><mi>𝑡</mi><mn>1</mn></msub><mo stretchy=\"false\">)</mo></mrow></msup></math><p>Then the forward rate is just the natural log of this scaled to time</p><math display=\"block\"><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mn>0</mn><mo>,</mo><msub><mi>𝑡</mi><mn>1</mn></msub><mo>,</mo><msub><mi>𝑡</mi><mn>2</mn></msub><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mo form=\"prefix\">−</mo><mfrac><mrow><mo lspace=\"0em\" rspace=\"0.16666666666666666em\">ln</mo><mi>𝑃</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mn>0</mn><mo>,</mo><msub><mi>𝑡</mi><mn>1</mn></msub><mo>,</mo><msub><mi>𝑡</mi><mn>2</mn></msub><mo stretchy=\"false\">)</mo></mrow><mrow><msub><mi>𝑡</mi><mn>2</mn></msub><mo>−</mo><msub><mi>𝑡</mi><mn>1</mn></msub></mrow></mfrac></math><p>Zero coupon bonds can also be determined in this way.</p><math display=\"block\"><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mn>0</mn><mo>,</mo><msub><mi>𝑡</mi><mn>1</mn></msub><mo>,</mo><msub><mi>𝑡</mi><mn>2</mn></msub><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mo form=\"prefix\">−</mo><mfrac><mrow><mo lspace=\"0em\" rspace=\"0.16666666666666666em\">ln</mo><mi>𝑃</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mn>0</mn><mo>,</mo><msub><mi>𝑡</mi><mn>2</mn></msub><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>−</mo><mo form=\"prefix\" lspace=\"0em\" rspace=\"0.16666666666666666em\">ln</mo><mi>𝑃</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mn>0</mn><mo>,</mo><msub><mi>𝑡</mi><mn>1</mn></msub><mo stretchy=\"false\">)</mo></mrow><mrow><msub><mi>𝑡</mi><mn>2</mn></msub><mo>−</mo><msub><mi>𝑡</mi><mn>1</mn></msub></mrow></mfrac></math><p>In the limit, we can use the derivative</p><math display=\"block\"><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑡</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mo form=\"prefix\">−</mo><mfrac><mi>𝑑</mi><mrow><mi>𝑑</mi><mi>𝑡</mi></mrow></mfrac><mo form=\"prefix\" lspace=\"0.16666666666666666em\" rspace=\"0.16666666666666666em\">ln</mo><mi>𝑃</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑡</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>−</mo><mfrac><mi>𝑑</mi><mrow><mi>𝑑</mi><mi>𝑡</mi></mrow></mfrac><mo form=\"prefix\" stretchy=\"false\">[</mo><mi>𝑟</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑡</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo lspace=\"0.2222222222222222em\" rspace=\"0.2222222222222222em\">⋅</mo><mi>𝑡</mi><mo stretchy=\"false\">]</mo></math><p>So this is the relationship between the forward and the zero rate r(t) Now we can determine a consistent forward. Therefore f(t) is the derivative rate of this product</p><math display=\"block\"><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑡</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mi>𝑟</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑡</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>+</mo><mi>𝑡</mi><msup><mi>𝑟</mi><mo>′</mo></msup><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑡</mi><mo stretchy=\"false\">)</mo></math><p>So if you take such derivatives, you can substitute the formula for the instantaneous forward.</p><math display=\"block\"><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑡</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mfrac><mrow><mo stretchy=\"false\">(</mo><mn>2</mn><mi>𝑡</mi><mo>−</mo><msub><mi>𝑡</mi><mrow><mi>𝑖</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></msub><mo form=\"postfix\" stretchy=\"false\">)</mo><msub><mi>𝑟</mi><mi>𝑖</mi></msub><mo>+</mo><mo form=\"prefix\" stretchy=\"false\">(</mo><msub><mi>𝑡</mi><mi>𝑖</mi></msub><mo>−</mo><mn>2</mn><mi>𝑡</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><msub><mi>𝑟</mi><mrow><mi>𝑖</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></msub></mrow><mrow><msub><mi>𝑡</mi><mi>𝑖</mi></msub><mo>−</mo><msub><mi>𝑡</mi><mrow><mi>𝑖</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></msub></mrow></mfrac></math><p>This is linear, so you can do a function which is linear in log rates if you prefer</p><h3>Linear in log rates</h3><math display=\"block\"><mo lspace=\"0em\" rspace=\"0em\">ln</mo><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑟</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑡</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mfrac><mrow><mi>𝑡</mi><mo>−</mo><msub><mi>𝑡</mi><mrow><mi>𝑖</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></msub></mrow><mrow><msub><mi>𝑡</mi><mi>𝑖</mi></msub><mo>−</mo><msub><mi>𝑡</mi><mrow><mi>𝑖</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></msub></mrow></mfrac><mo form=\"prefix\" lspace=\"0.16666666666666666em\" rspace=\"0em\">ln</mo><mo form=\"prefix\" stretchy=\"false\">(</mo><msub><mi>𝑟</mi><mi>𝑖</mi></msub><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>+</mo><mfrac><mrow><mi>𝑡</mi><mo>−</mo><msub><mi>𝑡</mi><mrow><mi>𝑖</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></msub></mrow><mrow><msub><mi>𝑡</mi><mi>𝑖</mi></msub><mo>−</mo><msub><mi>𝑡</mi><mrow><mi>𝑖</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></msub></mrow></mfrac><mo lspace=\"0.2222222222222222em\" rspace=\"0.2222222222222222em\">⋅</mo><mo form=\"prefix\" lspace=\"0em\" rspace=\"0em\">ln</mo><mo form=\"prefix\" stretchy=\"false\">(</mo><msub><mi>𝑟</mi><mrow><mi>𝑖</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></msub><mo stretchy=\"false\">)</mo></math><p>So this is kind of a linear interpolation between two points, but in general these curves are not linear, they have some curvature</p><h3>Exponential Interpolation</h3><p>The discount factors are</p><math display=\"block\"><mi>𝑑</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><msub><mi>𝑡</mi><mn>1</mn></msub><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><msup><mi>𝑒</mi><mrow><mo>−</mo><msub><mi>𝑟</mi><mn>1</mn></msub><mo form=\"prefix\" stretchy=\"false\">(</mo><msub><mi>𝑡</mi><mn>1</mn></msub><mo lspace=\"0em\" rspace=\"0em\">−</mo><msub><mi>𝑡</mi><mn>0</mn></msub><mo stretchy=\"false\">)</mo></mrow></msup></math><math display=\"block\"><mi>𝑑</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><msub><mi>𝑡</mi><mn>2</mn></msub><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><msup><mi>𝑒</mi><mrow><mo>−</mo><msub><mi>𝑟</mi><mn>2</mn></msub><mo form=\"prefix\" stretchy=\"false\">(</mo><msub><mi>𝑡</mi><mn>2</mn></msub><mo lspace=\"0em\" rspace=\"0em\">−</mo><msub><mi>𝑡</mi><mn>0</mn></msub><mo stretchy=\"false\">)</mo></mrow></msup></math><p>This is exponential interpolation for the discount curve, which will give us</p><math display=\"block\"><msub><mi>𝑟</mi><mn>1</mn></msub><mo>=</mo><mo form=\"prefix\">−</mo><mfrac><mrow><mo lspace=\"0em\" rspace=\"0.16666666666666666em\">ln</mo><mi>𝑑</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><msub><mi>𝑡</mi><mn>1</mn></msub><mo stretchy=\"false\">)</mo></mrow><mrow><msub><mi>𝑡</mi><mn>1</mn></msub><mo>−</mo><msub><mi>𝑡</mi><mn>0</mn></msub></mrow></mfrac></math><math display=\"block\"><msub><mi>𝑟</mi><mn>2</mn></msub><mo>=</mo><mo form=\"prefix\">−</mo><mfrac><mrow><mo lspace=\"0em\" rspace=\"0.16666666666666666em\">ln</mo><mi>𝑑</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><msub><mi>𝑡</mi><mn>2</mn></msub><mo stretchy=\"false\">)</mo></mrow><mrow><msub><mi>𝑡</mi><mn>2</mn></msub><mo>−</mo><msub><mi>𝑡</mi><mn>0</mn></msub></mrow></mfrac></math><p>Then we define</p><math display=\"block\"><mi>𝑟</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><msub><mi>𝑡</mi><mi>𝑎</mi></msub><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mi>𝜆</mi><mi>𝑟</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><msub><mi>𝑡</mi><mn>1</mn></msub><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>+</mo><mo form=\"prefix\" stretchy=\"false\">(</mo><mn>1</mn><mo>−</mo><mi>𝜆</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mi>𝑟</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><msub><mi>𝑡</mi><mn>2</mn></msub><mo stretchy=\"false\">)</mo></math><p>Now we’re going to calculate the discount factor</p><math display=\"block\"><mi>𝑑</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><msub><mi>𝑡</mi><mi>𝑎</mi></msub><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝑟</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><msub><mi>𝑡</mi><mi>𝑎</mi></msub><mo form=\"postfix\" stretchy=\"false\">)</mo><mo form=\"prefix\" stretchy=\"false\">(</mo><msub><mi>𝑡</mi><mi>𝑎</mi></msub><mo lspace=\"0em\" rspace=\"0em\">−</mo><msub><mi>𝑡</mi><mn>0</mn></msub><mo stretchy=\"false\">)</mo></mrow></msup><mo>=</mo><msup><mi>𝑒</mi><mrow><mo>−</mo><mrow><mo>(</mo><mrow><mi>𝜆</mi><mi>𝑟</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><msub><mi>𝑡</mi><mn>1</mn></msub><mo form=\"postfix\" stretchy=\"false\">)</mo><mo lspace=\"0em\" rspace=\"0em\">+</mo><mo form=\"prefix\" stretchy=\"false\">(</mo><mn>1</mn><mo lspace=\"0em\" rspace=\"0em\">−</mo><mi>𝜆</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mi>𝑟</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><msub><mi>𝑡</mi><mn>2</mn></msub><mo stretchy=\"false\">)</mo></mrow><mo>)</mo></mrow><mrow><mo>(</mo><mrow><msub><mi>𝑡</mi><mi>𝑎</mi></msub><mo lspace=\"0em\" rspace=\"0em\">−</mo><msub><mi>𝑡</mi><mn>0</mn></msub></mrow><mo>)</mo></mrow></mrow></msup></math><math display=\"block\"><mo form=\"infix\" lspace=\"0em\">=</mo><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑟</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><msub><mi>𝑡</mi><mn>1</mn></msub><mo form=\"postfix\" stretchy=\"false\">)</mo><mo form=\"prefix\" stretchy=\"false\">(</mo><msub><mi>𝑡</mi><mi>𝑎</mi></msub><mo lspace=\"0em\" rspace=\"0em\">−</mo><msub><mi>𝑡</mi><mn>0</mn></msub><mo stretchy=\"false\">)</mo></mrow></msup><mo lspace=\"0.2222222222222222em\" rspace=\"0.2222222222222222em\">⋅</mo><msup><mi>𝑒</mi><mrow><mo>−</mo><mo form=\"prefix\" stretchy=\"false\">(</mo><mn>1</mn><mo lspace=\"0em\" rspace=\"0em\">−</mo><mi>𝜆</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mi>𝑟</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><msub><mi>𝑡</mi><mn>2</mn></msub><mo form=\"postfix\" stretchy=\"false\">)</mo><mo form=\"prefix\" stretchy=\"false\">(</mo><msub><mi>𝑡</mi><mi>𝑎</mi></msub><mo lspace=\"0em\" rspace=\"0em\">−</mo><msub><mi>𝑡</mi><mn>0</mn></msub><mo stretchy=\"false\">)</mo></mrow></msup></math><h3>Cubic Spline Interpolation</h3><p>Given n zero rates of n distinct maturities,</p><p>we will denote jth maturity and zero rate pair, which we will denote as</p><p><math><mo stretchy=\"false\">(</mo><msub><mi>𝑡</mi><mi>𝑗</mi></msub><mo>,</mo><msub><mi>𝑅</mi><mi>𝑗</mi></msub><mo stretchy=\"false\">)</mo></math> where <math><mi>𝑗</mi><mo>=</mo><mn>1</mn><mo>,</mo><mn>2</mn><mo>,</mo><mi>…</mi><mo>,</mo><mi>𝑛</mi></math></p><p>The idea is to use such polynomials</p><p>How many can we create? n-1 cubic polynomials.</p><p>These polynomials will have different coefficients</p><math display=\"block\"><mi>𝑅</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mn>0</mn><mo>,</mo><mi>𝑡</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mrow><mo>{</mo><mtable class=\"cases\"><mtr><mtd><msub><mi>𝛽</mi><mrow><mn>1</mn><mo rspace=\"0em\">,</mo><mn>0</mn></mrow></msub><mo>+</mo><msub><mi>𝛽</mi><mrow><mn>1</mn><mo rspace=\"0em\">,</mo><mn>1</mn></mrow></msub><mi>𝑡</mi><mo>+</mo><msub><mi>𝛽</mi><mrow><mn>1</mn><mo rspace=\"0em\">,</mo><mn>2</mn></mrow></msub><msup><mi>𝑡</mi><mn>2</mn></msup><mo>+</mo><msub><mi>𝛽</mi><mrow><mn>1</mn><mo rspace=\"0em\">,</mo><mn>3</mn></mrow></msub><msup><mi>𝑡</mi><mn>3</mn></msup></mtd><mtd><mi>𝑡</mi><mo>∈</mo><mo form=\"prefix\" stretchy=\"false\">[</mo><msub><mi>𝑡</mi><mn>1</mn></msub><mo>,</mo><msub><mi>𝑡</mi><mn>2</mn></msub><mo stretchy=\"false\">]</mo></mtd></mtr><mtr><mtd><msub><mi>𝛽</mi><mrow><mn>2</mn><mo rspace=\"0em\">,</mo><mn>0</mn></mrow></msub><mo>+</mo><msub><mi>𝛽</mi><mrow><mn>2</mn><mo rspace=\"0em\">,</mo><mn>1</mn></mrow></msub><mi>𝑡</mi><mo>+</mo><msub><mi>𝛽</mi><mrow><mn>2</mn><mo rspace=\"0em\">,</mo><mn>2</mn></mrow></msub><msup><mi>𝑡</mi><mn>2</mn></msup><mo>+</mo><msub><mi>𝛽</mi><mrow><mn>2</mn><mo rspace=\"0em\">,</mo><mn>3</mn></mrow></msub><msup><mi>𝑡</mi><mn>3</mn></msup></mtd><mtd><mi>𝑡</mi><mo>∈</mo><mo form=\"prefix\" stretchy=\"false\">[</mo><msub><mi>𝑡</mi><mn>2</mn></msub><mo>,</mo><msub><mi>𝑡</mi><mn>3</mn></msub><mo stretchy=\"false\">]</mo></mtd></mtr><mtr><mtd><mspace width=\"0.2222em\"></mspace><msub><mi>𝛽</mi><mrow><mi>𝑛</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn><mo rspace=\"0em\">,</mo><mn>0</mn></mrow></msub><mo>+</mo><msub><mi>𝛽</mi><mrow><mi>𝑛</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn><mo rspace=\"0em\">,</mo><mn>1</mn></mrow></msub><mi>𝑡</mi><mo>+</mo><msub><mi>𝛽</mi><mrow><mi>𝑛</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn><mo rspace=\"0em\">,</mo><mn>2</mn></mrow></msub><msup><mi>𝑡</mi><mn>2</mn></msup><mo>+</mo><msub><mi>𝛽</mi><mrow><mi>𝑛</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn><mo rspace=\"0em\">,</mo><mn>3</mn></mrow></msub><msup><mi>𝑡</mi><mn>3</mn></msup></mtd><mtd><mi>𝑡</mi><mo>∈</mo><mo form=\"prefix\" stretchy=\"false\">[</mo><msub><mi>𝑡</mi><mrow><mi>𝑛</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></msub><mo>,</mo><msub><mi>𝑡</mi><mi>𝑛</mi></msub><mo stretchy=\"false\">]</mo></mtd></mtr></mtable></mrow></math><p>That’s the system, but how do we solve it?</p><p>What might be the problem with this?</p><p>Right now we have four parameters, and it’s 4 * (n-1). 4n-4 unknowns, n-1 determinants, so this is an undetermined system. We don’t have information in this system.</p><p>We can add some more information. The curve is continuous, so we can say that each part should be equal. Skipping some steps, we can say that</p><p>If R(0, t) is continuous and twice differentiable in t,</p><p>then n - 1 equations simplifies to (in a more compact form)</p><p>observed at time 0, maturity t</p><math display=\"block\"><mi>𝑅</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mn>0</mn><mo>,</mo><mi>𝑡</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mi>𝑎</mi><mo>+</mo><mi>𝑏</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑡</mi><mo>−</mo><msub><mi>𝑡</mi><mn>1</mn></msub><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>+</mo><mi>𝑐</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑡</mi><mo>−</mo><msub><mi>𝑡</mi><mn>1</mn></msub><msup><mo form=\"postfix\" stretchy=\"false\">)</mo><mn>2</mn></msup><mo>+</mo><munderover><mo form=\"prefix\" lspace=\"0em\">∑</mo><mrow><mi>𝑘</mi><mo lspace=\"0em\" rspace=\"0em\">=</mo><mn>1</mn></mrow><mrow><mi>𝑛</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></munderover><msub><mi>𝑑</mi><mi>𝑘</mi></msub><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑡</mi><mo>−</mo><msub><mi>𝑡</mi><mi>𝑘</mi></msub><msubsup><mo stretchy=\"false\">)</mo><mo>+</mo><mn>3</mn></msubsup></math><p>This is dependent on the value of t, obviously.</p><p>Let’s say you have a value of t in between t_2 and t_3.</p><math display=\"block\"><munderover><mo lspace=\"0em\">∑</mo><mrow><mi>𝑘</mi><mo lspace=\"0em\" rspace=\"0em\">=</mo><mn>1</mn></mrow><mrow><mi>𝑛</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></munderover><msub><mi>𝑑</mi><mi>𝑘</mi></msub><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑡</mi><mo>−</mo><msub><mi>𝑡</mi><mi>𝑘</mi></msub><msubsup><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>+</mo><mn>3</mn></msubsup><mo>=</mo><msub><mi>𝑑</mi><mn>1</mn></msub><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑡</mi><mo>−</mo><msub><mi>𝑡</mi><mn>1</mn></msub><msubsup><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>+</mo><mn>3</mn></msubsup><mo>+</mo><msub><mi>𝑑</mi><mn>2</mn></msub><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑡</mi><mo>−</mo><msub><mi>𝑡</mi><mn>2</mn></msub><msubsup><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>+</mo><mn>3</mn></msubsup><mo>+</mo><msub><mi>𝑑</mi><mn>3</mn></msub><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑡</mi><mo>−</mo><msub><mi>𝑡</mi><mn>3</mn></msub><msubsup><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>+</mo><mn>3</mn></msubsup><mo>+</mo><mi>…</mi></math><p>The first two terms will have positive values, and the rest will be 0</p><p>Now we’ve restricted our unknowns to a, b, c, and the discount factor <math><msub><mi>𝑑</mi><mi>𝑞</mi></msub><mo>,</mo><msub><mi>𝑑</mi><mn>2</mn></msub><mo>,</mo><mi>…</mi><msub><mi>𝑑</mi><mrow><mi>𝑛</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></msub></math> which is n + 2 unknowns with n discrete rates. This is still not fully determined.</p><p>You may see different results in different implementations based on the next steps, in Python or R.</p><p>We need two more conditions. It depends on the problem. Typically, there are conditions that make sense.</p><p>The first derivative at the ends of the intervals, we can make the assumption that the convexity is 0 right at the end of the intervals.</p><math display=\"block\"><munder><mo lspace=\"0em\" rspace=\"0.16666666666666666em\">lim</mo><mrow><mi>𝑡</mi><mo lspace=\"0em\" rspace=\"0em\" stretchy=\"false\">→</mo><msub><mi>𝑡</mi><mn>1</mn></msub></mrow></munder><msup><mi>𝑅</mi><mo>″</mo></msup><mo form=\"prefix\" stretchy=\"false\">(</mo><mn>0</mn><mo>,</mo><mi>𝑡</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mn>0</mn></math><p>This counts as two conditions because it’s left and right.</p><p>Then you have n + 2 linear equations and n + 2 unknowns. Now we are fully determined. The solution is very easy to obtain 😏</p><p>Let’s take the vector</p><p>R_1 is going to correspond to t_1</p><p>Then you have to take the second order derivative, so what do you get for c? First derivative is 2c</p><p>In another way, you could write this as</p><math display=\"block\"><mrow><mo>[</mo><mtable><mtr><mtd><msub><mi>𝑅</mi><mn>1</mn></msub></mtd></mtr><mtr><mtd><msub><mi>𝑅</mi><mn>2</mn></msub></mtd></mtr><mtr><mtd><mi>⋮</mi></mtd></mtr><mtr><mtd><msub><mi>𝑅</mi><mi>𝑛</mi></msub></mtd></mtr><mtr><mtd><mn>0</mn></mtd></mtr><mtr><mtd><mn>0</mn></mtd></mtr></mtable><mo>]</mo></mrow><mo>=</mo><mi>𝐴</mi><mo lspace=\"0.2222222222222222em\" rspace=\"0.2222222222222222em\">⋅</mo><mrow><mo>[</mo><mtable><mtr><mtd><mi>𝑎</mi><mspace width=\"0.2222em\"></mspace><mi>𝑏</mi><mspace width=\"0.2222em\"></mspace><mi>𝑐</mi><mspace width=\"0.2222em\"></mspace><msub><mi>𝑑</mi><mn>1</mn></msub><mspace width=\"0.2222em\"></mspace><mi>⋮</mi><mspace width=\"0.2222em\"></mspace><msub><mi>𝑑</mi><mrow><mi>𝑛</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>3</mn></mrow></msub><mspace width=\"0.2222em\"></mspace><msub><mi>𝑑</mi><mrow><mi>𝑛</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>2</mn></mrow></msub><mspace width=\"0.2222em\"></mspace><msub><mi>𝑑</mi><mrow><mi>𝑛</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></msub></mtd></mtr></mtable><mo>]</mo></mrow></math><p>Which we can solve by inverting the matrix</p><math display=\"block\"><msup><mi>𝐴</mi><mrow><mo>−</mo><mn>1</mn></mrow></msup><mo lspace=\"0.2222222222222222em\" rspace=\"0.2222222222222222em\">⋅</mo><mrow><mo>[</mo><mtable><mtr><mtd><msub><mi>𝑅</mi><mn>1</mn></msub></mtd></mtr><mtr><mtd><msub><mi>𝑅</mi><mn>2</mn></msub></mtd></mtr><mtr><mtd><mi>⋮</mi></mtd></mtr><mtr><mtd><msub><mi>𝑅</mi><mi>𝑛</mi></msub></mtd></mtr><mtr><mtd><mn>0</mn></mtd></mtr><mtr><mtd><mn>0</mn></mtd></mtr></mtable><mo>]</mo></mrow><mo>=</mo><msup><mi>𝐴</mi><mrow><mo>−</mo><mn>1</mn></mrow></msup><mo lspace=\"0.2222222222222222em\" rspace=\"0.2222222222222222em\">⋅</mo><mi>𝐴</mi><mo lspace=\"0.2222222222222222em\" rspace=\"0.2222222222222222em\">⋅</mo><mrow><mo>[</mo><mtable><mtr><mtd><mi>𝑎</mi><mspace width=\"0.2222em\"></mspace><mi>𝑏</mi><mspace width=\"0.2222em\"></mspace><mi>𝑐</mi><mspace width=\"0.2222em\"></mspace><msub><mi>𝑑</mi><mn>1</mn></msub><mspace width=\"0.2222em\"></mspace><mi>⋮</mi><mspace width=\"0.2222em\"></mspace><msub><mi>𝑑</mi><mrow><mi>𝑛</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>3</mn></mrow></msub><mspace width=\"0.2222em\"></mspace><msub><mi>𝑑</mi><mrow><mi>𝑛</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>2</mn></mrow></msub><mspace width=\"0.2222em\"></mspace><msub><mi>𝑑</mi><mrow><mi>𝑛</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></msub></mtd></mtr></mtable><mo>]</mo></mrow></math><p>And then</p><math display=\"block\"><mrow><mo>[</mo><mtable><mtr><mtd><mi>𝑎</mi></mtd></mtr><mtr><mtd><mi>𝑏</mi></mtd></mtr><mtr><mtd><mi>𝑐</mi></mtd></mtr><mtr><mtd><msub><mi>𝑑</mi><mn>1</mn></msub></mtd></mtr><mtr><mtd><mi>⋮</mi></mtd></mtr><mtr><mtd><msub><mi>𝑑</mi><mrow><mi>𝑛</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>3</mn></mrow></msub></mtd></mtr><mtr><mtd><msub><mi>𝑑</mi><mrow><mi>𝑛</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>2</mn></mrow></msub></mtd></mtr><mtr><mtd><msub><mi>𝑑</mi><mrow><mi>𝑛</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></msub></mtd></mtr></mtable><mo>]</mo></mrow><mo>=</mo><msup><mi>𝐴</mi><mrow><mo>−</mo><mn>1</mn></mrow></msup><mo lspace=\"0.2222222222222222em\" rspace=\"0.2222222222222222em\">⋅</mo><mrow><mo>[</mo><mtable><mtr><mtd><msub><mi>𝑅</mi><mn>1</mn></msub></mtd></mtr><mtr><mtd><msub><mi>𝑅</mi><mn>2</mn></msub></mtd></mtr><mtr><mtd><mi>⋮</mi></mtd></mtr><mtr><mtd><msub><mi>𝑅</mi><mi>𝑛</mi></msub></mtd></mtr><mtr><mtd><mn>0</mn></mtd></mtr><mtr><mtd><mn>0</mn></mtd></mtr></mtable><mo>]</mo></mrow></math><p>We got the values in A by taking the second order derivative, and the limit approaching t_1</p><p>Explanation of derivatives</p><math display=\"block\"><mi>𝑅</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mn>0</mn><mo>,</mo><mi>𝑡</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mi>𝑎</mi><mo>+</mo><mi>𝑏</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑡</mi><mo>−</mo><msub><mi>𝑡</mi><mn>1</mn></msub><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>+</mo><mi>𝑐</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑡</mi><mo>−</mo><msub><mi>𝑡</mi><mn>1</mn></msub><msup><mo form=\"postfix\" stretchy=\"false\">)</mo><mn>2</mn></msup><mo>+</mo><munderover><mo form=\"prefix\" lspace=\"0em\">∑</mo><mrow><mi>𝑘</mi><mo lspace=\"0em\" rspace=\"0em\">=</mo><mn>1</mn></mrow><mrow><mi>𝑛</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></munderover><msub><mi>𝑑</mi><mi>𝑘</mi></msub><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑡</mi><mo>−</mo><msub><mi>𝑡</mi><mi>𝑘</mi></msub><msubsup><mo stretchy=\"false\">)</mo><mo>+</mo><mn>3</mn></msubsup></math><math display=\"block\"><msup><mi>𝑅</mi><mo>′</mo></msup><mo form=\"prefix\" stretchy=\"false\">(</mo><mn>0</mn><mo>,</mo><mi>𝑡</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mi>𝑏</mi><mo>+</mo><mn>2</mn><mi>𝑐</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑡</mi><mo>−</mo><msub><mi>𝑡</mi><mn>1</mn></msub><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>+</mo><munderover><mo form=\"prefix\" lspace=\"0em\">∑</mo><mrow><mi>𝑘</mi><mo lspace=\"0em\" rspace=\"0em\">=</mo><mn>1</mn></mrow><mrow><mi>𝑛</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></munderover><mn>3</mn><msub><mi>𝑑</mi><mi>𝑘</mi></msub><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑡</mi><mo>−</mo><msub><mi>𝑡</mi><mi>𝑘</mi></msub><msubsup><mo stretchy=\"false\">)</mo><mo>+</mo><mn>2</mn></msubsup></math><math display=\"block\"><msup><mi>𝑅</mi><mo>″</mo></msup><mo form=\"prefix\" stretchy=\"false\">(</mo><mn>0</mn><mo>,</mo><mi>𝑡</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mn>2</mn><mi>𝑐</mi><mo>+</mo><munderover><mo form=\"prefix\" lspace=\"0em\">∑</mo><mrow><mi>𝑘</mi><mo lspace=\"0em\" rspace=\"0em\">=</mo><mn>1</mn></mrow><mrow><mi>𝑛</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></munderover><mn>6</mn><msub><mi>𝑑</mi><mi>𝑘</mi></msub><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑡</mi><mo>−</mo><msub><mi>𝑡</mi><mi>𝑘</mi></msub><msub><mo stretchy=\"false\">)</mo><mo>+</mo></msub></math><p>Then the limit will show this collapse</p><math display=\"block\"><munder><mo lspace=\"0em\" rspace=\"0.16666666666666666em\">lim</mo><mrow><mi>𝑡</mi><mo lspace=\"0em\" rspace=\"0em\" stretchy=\"false\">→</mo><msub><mi>𝑡</mi><mn>1</mn></msub></mrow></munder><msup><mi>𝑅</mi><mo>″</mo></msup><mo form=\"prefix\" stretchy=\"false\">(</mo><mn>0</mn><mo>,</mo><mi>𝑡</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mn>2</mn><mi>𝑐</mi></math><math display=\"block\"><munder><mo lspace=\"0em\" rspace=\"0.16666666666666666em\">lim</mo><mrow><mi>𝑡</mi><mo lspace=\"0em\" rspace=\"0em\" stretchy=\"false\">→</mo><msub><mi>𝑡</mi><mi>𝑛</mi></msub></mrow></munder><msup><mi>𝑅</mi><mo>″</mo></msup><mo form=\"prefix\" stretchy=\"false\">(</mo><mn>0</mn><mo>,</mo><mi>𝑡</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mn>2</mn><mi>𝑐</mi><mo>+</mo><mn>6</mn><msub><mi>𝑑</mi><mn>1</mn></msub><mo form=\"prefix\" stretchy=\"false\">(</mo><msub><mi>𝑡</mi><mi>𝑛</mi></msub><mo>−</mo><msub><mi>𝑡</mi><mn>1</mn></msub><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>+</mo><mn>6</mn><msub><mi>𝑑</mi><mn>2</mn></msub><mo form=\"prefix\" stretchy=\"false\">(</mo><msub><mi>𝑡</mi><mi>𝑛</mi></msub><mo>−</mo><msub><mi>𝑡</mi><mn>2</mn></msub><mo form=\"postfix\" stretchy=\"false\">)</mo><mi>…</mi></math><p>But the matrix is a more elegant form.</p><p>This particular function will pass through all of these points, and it will be a beautiful curve.</p><h3>Functional Form of Yield Curve</h3><p>In general, if coupon bonds are available, then use the functional form</p><p>We’re going to look at three popular models:</p><h4>Nelson-Siegel Model</h4><p>This is no longer an interpolation function, it’s more of a fitting function.</p><p>We will write the specification and the characteristics for this function, and understand the procedure</p><math display=\"block\"><mi>𝑅</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mn>0</mn><mo>,</mo><mi>𝑡</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><msub><mi>𝛽</mi><mn>0</mn></msub><mo>+</mo><msub><mi>𝛽</mi><mn>1</mn></msub><mrow><mo>(</mo><mfrac><mrow><mn>1</mn><mo>−</mo><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑡</mi></mrow></msup></mrow><mrow><mi>𝜆</mi><mi>𝑡</mi></mrow></mfrac><mo>)</mo></mrow><mo>+</mo><msub><mi>𝛽</mi><mn>2</mn></msub><mrow><mo>(</mo><mrow><mfrac><mrow><mn>1</mn><mo>−</mo><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑡</mi></mrow></msup></mrow><mrow><mi>𝜆</mi><mi>𝑡</mi></mrow></mfrac><mo>−</mo><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑡</mi></mrow></msup></mrow><mo>)</mo></mrow></math><p>where we have <math><msub><mi>𝛽</mi><mn>0</mn></msub><mo>,</mo><msub><mi>𝛽</mi><mn>1</mn></msub><mo>,</mo><msub><mi>𝛽</mi><mn>2</mn></msub></math> constants and <math><mi>𝜆</mi><mo>&gt;</mo><mn>0</mn></math> to specification. This is finding four parameters.</p><p>This particular function has some characteristics, we can look at these.</p><math display=\"block\"><munder><mo lspace=\"0em\" rspace=\"0.16666666666666666em\">lim</mo><mrow><mi>𝑡</mi><mo lspace=\"0em\" rspace=\"0em\" stretchy=\"false\">→</mo><mi>∞</mi></mrow></munder><mi>𝑅</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mn>0</mn><mo>,</mo><mi>𝑡</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><msub><mi>𝛽</mi><mn>0</mn></msub></math><p>If you take a longer maturity, it goes to a constant. So <math><msub><mi>𝛽</mi><mn>0</mn></msub></math> should be associated with the long-term interest rate, like the level of it. Before that, it has some curvature. What about at 0?</p><p>Well, you would end up a 0/0, so you can apply L’Hopital’s rule.</p><math display=\"block\"><munder><mo lspace=\"0em\" rspace=\"0em\">lim</mo><mrow><mi>𝑡</mi><mo lspace=\"0em\" rspace=\"0em\" stretchy=\"false\">→</mo><mn>0</mn></mrow></munder><mo>=</mo><msub><mi>𝛽</mi><mn>0</mn></msub><mo>+</mo><munder><mo form=\"prefix\" lspace=\"0em\" rspace=\"0.16666666666666666em\">lim</mo><mrow><mi>𝑡</mi><mo lspace=\"0em\" rspace=\"0em\" stretchy=\"false\">→</mo><mn>0</mn></mrow></munder><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑡</mi></mrow></msup><mo>+</mo><msub><mi>𝛽</mi><mn>2</mn></msub><munder><mo form=\"prefix\" lspace=\"0.16666666666666666em\" rspace=\"0em\">lim</mo><mrow><mi>𝑡</mi><mo lspace=\"0em\" rspace=\"0em\" stretchy=\"false\">→</mo><mn>0</mn></mrow></munder><mo form=\"prefix\" stretchy=\"false\">(</mo><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑡</mi></mrow></msup><mo>−</mo><mn>1</mn><mo stretchy=\"false\">)</mo></math><math display=\"block\"><mo form=\"infix\" lspace=\"0em\">=</mo><msub><mi>𝛽</mi><mn>0</mn></msub><mo>+</mo><msub><mi>𝛽</mi><mn>1</mn></msub></math><p>This is the spot interest rate, at t = 0.</p><p>Level Slope Curvature represent the three betas.</p><p>We have a numerical example just to see</p><h5>Example</h5><p>Assume that there are N coupon bonds.</p><p>For i = 1, 2, \\ldots N, the ith bond has the following specification</p><p>B_i = cash(dirty) price of bond</p><p>m_i = remaining number of coupon payments</p><p>These bonds have different maturities, and they may have different specifications in the coupon payments (frequency and amount)</p><p>t_i^j = coupon payment date for j = 1, \\ldots m_i</p><p>t_i^1 = date of next coupon payment</p><p>t_i^{m_i} = maturity date and date of last coupon</p><math display=\"block\"><msub><mi>𝛿</mi><mi>𝑖</mi></msub><mo>=</mo><msubsup><mi>𝑡</mi><mi>𝑖</mi><mrow><mi>𝑗</mi><mo lspace=\"0em\" rspace=\"0em\">+</mo><mn>1</mn></mrow></msubsup><mo>−</mo><msubsup><mi>𝑡</mi><mi>𝑖</mi><mi>𝑗</mi></msubsup></math><p>P_i = principal</p><p>C_i (amount of each coupon) = <math><msub><mi>𝛿</mi><mi>𝑖</mi></msub><msub><mi>𝑃</mi><mi>𝑖</mi></msub><mo lspace=\"0.2222222222222222em\" rspace=\"0.2222222222222222em\">⋅</mo><mi>𝐶</mi><mi>𝑜</mi><mi>𝑢</mi><mi>𝑝</mi><mi>𝑜</mi><mi>𝑛</mi><mi>𝑅</mi><mi>𝑎</mi><mi>𝑡</mi><mi>𝑒</mi></math></p><p>B_i = Market Quote (Clean Price) + <math><msub><mi>𝐶</mi><mi>𝑖</mi></msub><mfrac><mrow><msub><mi>𝛿</mi><mi>𝑖</mi></msub><mo lspace=\"0em\" rspace=\"0em\">−</mo><msubsup><mi>𝑡</mi><mi>𝑖</mi><mn>1</mn></msubsup></mrow><msub><mi>𝛿</mi><mi>𝑖</mi></msub></mfrac></math> (Accrual of Interest)</p><p>Theoretical Price:</p><math display=\"block\"><mover accent=\"true\"><msub><mi>𝐵</mi><mi>𝑖</mi></msub><mo>̂</mo></mover><mo>=</mo><munderover><mo form=\"prefix\" lspace=\"0em\">∑</mo><mrow><mi>𝑗</mi><mo lspace=\"0em\" rspace=\"0em\">=</mo><mn>1</mn></mrow><msub><mi>𝑚</mi><mi>𝑖</mi></msub></munderover><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝑅</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mn>0</mn><mo rspace=\"0em\">,</mo><msubsup><mi>𝑡</mi><mi>𝑖</mi><mi>𝑗</mi></msubsup><mo form=\"postfix\" stretchy=\"false\">)</mo><mo lspace=\"0em\" rspace=\"0em\">⋅</mo><msubsup><mi>𝑡</mi><mi>𝑖</mi><mi>𝑗</mi></msubsup></mrow></msup><mo lspace=\"0.2222222222222222em\" rspace=\"0.2222222222222222em\">⋅</mo><msub><mi>𝐶</mi><mi>𝑖</mi></msub><mo>+</mo><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑇</mi><mi>ℎ</mi><mi>𝑒</mi><mi>𝑛</mi><mi>𝐷</mi><mi>𝑖</mi><mi>𝑠</mi><mi>𝑐</mi><mi>𝑜</mi><mi>𝑢</mi><mi>𝑛</mi><mi>𝑡</mi><mi>𝑃</mi><mi>𝑟</mi><mi>𝑖</mi><mi>𝑛</mi><mi>𝑐</mi><mi>𝑖</mi><mi>𝑝</mi><mi>𝑎</mi><mi>𝑙</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝑅</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mn>0</mn><mo rspace=\"0em\">,</mo><msubsup><mi>𝑡</mi><mi>𝑖</mi><msub><mi>𝑚</mi><mi>𝑖</mi></msub></msubsup><mo form=\"postfix\" stretchy=\"false\">)</mo><mo lspace=\"0em\" rspace=\"0em\">⋅</mo><msubsup><mi>𝑡</mi><mi>𝑖</mi><msub><mi>𝑚</mi><mi>𝑖</mi></msub></msubsup></mrow></msup><mo lspace=\"0.2222222222222222em\" rspace=\"0.2222222222222222em\">⋅</mo><msub><mi>𝑃</mi><mi>𝑖</mi></msub></math><p>Basically you can calculate this for all bonds.</p><p>If you want to write this as an optimization problem, we want to find</p><p><math><msub><mi>𝛽</mi><mn>0</mn></msub><mo>,</mo><msub><mi>𝛽</mi><mn>1</mn></msub><mo>,</mo><msub><mi>𝛽</mi><mn>2</mn></msub><mo>,</mo><mi>𝜆</mi></math> that minimizes</p><math display=\"block\"><munderover><mo lspace=\"0em\">∑</mo><mrow><mi>𝑖</mi><mo lspace=\"0em\" rspace=\"0em\">=</mo><mn>1</mn></mrow><mi>𝑁</mi></munderover><msub><mi>𝑤</mi><mi>𝑖</mi></msub><mo form=\"prefix\" stretchy=\"false\">(</mo><mover accent=\"true\"><msub><mi>𝐵</mi><mi>𝑖</mi></msub><mo>̂</mo></mover><mo>−</mo><msub><mi>𝐵</mi><mi>𝑖</mi></msub><msup><mo stretchy=\"false\">)</mo><mn>2</mn></msup></math><p>that satisfies</p><math display=\"block\"><mo stretchy=\"false\">{</mo><msub><mi>𝛽</mi><mn>0</mn></msub><mo>&gt;</mo><mn>0</mn><mspace width=\"0.2222em\"></mspace><msub><mi>𝛽</mi><mn>0</mn></msub><mo>+</mo><msub><mi>𝛽</mi><mn>1</mn></msub><mo>&gt;</mo><mn>0</mn><mspace width=\"0.2222em\"></mspace><mi>𝜆</mi><mo>&gt;</mo><mn>0</mn></math><p>This w_i item is the weight assigned to bond i, if you want to equally weight them then it’s 1.</p><p>Choices for w_i:</p><ul><li>w_i = <math><mfrac><mn>1</mn><msubsup><mi>𝑡</mi><mi>𝑖</mi><msub><mi>𝑚</mi><mi>𝑖</mi></msub></msubsup></mfrac></math> This one is a function of maturity, so longer maturity will have smaller weights. This will fit better on shorter maturity than longer maturity.</li><li>w_i =<math><mo>−</mo><mfrac><mn>1</mn><msub><mi>𝐵</mi><mi>𝑖</mi></msub></mfrac><mo lspace=\"0.2222222222222222em\" rspace=\"0.2222222222222222em\">⋅</mo><mfrac><mrow><mi>𝜕</mi><msub><mi>𝐵</mi><mi>𝑖</mi></msub></mrow><mrow><mi>𝜕</mi><mi>𝑌</mi><mi>𝑇</mi><mi>𝑀</mi></mrow></mfrac></math> This one is dependent on the duration of the bond</li></ul><h3>Siegel-Svensson</h3><p>Adds a second hump term (2 possible maximaminima</p><p>Let R(0, t) be the zero rate for maturity t, then</p><math display=\"block\"><mi>𝑅</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mn>0</mn><mo>,</mo><mi>𝑡</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><msub><mi>𝛽</mi><mn>0</mn></msub><mo>+</mo><msub><mi>𝛽</mi><mn>1</mn></msub><mrow><mo>(</mo><mfrac><mrow><mn>1</mn><mo>−</mo><msup><mi>𝑒</mi><mrow><mo>−</mo><msub><mi>𝜆</mi><mn>1</mn></msub><mi>𝑡</mi></mrow></msup></mrow><mrow><msub><mi>𝜆</mi><mn>1</mn></msub><mi>𝑡</mi></mrow></mfrac><mo>)</mo></mrow><mo>+</mo><msub><mi>𝛽</mi><mn>2</mn></msub><mrow><mo>(</mo><mrow><mfrac><mrow><mn>1</mn><mo>−</mo><msup><mi>𝑒</mi><mrow><mo>−</mo><msub><mi>𝜆</mi><mn>1</mn></msub><mi>𝑡</mi></mrow></msup></mrow><mrow><msub><mi>𝜆</mi><mn>1</mn></msub><mi>𝑡</mi></mrow></mfrac><mo>−</mo><msup><mi>𝑒</mi><mrow><mo>−</mo><msub><mi>𝜆</mi><mn>1</mn></msub><mi>𝑡</mi></mrow></msup></mrow><mo>)</mo></mrow><mo>+</mo><msub><mi>𝛽</mi><mn>3</mn></msub><mrow><mo>(</mo><mrow><mfrac><mrow><mn>1</mn><mo>−</mo><msup><mi>𝑒</mi><mrow><mo>−</mo><msub><mi>𝜆</mi><mn>2</mn></msub><mi>𝑡</mi></mrow></msup></mrow><mrow><msub><mi>𝜆</mi><mn>2</mn></msub><mi>𝑡</mi></mrow></mfrac><mo>−</mo><msup><mi>𝑒</mi><mrow><mo>−</mo><msub><mi>𝜆</mi><mn>2</mn></msub><mi>𝑡</mi></mrow></msup></mrow><mo>)</mo></mrow></math><p>We have some constraints:</p><math display=\"block\"><mo stretchy=\"false\">{</mo><msub><mi>𝛽</mi><mn>0</mn></msub><mo>&gt;</mo><mn>0</mn><mspace width=\"0.2222em\"></mspace><msub><mi>𝛽</mi><mn>0</mn></msub><mo>+</mo><msub><mi>𝛽</mi><mn>1</mn></msub><mo>&gt;</mo><mn>0</mn><mspace width=\"0.2222em\"></mspace><msub><mi>𝜆</mi><mn>1</mn></msub><mo>,</mo><msub><mi>𝜆</mi><mn>2</mn></msub><mo>&gt;</mo><mn>0</mn></math><p>The optimization problem for the previous problem was for price of the bonds. But otherwise we can write it as</p><p>We have the factor function, then the fitting function, then the objective function. That’s how you get Nelson-Siegel.</p><p>For the optimization methods, there are some characteristics,</p><p>constrOptim.nl is what he uses</p><p>estimates</p><h3>Smith-Wilson</h3><p>Generates a smoothed interpolated and extrapolated term structures that fit the spot market rates.</p><p>has simplicity, works for low number of market data points but performance</p><p>This going to work like an interpolation, but it also extrapolates for longer maturities.</p><p>Parameters:</p><p>UFR: ultra long-term forward rate</p><p>LLP: last liquid point, where the zero coupon market support ends (e.g.&nbsp;20 years)</p><p>CP: Convergence</p><h3>Assignment</h3><p>This homework is due in two weeks. The first problem is similar to what we did last time, given some cash flows from different bonds, fill in the curve.</p><p>Determine the forward curve, bump it, and then if you change it, what’s the change? If you have 10 years, you have 10 such cases, bump for each year.</p>","contentSourceFormat":"typst","contentTypst":"== From Last Time\n<from-last-time>\nWe started to look at interest rates. In the first part we're going to discuss various interpolation methods, functions that are useful for modeling the yield curve.\n\nThat's useful because many times you might have to discount or use forward rates or discount factors for maturities that are not available. For this reason you have to do some interpolation.\n\n== Yield Curve Interpolation Methods\n<yield-curve-interpolation-methods>\nWhat do we want to achieve?\n\nIn general, the interpolation problem can be expressed in the following format:\n\n- given some data as a function of time $t_1\\,t_2\\,dots.h\\,t_n$ and $x_1\\,x_2\\,dots.h\\,x_n$ known\n- construct a continuous function $x\\(t\\)$ that satisfies $x\\(t_i\\)= x_i$ for $i = 1\\,2\\,dots.h\\,n$\n\nWhat does it mean that the function is continuous? It means that at all points, the limit on left and right is the same, and that it passes through all points.\n\n== Criteria for choosing the Interpolation Method\n<criteria-for-choosing-the-interpolation-method>\n- Smoothness of the forward curve is desirable\n\nWhat does this mean? The derivative should be continuous i.e.~it should be differentiable. If the model has smooth curves, it should be more accurate because there's no reason to have rough changes in curvature.\n\n- How local is the interpolation method?\n\nIf an input changes, does the interpolation function change locally or globally? Simple interpolation, linear interpolation have a local impact. Typically, each input just changes\n\nIt's good to have interpolation that impacts globally, but maybe not with very high sensitivity.\n\n- Are the forwards not only continuous, but also stable?\n\nThe #strong[degree of stability] is the maximum basis point change in the forward curve given a basis point change in move in input (???? look this up)\n\n== Linear Methods\n<linear-methods>\nLet's graph t against r\n\nFor $t_(i - 1) < t < t_i$ (this is the general case for local interpolation\n\n$ r\\(t\\)= frac(t - t_(i - 1), t_i - t_(i - 1)) dot.op r_i + frac(t_i - t, t_i - t_(i - 1)) dot.op r_(i - 1) $\n\nThis is a simple rate from drawing a straight line between two points and picking the rate that corresponds to time\n\nWhat is important for this class is to have consistent curves, to prevent arbitrage.\n\nIf this is the rate, how do we get the forward?\n\nThe price of a zero coupon bond is the continuously discounted forward rate\n\n$ P\\(0\\,t_1\\,t_2\\)= e^(- f\\(0\\,t_1\\,t_2\\)dot.op\\(t_2 - t_1\\)) $\n\nThen the forward rate is just the natural log of this scaled to time\n\n$ f\\(0\\,t_1\\,t_2\\)= - frac(ln P\\(0\\,t_1\\,t_2\\), t_2 - t_1) $\n\nZero coupon bonds can also be determined in this way.\n\n$ f\\(0\\,t_1\\,t_2\\)= - frac(ln P\\(0\\,t_2\\)- ln P\\(0\\,t_1\\), t_2 - t_1) $\n\nIn the limit, we can use the derivative\n\n$ f\\(t\\)= - frac(d, d t) ln P\\(t\\)- frac(d, d t)\\[r\\(t\\)dot.op t\\] $\n\nSo this is the relationship between the forward and the zero rate r(t) Now we can determine a consistent forward. Therefore f(t) is the derivative rate of this product\n\n$ f\\(t\\)= r\\(t\\)+ t r'\\(t\\) $\n\nSo if you take such derivatives, you can substitute the formula for the instantaneous forward.\n\n$ f\\(t\\)= frac(\\(2 t - t_(i - 1)\\)r_i +\\(t_i - 2 t\\)r_(i - 1), t_i - t_(i - 1)) $\n\nThis is linear, so you can do a function which is linear in log rates if you prefer\n\n== Linear in log rates\n<linear-in-log-rates>\n$ ln\\(r\\(t\\)\\)= frac(t - t_(i - 1), t_i - t_(i - 1)) ln\\(r_i\\)+ frac(t - t_(i - 1), t_i - t_(i - 1)) dot.op ln\\(r_(i - 1)\\) $\n\nSo this is kind of a linear interpolation between two points, but in general these curves are not linear, they have some curvature\n\n== Exponential Interpolation\n<exponential-interpolation>\nThe discount factors are\n\n$ d\\(t_1\\)= e^(- r_1\\(t_1 - t_0\\)) $\n\n$ d\\(t_2\\)= e^(- r_2\\(t_2 - t_0\\)) $\n\nThis is exponential interpolation for the discount curve, which will give us\n\n$ r_1 = - frac(ln d\\(t_1\\), t_1 - t_0) $\n\n$ r_2 = - frac(ln d\\(t_2\\), t_2 - t_0) $\n\nThen we define\n\n$ r\\(t_a\\)= lambda r\\(t_1\\)+\\(1 - lambda\\)r\\(t_2\\) $\n\nNow we're going to calculate the discount factor\n\n$ d\\(t_a\\)= e^(- r\\(t_a\\)\\(t_a - t_0\\)) = e^(- (lambda r \\( t_1 \\) + \\( 1 - lambda \\) r \\( t_2 \\)) (t_a - t_0)) $\n\n$ = e^(- lambda r\\(t_1\\)\\(t_a - t_0\\)) dot.op e^(-\\(1 - lambda\\)r\\(t_2\\)\\(t_a - t_0\\)) $\n\n== Cubic Spline Interpolation\n<cubic-spline-interpolation>\nGiven n zero rates of n distinct maturities,\n\nwe will denote jth maturity and zero rate pair, which we will denote as\n\n$\\(t_j\\,R_j\\)$ where $j = 1\\,2\\,dots.h\\,n$\n\nThe idea is to use such polynomials\n\nHow many can we create? n-1 cubic polynomials.\n\nThese polynomials will have different coefficients\n\n$ R\\(0\\,t\\)= cases(delim: \"{\", beta_(1\\,0) + beta_(1\\,1) t + beta_(1\\,2) t^2 + beta_(1\\,3) t^3 & t in\\[t_1\\,t_2\\], beta_(2\\,0) + beta_(2\\,1) t + beta_(2\\,2) t^2 + beta_(2\\,3) t^3 & t in\\[t_2\\,t_3\\], med beta_(n - 1\\,0) + beta_(n - 1\\,1) t + beta_(n - 1\\,2) t^2 + beta_(n - 1\\,3) t^3 & t in\\[t_(n - 1)\\,t_n\\]) $\n\nThat's the system, but how do we solve it?\n\nWhat might be the problem with this?\n\nRight now we have four parameters, and it's 4 \\* (n-1). 4n-4 unknowns, n-1 determinants, so this is an undetermined system. We don't have information in this system.\n\nWe can add some more information. The curve is continuous, so we can say that each part should be equal. Skipping some steps, we can say that\n\nIf R(0, t) is continuous and twice differentiable in t,\n\nthen n - 1 equations simplifies to (in a more compact form)\n\nobserved at time 0, maturity t\n\n$ R\\(0\\,t\\)= a + b\\(t - t_1\\)+ c\\(t - t_1\\)^2+ sum_(k = 1)^(n - 1) d_k\\(t - t_k\\)_(+)^3 $\n\nThis is dependent on the value of t, obviously.\n\nLet's say you have a value of t in between t\\_2 and t\\_3.\n\n$ sum_(k = 1)^(n - 1) d_k\\(t - t_k\\)_(+)^3= d_1\\(t - t_1\\)_(+)^3+ d_2\\(t - t_2\\)_(+)^3+ d_3\\(t - t_3\\)_(+)^3+ dots.h $\n\nThe first two terms will have positive values, and the rest will be 0\n\nNow we've restricted our unknowns to a, b, c, and the discount factor $d_q\\,d_2\\,dots.h d_(n - 1)$ which is n + 2 unknowns with n discrete rates. This is still not fully determined.\n\nYou may see different results in different implementations based on the next steps, in Python or R.\n\nWe need two more conditions. It depends on the problem. Typically, there are conditions that make sense.\n\nThe first derivative at the ends of the intervals, we can make the assumption that the convexity is 0 right at the end of the intervals.\n\n$ lim_(t arrow.r t_1) R''\\(0\\,t\\)= 0 $\n\nThis counts as two conditions because it's left and right.\n\nThen you have n + 2 linear equations and n + 2 unknowns. Now we are fully determined. The solution is very easy to obtain 😏\n\nLet's take the vector\n\nR\\_1 is going to correspond to t\\_1\n\nThen you have to take the second order derivative, so what do you get for c? First derivative is 2c\n\nIn another way, you could write this as\n\n$ mat(delim: \"[\", R_1; R_2; dots.v; R_n; 0; 0) = A dot.op mat(delim: \"[\", a med b med c med d_1 med dots.v med d_(n - 3) med d_(n - 2) med d_(n - 1)) $\n\nWhich we can solve by inverting the matrix\n\n$ A^(- 1) dot.op mat(delim: \"[\", R_1; R_2; dots.v; R_n; 0; 0) = A^(- 1) dot.op A dot.op mat(delim: \"[\", a med b med c med d_1 med dots.v med d_(n - 3) med d_(n - 2) med d_(n - 1)) $\n\nAnd then\n\n$ mat(delim: \"[\", a; b; c; d_1; dots.v; d_(n - 3); d_(n - 2); d_(n - 1)) = A^(- 1) dot.op mat(delim: \"[\", R_1; R_2; dots.v; R_n; 0; 0) $\n\nWe got the values in A by taking the second order derivative, and the limit approaching t\\_1\n\nExplanation of derivatives\n\n$ R\\(0\\,t\\)= a + b\\(t - t_1\\)+ c\\(t - t_1\\)^2+ sum_(k = 1)^(n - 1) d_k\\(t - t_k\\)_(+)^3 $\n\n$ R'\\(0\\,t\\)= b + 2 c\\(t - t_1\\)+ sum_(k = 1)^(n - 1) 3 d_k\\(t - t_k\\)_(+)^2 $\n\n$ R''\\(0\\,t\\)= 2 c + sum_(k = 1)^(n - 1) 6 d_k\\(t - t_k\\)_(+) $\n\nThen the limit will show this collapse\n\n$ lim_(t arrow.r t_1) R''\\(0\\,t\\)= 2 c $\n\n$ lim_(t arrow.r t_n) R''\\(0\\,t\\)= 2 c + 6 d_1\\(t_n - t_1\\)+ 6 d_2\\(t_n - t_2\\)dots.h $\n\nBut the matrix is a more elegant form.\n\nThis particular function will pass through all of these points, and it will be a beautiful curve.\n\n== Functional Form of Yield Curve\n<functional-form-of-yield-curve>\nIn general, if coupon bonds are available, then use the functional form\n\nWe're going to look at three popular models:\n\n=== Nelson-Siegel Model\n<nelson-siegel-model>\nThis is no longer an interpolation function, it's more of a fitting function.\n\nWe will write the specification and the characteristics for this function, and understand the procedure\n\n$ R\\(0\\,t\\)= beta_0 + beta_1 (frac(1 - e^(- lambda t), lambda t)) + beta_2 (frac(1 - e^(- lambda t), lambda t) - e^(- lambda t)) $\n\nwhere we have $beta_0\\,beta_1\\,beta_2$ constants and $lambda > 0$ to specification. This is finding four parameters.\n\nThis particular function has some characteristics, we can look at these.\n\n$ lim_(t arrow.r oo) R\\(0\\,t\\)= beta_0 $\n\nIf you take a longer maturity, it goes to a constant. So $beta_0$ should be associated with the long-term interest rate, like the level of it. Before that, it has some curvature. What about at 0?\n\nWell, you would end up a 0/0, so you can apply L'Hopital's rule.\n\n$ lim_(t arrow.r 0) = beta_0 + lim_(t arrow.r 0) e^(- lambda t) + beta_2 lim_(t arrow.r 0)\\(e^(- lambda t) - 1\\) $\n\n$ = beta_0 + beta_1 $\n\nThis is the spot interest rate, at t = 0.\n\nLevel Slope Curvature represent the three betas.\n\nWe have a numerical example just to see\n\n==== Example\n<example>\nAssume that there are N coupon bonds.\n\nFor i = 1, 2, \\\\ldots N, the ith bond has the following specification\n\nB\\_i = cash(dirty) price of bond\n\nm\\_i = remaining number of coupon payments\n\nThese bonds have different maturities, and they may have different specifications in the coupon payments (frequency and amount)\n\nt\\_i^j = coupon payment date for j = 1, \\\\ldots m\\_i\n\nt\\_i^1 = date of next coupon payment\n\nt\\_i^{m\\_i} = maturity date and date of last coupon\n\n$ delta_i = t_i^(j + 1) - t_i^j $\n\nP\\_i = principal\n\nC\\_i (amount of each coupon) = $delta_i P_i dot.op C o u p o n R a t e$\n\nB\\_i = Market Quote (Clean Price) + $C_i frac(delta_i - t_i^1, delta_i)$ (Accrual of Interest)\n\nTheoretical Price:\n\n$ hat(B_i) = sum_(j = 1)^(m_i) e^(- R\\(0\\,t_i^j\\)dot.op t_i^j) dot.op C_i +\\(T h e n D i s c o u n t P r i n c i p a l\\)e^(- R\\(0\\,t_i^(m_i)\\)dot.op t_i^(m_i)) dot.op P_i $\n\nBasically you can calculate this for all bonds.\n\nIf you want to write this as an optimization problem, we want to find\n\n$beta_0\\,beta_1\\,beta_2\\,lambda$ that minimizes\n\n$ sum_(i = 1)^N w_i\\(hat(B_i) - B_i\\)^2 $\n\nthat satisfies\n\n$ {beta_0 > 0 med beta_0 + beta_1 > 0 med lambda > 0 $\n\nThis w\\_i item is the weight assigned to bond i, if you want to equally weight them then it's 1.\n\nChoices for w\\_i:\n\n- w\\_i = $1 / t_i^(m_i)$ This one is a function of maturity, so longer maturity will have smaller weights. This will fit better on shorter maturity than longer maturity.\n- w\\_i =$- 1 / B_i dot.op frac(partial B_i, partial Y T M)$ This one is dependent on the duration of the bond\n\n== Siegel-Svensson\n<siegel-svensson>\nAdds a second hump term (2 possible maximaminima\n\nLet R(0, t) be the zero rate for maturity t, then\n\n$ R\\(0\\,t\\)= beta_0 + beta_1 (frac(1 - e^(- lambda_1 t), lambda_1 t)) + beta_2 (frac(1 - e^(- lambda_1 t), lambda_1 t) - e^(- lambda_1 t)) + beta_3 (frac(1 - e^(- lambda_2 t), lambda_2 t) - e^(- lambda_2 t)) $\n\nWe have some constraints:\n\n$ {beta_0 > 0 med beta_0 + beta_1 > 0 med lambda_1\\,lambda_2 > 0 $\n\nThe optimization problem for the previous problem was for price of the bonds. But otherwise we can write it as\n\nWe have the factor function, then the fitting function, then the objective function. That's how you get Nelson-Siegel.\n\nFor the optimization methods, there are some characteristics,\n\nconstrOptim.nl is what he uses\n\nestimates\n\n== Smith-Wilson\n<smith-wilson>\nGenerates a smoothed interpolated and extrapolated term structures that fit the spot market rates.\n\nhas simplicity, works for low number of market data points but performance\n\nThis going to work like an interpolation, but it also extrapolates for longer maturities.\n\nParameters:\n\nUFR: ultra long-term forward rate\n\nLLP: last liquid point, where the zero coupon market support ends (e.g.~20 years)\n\nCP: Convergence\n\n== Assignment\n<assignment>\nThis homework is due in two weeks. The first problem is similar to what we did last time, given some cash flows from different bonds, fill in the curve.\n\nDetermine the forward curve, bump it, and then if you change it, what's the change? If you have 10 years, you have 10 such cases, bump for each year.","dataUrl":"https://sharifhsn.dev/api/posts/advanced-derivatives-week-02.json","date":"2025-02-06","datePublished":"2025-02-06","description":"We started to look at interest rates. In the first part we’re going to discuss various interpolation methods, functions that are useful for modeling the yield curve. That’s…","site":"https://sharifhsn.dev","slug":"advanced-derivatives-week-02","source":"Advanced Derivatives","sourceUrl":null,"tags":["Fixed Income","Yield Curves","Interpolation","Bootstrapping","Nelson-Siegel","Smith-Wilson"],"title":"Yield Curves and Bootstrapping","url":"https://sharifhsn.dev/blog/advanced-derivatives-week-02/","version":"1","wordCount":2789}