{"categories":["Fixed Income"],"contentHtml":"<h2>Numerical construction of the trinomial tree for the Hull-White model</h2>\n<p>This will be focused on numerical methods, next week we will have more examples.</p>\n<p>What is the difference between interest rate risk and stock price risk?</p>\n<p>One of the most important differences is that the discount rate will vary from node to node. We will look at an example:</p>\n<p>We’ll assume that the payoff of a derivative is 100(r-0.11)_+</p>\n<p>We also know the probability of going up, staying and going down as 0.25, 0.5, 0.25</p>\n<p>![Hand-drawn Hull-White trinomial tree from the source notes.](/static/img/Advanced Derivatives-week-06-hull-white-tree.png)</p>\n<p>Hull-White uses an alternative branching process. There is the typical (up med down) then (UP up med), (med down DOWN).</p>\n<p>$$\ndr = [\\theta(t) - ar] dt + \\sigma dz\n$$</p>\n<p>So what is the procedure?</p>\n<p>First we have to assume \\(\\theta(t) = 0\\)</p>\n<p>And the start is \\(r(0) = 0\\)</p>\n<p>The construction of this trinomial tree should match the expectation and variance of the process? Basically we run the simulation based on the parameters.</p>\n<p>Then we determine \\(\\theta(t)\\) so it matches the initial term structure.</p>\n<p>Let’s look at the stages:</p>\n<p>![Handwritten tree-construction steps from the Week 6 source notes.](/static/img/Advanced Derivatives-week-06-tree-construction.png)</p>\n<p>Then we set \\(\\Delta R = \\sigma \\sqrt{3 \\Delta t}\\)</p>\n<p>This particular equality is chosen for numerical convergence.</p>\n<p>We need to determine which branching method applies at each node: (regular, up, down).</p>\n<p>Let each node be \\((i, j)\\) where \\(t = i \\cdot \\Delta t\\) and \\(R* = j \\Delta R\\)</p>\n<p>So this is the position in the state space.</p>\n<p>As for indices,</p>\n<p>i is related to time, it is positive. j can be positive or negative because Hull-White allows negative interest rates.</p>\n<p>switching the branching scheme is dependent on the index j</p>\n<p><strong>when a &gt; 0</strong></p>\n<p>switch from branching <em>regular</em> to <em>down</em> for sufficiently large positive j.</p>\n<p>switch from branching <em>regular</em> to <em>up</em> for sufficiently large negative j.</p>\n<p>Let \\(j_{\\max}\\) and \\(j_{\\min}\\)for the value where you switch</p>\n<p>Hull and White (posted on Canvas) show that the probabilities are always positive <em>if</em> \\(j_{\\max}\\) is equal to the smallest integer &gt; \\(\\frac{0.184}{a \\Delta t}\\)</p>\n<p>$$\nj_{\\min} = -j_{\\max}\n$$</p>\n<p>The point where we change branching is both dependent on the speed of mean reversion and the length of the time step.</p>\n<p>Therefore we can say that the probabilities \\(p_u\\), \\(p_m\\), and \\(p_d\\) are chosen to match expected change and variance of change in R*. We will solve for these unknowns with equations. What are those equations?</p>\n<p>That depends on the branching strategy:</p>\n<p><em>regular</em>:</p>\n<p>$$\np_u \\Delta R - p_d \\Delta R = -aj\\Delta R \\Delta t\n$$</p>\n<p>$$\np_u \\Delta R^2 + p_d \\Delta R^2 = \\sigma^2 \\Delta t + a^2 j^2\n$$</p>\n<p>$$\np_u + p_m + p_d &gt; 1\n$$</p>\n<p>So this is your system of equations.</p>\n<p>And by setting \\(\\Delta R = \\sigma \\sqrt{3 \\Delta t}\\), our system becomes</p>\n<p>$$\np_u = \\frac{1}{6} + \\frac{1}{2}(a^2 j^2 \\Delta t^2 - aj \\Delta t)\n$$</p>\n<p>$$\np_m = \\frac{2}{3} - a^2 j^2 \\Delta t^2\n$$</p>\n<p>$$\np_d = \\frac{1}{6} + \\frac{1}{2} (a^2 j^2 \\Delta t^2 + aj\\Delta t)\n$$</p>\n<p>Note that these are all dependent on index j. We will look at an example of this.</p>\n<p>Similarly, for <em>up</em></p>\n<p>$$\np_u = \\frac{1}{6} + \\frac{1}{2}(a^2 j^2 \\Delta t^2 + aj \\Delta t)\n$$</p>\n<p>… I didn’t write them down in time.</p>\n<p>And for <em>down</em></p>\n<p>$$\np_u = \\frac{7}{6} + \\frac{1}{2}(a^2 j^2 \\Delta t^2 - 3aj\\Delta t)\n$$</p>\n<p>$$\np_m = -\\frac{1}{3} - a^2 j^2 \\Delta t^2 + 2aj\\Delta t\n$$</p>\n<p>$$\np_d = \\frac{1}{6} + \\frac{1}{2}(a^2 j^2 \\Delta t^2 - aj \\Delta t)\n$$</p>\n<p>Let’s take values of a zero curve</p>\n<p>0.5</p>\n<p>1</p>\n<p>1.5</p>\n<p>2</p>\n<p>2.5</p>\n<p>3</p>\n<p>3.43</p>\n<p>3.824</p>\n<p>4.183</p>\n<p>4.512</p>\n<p>4.812</p>\n<p>5.086</p>\n<p>Building the first tree, we set our <strong>vertical spacing</strong> to the special numerical value \\(\\sigma \\sqrt{3\\Delta t}\\)</p>\n<p>Then what is the value of j in our example?</p>\n<p>$$\n\\sigma = 0.01\n$$</p>\n<p>Then after we construct the tree, we have to displace the nodes to match the original term structure.</p>\n<p><strong>STEP 2</strong></p>\n<p>Convert this R* tree into a tree for R, where we displace the nodes so that we match the initial term structure.</p>\n<p>Our displacement function is</p>\n<p>$$\n\\alpha(t) = R(t) - R*(t)\n$$</p>\n<p>These can be calculated from the \\(\\theta(t)\\) expression. Recall that</p>\n<p>$$\n\\theta(t) = F_t(0, t) + a F(0, t) + \\frac{\\sigma^2}{2a}(1 - e^{-2at})\n$$</p>\n<p>Note</p>\n<p>$$\ndR = [\\theta(t) - aR] dt + \\sigma dW\n$$</p>\n<p>$$\ndR* = -aR* dt + \\sigma dW\n$$</p>\n<p>So therefore if we substitute in,</p>\n<p>$$\nd\\alpha = [\\theta(t) - a\\alpha(t)] dt\n$$</p>\n<p>Then we can rearrange and integrate to get</p>\n<p>$$\n\\alpha(t) = F(0, t) + \\frac{\\sigma^2}{2a^2} (1-e^{-at})^2\n$$</p>\n<p>for infinitesimally small values.</p>\n<p>So this is kind of a continuous function. In this case, we need finite Δt to match the term structure exactly. So it’s a little more simple</p>\n<p>We define \\(\\alpha_i\\), which corresponds to each time step on the tree,</p>\n<p>$$\n\\alpha(i \\Delta t) = R(i \\Delta t) - R*(i \\Delta t)\n$$</p>\n<p>Here we’re interested in the discrete points on the tree.</p>\n<p>Then the overall procedure here is that we are given some rates on the zero curve, but you can have multiple rates on the time step. So you have to price, and look at the value given by the market, and the value given by the tree.</p>\n<p>Then we can define the present value of the security \\(Q_{i, j}\\) that pays $1 if node (i, j) is reached and $0 otherwise, so we can add up the probabilities and discount them. And we can calibrate α and Q to match the initial term structure.</p>\n<p>So how do we start?</p>\n<p>At 0, by definition, we pay $1</p>\n<p>$$\nQ_{0, 0} = 1\n$$</p>\n<p>And the displacement of the initial node is chosen to give the right price for a ZCB maturing at Δt. Since our zero rate is 3.824 for a one-year rate, we can set α_0 to be that. In an exercise, if you were to take Δ to be 0.5 it would be that rate.</p>\n<p>And then \\(\\alpha_1\\) should be chosen in such a way to be a ZCB that matures in two years.</p>\n<p>Then next we calculate \\(Q_{1,1}, Q_{1,0}, Q_{1,-1}\\). i.e., at time i=1, there are three possibilities for j.</p>\n<p>We use the probabilities, for \\(Q_{1,1}\\) it’s 0.1667. And then the discount factor is the value of R, in this case 3.824%.</p>\n<p>we get the three values 0.1604, 0.6417, and 0.1604. And then we can use it to calculate \\(\\alpha_1\\) which is chosen to match the right price of a ZCB maturing at 2Δt.</p>\n<p>We have the rate from the market, so we can price the bond with that rate. Such bond at 2Δt, you will discount with the rate applicable per branch, which is 1.732%. What we will see in this displaced tree, will be this original value 1.732% discounted.</p>\n<p>$$\ne^{-(\\alpha_1 + 0.01732) \\times 1}\n$$</p>\n<p>Then for node C, the rate 0 will be ignored so we just use α_1</p>\n<p>Then having the price of the bond at nodes B, C, and D, we can calculate the price of the node.</p>\n<p>$$\nA = Q_{1,1} e^{-(\\alpha_1 + 0.01732)} + Q_{1,0} e^{-\\alpha_1} + \\ldots\n$$</p>\n<p>From the initial term structure, we can get the ZCB for two years as the “market price” = 0.9137.</p>\n<p>And then we substitute in the Q values to get the total formula for the adjustment \\(\\alpha_1\\)</p>\n<p>$$\n\\ln\\left[\\frac{Q_{1,1}e^{R_{1,1}} + Q_{1,0} + \\ldots}{\\text{P(0, 2)}}\\right]\n$$</p>\n<p><strong>Here is the formal approach</strong>. If we have \\(Q_{i,j}\\) already determined for \\(i \\leq m\\) where m is the final step of the tree. Then BIG LONG FORMULA on page 18.</p>\n<p>If you have the transition probability matrix, it’s an iterative approach where you determine α, then Q, then α, then Q.</p>\n<h2>Recombining binomial tree</h2>","contentMarkdown":"## Numerical construction of the trinomial tree for the Hull-White model\n\nThis will be focused on numerical methods, next week we will have more examples.\n\n\n\nWhat is the difference between interest rate risk and stock price risk?\n\nOne of the most important differences is that the discount rate will vary from node to node. We will look at an example:\n\nWe’ll assume that the payoff of a derivative is 100(r-0.11)\\_+\n\n\n\nWe also know the probability of going up, staying and going down as 0.25, 0.5, 0.25\n\n![Hand-drawn Hull-White trinomial tree from the source notes.](/static/img/Advanced Derivatives-week-06-hull-white-tree.png)\n\nHull-White uses an alternative branching process. There is the typical (up med down) then (UP up med), (med down DOWN).\n\n$$\ndr = [\\\\theta(t) - ar] dt + \\\\sigma dz\n$$\n\nSo what is the procedure?\n\nFirst we have to assume \\\\(\\\\theta(t) = 0\\\\)\n\nAnd the start is \\\\(r(0) = 0\\\\)\n\nThe construction of this trinomial tree should match the expectation and variance of the process? Basically we run the simulation based on the parameters.\n\nThen we determine \\\\(\\\\theta(t)\\\\) so it matches the initial term structure.\n\nLet’s look at the stages:\n\n![Handwritten tree-construction steps from the Week 6 source notes.](/static/img/Advanced Derivatives-week-06-tree-construction.png)\n\nThen we set \\\\(\\\\Delta R = \\\\sigma \\\\sqrt{3 \\\\Delta t}\\\\)\n\nThis particular equality is chosen for numerical convergence.\n\n\n\nWe need to determine which branching method applies at each node: (regular, up, down).\n\nLet each node be \\\\((i, j)\\\\) where \\\\(t = i \\\\cdot \\\\Delta t\\\\) and \\\\(R* = j \\\\Delta R\\\\)\n\nSo this is the position in the state space.\n\nAs for indices,\n\ni is related to time, it is positive. j can be positive or negative because Hull-White allows negative interest rates.\n\nswitching the branching scheme is dependent on the index j\n\n**when a \\> 0**\n\nswitch from branching *regular* to *down* for sufficiently large positive j.\n\nswitch from branching *regular* to *up* for sufficiently large negative j.\n\nLet \\\\(j_{\\\\max}\\\\) and \\\\(j_{\\\\min}\\\\)for the value where you switch\n\nHull and White (posted on Canvas) show that the probabilities are always positive *if* \\\\(j_{\\\\max}\\\\) is equal to the smallest integer \\> \\\\(\\\\frac{0.184}{a \\\\Delta t}\\\\)\n\n$$\nj_{\\\\min} = -j_{\\\\max}\n$$\n\nThe point where we change branching is both dependent on the speed of mean reversion and the length of the time step.\n\nTherefore we can say that the probabilities \\\\(p_u\\\\), \\\\(p_m\\\\), and \\\\(p_d\\\\) are chosen to match expected change and variance of change in R\\*. We will solve for these unknowns with equations. What are those equations?\n\nThat depends on the branching strategy:\n\n*regular*:\n\n$$\np_u \\\\Delta R - p_d \\\\Delta R = -aj\\\\Delta R \\\\Delta t\n$$\n\n$$\np_u \\\\Delta R^2 + p_d \\\\Delta R^2 = \\\\sigma^2 \\\\Delta t + a^2 j^2\n$$\n\n$$\np_u + p_m + p_d > 1\n$$\n\nSo this is your system of equations.\n\nAnd by setting \\\\(\\\\Delta R = \\\\sigma \\\\sqrt{3 \\\\Delta t}\\\\), our system becomes\n\n$$\np_u = \\\\frac{1}{6} + \\\\frac{1}{2}(a^2 j^2 \\\\Delta t^2 - aj \\\\Delta t)\n$$\n\n$$\np_m = \\\\frac{2}{3} - a^2 j^2 \\\\Delta t^2\n$$\n\n$$\np_d = \\\\frac{1}{6} + \\\\frac{1}{2} (a^2 j^2 \\\\Delta t^2 + aj\\\\Delta t)\n$$\n\nNote that these are all dependent on index j. We will look at an example of this.\n\n\n\nSimilarly, for *up*\n\n$$\np_u = \\\\frac{1}{6} + \\\\frac{1}{2}(a^2 j^2 \\\\Delta t^2 + aj \\\\Delta t)\n$$\n\n… I didn’t write them down in time.\n\nAnd for *down*\n\n$$\np_u = \\\\frac{7}{6} + \\\\frac{1}{2}(a^2 j^2 \\\\Delta t^2 - 3aj\\\\Delta t)\n$$\n\n$$\np_m = -\\\\frac{1}{3} - a^2 j^2 \\\\Delta t^2 + 2aj\\\\Delta t\n$$\n\n$$\np_d = \\\\frac{1}{6} + \\\\frac{1}{2}(a^2 j^2 \\\\Delta t^2 - aj \\\\Delta t)\n$$\n\n\n\nLet’s take values of a zero curve\n\n0.5\n\n1\n\n1.5\n\n2\n\n2.5\n\n3\n\n3.43\n\n3.824\n\n4.183\n\n4.512\n\n4.812\n\n5.086\n\n\n\nBuilding the first tree, we set our **vertical spacing** to the special numerical value \\\\(\\\\sigma \\\\sqrt{3\\\\Delta t}\\\\)\n\nThen what is the value of j in our example?\n\n$$\n\\\\sigma = 0.01\n$$\n\n\n\nThen after we construct the tree, we have to displace the nodes to match the original term structure.\n\n**STEP 2**\n\nConvert this R\\* tree into a tree for R, where we displace the nodes so that we match the initial term structure.\n\nOur displacement function is\n\n$$\n\\\\alpha(t) = R(t) - R*(t)\n$$\n\nThese can be calculated from the \\\\(\\\\theta(t)\\\\) expression. Recall that\n\n$$\n\\\\theta(t) = F_t(0, t) + a F(0, t) + \\\\frac{\\\\sigma^2}{2a}(1 - e^{-2at})\n$$\n\nNote\n\n$$\ndR = [\\\\theta(t) - aR] dt + \\\\sigma dW\n$$\n\n$$\ndR* = -aR* dt + \\\\sigma dW\n$$\n\nSo therefore if we substitute in,\n\n$$\nd\\\\alpha = [\\\\theta(t) - a\\\\alpha(t)] dt\n$$\n\nThen we can rearrange and integrate to get\n\n$$\n\\\\alpha(t) = F(0, t) + \\\\frac{\\\\sigma^2}{2a^2} (1-e^{-at})^2\n$$\n\nfor infinitesimally small values.\n\nSo this is kind of a continuous function. In this case, we need finite Δt to match the term structure exactly. So it’s a little more simple\n\nWe define \\\\(\\\\alpha_i\\\\), which corresponds to each time step on the tree,\n\n$$\n\\\\alpha(i \\\\Delta t) = R(i \\\\Delta t) - R*(i \\\\Delta t)\n$$\n\nHere we’re interested in the discrete points on the tree.\n\n\n\nThen the overall procedure here is that we are given some rates on the zero curve, but you can have multiple rates on the time step. So you have to price, and look at the value given by the market, and the value given by the tree.\n\n\n\nThen we can define the present value of the security \\\\(Q_{i, j}\\\\) that pays $1 if node (i, j) is reached and $0 otherwise, so we can add up the probabilities and discount them. And we can calibrate α and Q to match the initial term structure.\n\n\n\nSo how do we start?\n\nAt 0, by definition, we pay $1\n\n$$\nQ_{0, 0} = 1\n$$\n\nAnd the displacement of the initial node is chosen to give the right price for a ZCB maturing at Δt. Since our zero rate is 3.824 for a one-year rate, we can set α\\_0 to be that. In an exercise, if you were to take Δ to be 0.5 it would be that rate.\n\nAnd then \\\\(\\\\alpha_1\\\\) should be chosen in such a way to be a ZCB that matures in two years.\n\nThen next we calculate \\\\(Q_{1,1}, Q_{1,0}, Q_{1,-1}\\\\). i.e., at time i=1, there are three possibilities for j.\n\nWe use the probabilities, for \\\\(Q_{1,1}\\\\) it’s 0.1667. And then the discount factor is the value of R, in this case 3.824%.\n\nwe get the three values 0.1604, 0.6417, and 0.1604. And then we can use it to calculate \\\\(\\\\alpha_1\\\\) which is chosen to match the right price of a ZCB maturing at 2Δt.\n\n\n\nWe have the rate from the market, so we can price the bond with that rate. Such bond at 2Δt, you will discount with the rate applicable per branch, which is 1.732%. What we will see in this displaced tree, will be this original value 1.732% discounted.\n\n$$\ne^{-(\\\\alpha_1 + 0.01732) \\\\times 1}\n$$\n\nThen for node C, the rate 0 will be ignored so we just use α\\_1\n\nThen having the price of the bond at nodes B, C, and D, we can calculate the price of the node.\n\n$$\nA = Q_{1,1} e^{-(\\\\alpha_1 + 0.01732)} + Q_{1,0} e^{-\\\\alpha_1} + \\\\ldots\n$$\n\nFrom the initial term structure, we can get the ZCB for two years as the “market price” \\= 0.9137.\n\nAnd then we substitute in the Q values to get the total formula for the adjustment \\\\(\\\\alpha_1\\\\)\n\n$$\n\\\\ln\\\\left[\\\\frac{Q_{1,1}e^{R_{1,1}} + Q_{1,0} + \\\\ldots}{\\\\text{P(0, 2)}}\\\\right]\n$$\n\n\n\n**Here is the formal approach**. If we have \\\\(Q_{i,j}\\\\) already determined for \\\\(i \\\\leq m\\\\) where m is the final step of the tree. Then BIG LONG FORMULA on page 18\\.\n\n\nIf you have the transition probability matrix, it’s an iterative approach where you determine α, then Q, then α, then Q.\n\n## Recombining binomial tree","dataUrl":"https://sharifhsn.dev/api/posts/advanced-derivatives-week-06.json","date":"2025-03-06","datePublished":"2025-03-06","description":"This will be focused on numerical methods, next week we will have more examples.","site":"https://sharifhsn.dev","slug":"advanced-derivatives-week-06","source":"Advanced Derivatives","sourceUrl":null,"tags":["Fixed Income","Hull-White Model","Trinomial Trees","Interest Rate Models"],"title":"Hull–White Interest Rate Trees","url":"https://sharifhsn.dev/blog/advanced-derivatives-week-06/","version":"1","wordCount":1305}