├── .gitignore ├── Chapter 3 - The value of time.ipynb ├── Chapter 4 - Bond Pricing with a flat term structure.ipynb └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .ipynb_checkpoints 2 | -------------------------------------------------------------------------------- /Chapter 3 - The value of time.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "## Chapter 3 - The value of time" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "Finance as a field of study is sometimes somewhat flippantly said to deal with the value of two things: *time* and *risk*. While this is not the whole story, there is a deal of truth in it. These are the two issues which is always present. We start our discussion by ignoring risk and only considering the implications of the fact that anybody prefers to get something earlier rather than later, or the value of time." 15 | ] 16 | }, 17 | { 18 | "cell_type": "markdown", 19 | "metadata": {}, 20 | "source": [ 21 | "### 3.1 Present value\n", 22 | "The present value is the current value of a stream of future payments. Let $C_t$ be the cash flow at time *t*. Suppose we have $N$ future cash flows that occur at times $t_1, t_2, ... t_N$.\n", 23 | "\n", 24 | "To find the *present* value of these future cash flows one need a set of prices of future cash flows. Suppose $d_t$ is the price one would pay today for the right to receive one dollar at a future date *t*. Such a price is also called a *discount factor*. To complicate matters further such prices will differ depending on the riskiness of the future cash flows. For now we concentrate on one particular set of prices, the prices of riskless future cash flows. We will return to how one would adjust the prices for risky cash flows. If one knows the set of prices for future claims of one dollar, $d_1, d_2, ... d_n$ one would calculate the present value as the sum of the present values of the different elements.\n", 25 | "\n", 26 | "$$PV = \\sum_{N}^{t=1} d_{t_i}C_{t_i}$$" 27 | ] 28 | }, 29 | { 30 | "cell_type": "markdown", 31 | "metadata": {}, 32 | "source": [ 33 | "However, knowing this set of current prices for cash flows at all future dates is not always feasible, and\n", 34 | "some way has to be found to simplify the data need inherent in such general present value calculations." 35 | ] 36 | }, 37 | { 38 | "cell_type": "markdown", 39 | "metadata": {}, 40 | "source": [ 41 | "### 3.2 One interest rate with annual compounding\n", 42 | "The best known way to simplify the present value calculation is to rewrite the discount factors in terms of interest rates, or yields, through the relationship:\n", 43 | "\n", 44 | "$$d_t = \\frac{1}{(1+r_t)^t}$$" 45 | ] 46 | }, 47 | { 48 | "cell_type": "markdown", 49 | "metadata": {}, 50 | "source": [ 51 | "where $r_t$ is the interest rate (usually termed the spot rate) relevant for a *t*-period investment. To further simplify this calculation one can impose that this interest rate *r* is constant for all periods. This is termed a flat term structure. We will in the next chapter relax this simplifying assumption. The prices for valuing the future payments $d_t$ is calculated from this interest rate:\n", 52 | "\n", 53 | "$$d_t = \\frac{1}{(1+r_t)^t`}$$" 54 | ] 55 | }, 56 | { 57 | "cell_type": "markdown", 58 | "metadata": {}, 59 | "source": [ 60 | "In this case one would calculate the present value of a stream of cash flows paid at discrete dates\n", 61 | "$t = 1, 2 ... N$ as\n", 62 | "\n", 63 | "$$PV=\\sum_{t=1}^{N} \\frac{C_t}{(1+r+)^t`}$$" 64 | ] 65 | }, 66 | { 67 | "cell_type": "markdown", 68 | "metadata": {}, 69 | "source": [ 70 | "#### Example\n", 71 | "\n", 72 | "An investment project has an investment cost of 100 today, and produces cash flows of 75 each of the next two years. What is the Net Present Value of the project?" 73 | ] 74 | }, 75 | { 76 | "cell_type": "code", 77 | "execution_count": 1, 78 | "metadata": { 79 | "collapsed": false 80 | }, 81 | "outputs": [ 82 | { 83 | "name": "stdout", 84 | "output_type": "stream", 85 | "text": [ 86 | "Present value, 10 percent discretely compounding interest = 30.1653\n" 87 | ] 88 | } 89 | ], 90 | "source": [ 91 | "import numpy as np\n", 92 | "\n", 93 | "c = np.array([-100, 75, 75])\n", 94 | "t = np.array([0, 1, 2])\n", 95 | "r = .1\n", 96 | "\n", 97 | "print('Present value, 10 percent discretely compounding interest = {:.4f}'.format(\n", 98 | " np.npv(r, c)))" 99 | ] 100 | }, 101 | { 102 | "cell_type": "markdown", 103 | "metadata": {}, 104 | "source": [ 105 | "Given the assumption of a discrete, annual interest rate, there are a number of useful special cases of cash flows where one can calculate the present value in a simplified manner. Some of these are shown in the following exercises." 106 | ] 107 | }, 108 | { 109 | "cell_type": "markdown", 110 | "metadata": {}, 111 | "source": [ 112 | "### 3.2.1 Internal rate of return\n", 113 | "In addition to its role in simplifying present value calculations, the interest rate has some further use. The percentage return on an investment is a summary measure of the investment’s profitability. Saying that an investment earns 10% per year is a good way of summarizing the cash flows in a way that does not depend on the amount of the initial investment. The return is thus a relative measure of profitability. To estimate a return for a set of cash flows we calculate the internal rate of return. The *internal rate of return* for a set of cash flows is the interest rate that makes the present value of the cash flows equal to zero. When there is a uniquely defined internal rate of return we get a relative measure of the profitability of a set of cash flows, measured as a return, typically expressed as a percentage. Note some of the implicit assumptions made here. We assume that the same interest rate applies at all future dates (i.e. a flat term structure). The IRR method also assumes intermediate cash flows are reinvested at the internal rate of return.\n", 114 | "\n", 115 | "Suppose the cash flows are $C_0, C_1, C_2, ... C_T$ . Finding an internal rate of return is finding a solution $y$ of the equation\n", 116 | "\n", 117 | "$$\\sum_{t=1}^{t=1}\\frac{C_t}{(1+y)^t}-C_o=0$$" 118 | ] 119 | }, 120 | { 121 | "cell_type": "markdown", 122 | "metadata": {}, 123 | "source": [ 124 | "Note that this is a polynomial equation, and as $T$ becomes large, there in no way to find an explicit\n", 125 | "solution to the equation. It therefore needs to be solved numerically. For well behaved cash flows, where we know that there is one IRR, the method implemented below is suitable, it is an iterative\n", 126 | "process called bisection." 127 | ] 128 | }, 129 | { 130 | "cell_type": "markdown", 131 | "metadata": {}, 132 | "source": [ 133 | "#### Example\n", 134 | "\n", 135 | "We are considering an investment with the following cash flows at dates 0, 1 and 2:\n", 136 | "\n", 137 | " $C0 = -100, C_1 = 10, C_2 = 110$\n", 138 | "1. The current interest rate (with discrete, annual compounding) is 5%. Determine the present value of\n", 139 | "the cash flows.\n", 140 | "\n", 141 | "2. Find the internal rate of return of this sequence of cash flows." 142 | ] 143 | }, 144 | { 145 | "cell_type": "code", 146 | "execution_count": 2, 147 | "metadata": { 148 | "collapsed": false, 149 | "scrolled": true 150 | }, 151 | "outputs": [ 152 | { 153 | "name": "stdout", 154 | "output_type": "stream", 155 | "text": [ 156 | "present value, 5 percent discretely compounding interest = 9.29705\n", 157 | "internal rate of return, discrete compounding = 0.1\n" 158 | ] 159 | } 160 | ], 161 | "source": [ 162 | "c = np.array([-100, 10, 110])\n", 163 | "r = 0.05\n", 164 | "\n", 165 | "print('present value, 5 percent discretely compounding interest = {:.5f}'.format(np.npv(r, c)))\n", 166 | "print('internal rate of return, discrete compounding = {:.1f}'.format(np.irr(c)))" 167 | ] 168 | }, 169 | { 170 | "cell_type": "markdown", 171 | "metadata": {}, 172 | "source": [ 173 | "In addition to the above economic qualifications to interpretations of the internal rate of return, we also\n", 174 | "have to deal with technical problem stemming from the fact that any polynomial equation has potentially\n", 175 | "several solutions, some of which may be imaginary. By imaginary here we mean that we move away from\n", 176 | "the real line to the set of complex numbers. In economics we prefer the real solutions, complex interest\n", 177 | "rates are not something we have much intuition about... To see whether we are likely to have problems\n", 178 | "in identifying a single meaningful IRR, the code shown in code 3.3 implements a simple check. It is only\n", 179 | "a necessary condition for a unique IRR, not sufficient, so you may still have a well-defined IRR even\n", 180 | "if this returns false. The first test is just to count the number of sign changes in the cash flow. From\n", 181 | "Descartes rule we know that the number of real roots is one if there is only one sign change. If there is\n", 182 | "more than one change in the sign of cash flows, we can go further and check the *aggregated* cash flows\n", 183 | "for sign changes (See Norstrom (1972))." 184 | ] 185 | }, 186 | { 187 | "cell_type": "code", 188 | "execution_count": 3, 189 | "metadata": { 190 | "collapsed": true 191 | }, 192 | "outputs": [], 193 | "source": [ 194 | "%matplotlib inline\n", 195 | "import seaborn as sns; sns.set(style='white')\n", 196 | "import matplotlib.pyplot as plt" 197 | ] 198 | }, 199 | { 200 | "cell_type": "code", 201 | "execution_count": 4, 202 | "metadata": { 203 | "collapsed": false 204 | }, 205 | "outputs": [], 206 | "source": [ 207 | "cf0 = np.array([-100, 10, 100])\n", 208 | "npv_cf0 = np.ones(50)\n", 209 | "\n", 210 | "for index, rate in enumerate(np.linspace(0, 0.12, 50)):\n", 211 | " npv_cf0[index] = np.npv(rate, cf0)\n", 212 | "\n", 213 | "cf1 = np.array([-100, 201, -100])\n", 214 | "npv_cf1 = np.ones(50)\n", 215 | "\n", 216 | "for index, rate in enumerate(np.linspace(-0.2, .2, 50)):\n", 217 | " npv_cf1[index] = np.npv(rate, cf1)" 218 | ] 219 | }, 220 | { 221 | "cell_type": "code", 222 | "execution_count": 5, 223 | "metadata": { 224 | "collapsed": false 225 | }, 226 | "outputs": [ 227 | { 228 | "data": { 229 | "image/png": "iVBORw0KGgoAAAANSUhEUgAAAz0AAAFRCAYAAABewcN9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3XmczeX7x/HXMWOIQZIlFKovQna+yRYaS6EwZE8pS7RY\ny5KlrNnql4hkixDSpoWJpMhIlqai3VJiKDHEDM7vj+trqzDLmbnP8n4+HvMYM2bOvGeYc871ue/7\nujxer9eLiIiIiIhIkMrkOoCIiIiIiEh6UtEjIiIiIiJBTUWPiIiIiIgENRU9IiIiIiIS1FT0iIiI\niIhIUFPRIyIiIiIiQS1NRc/WrVvp0KEDALt27aJt27a0b9+e4cOH+ySciIiIL508eZL+/fvTrl07\nWrVqxapVq1xHEhGRDJDqomfGjBkMHjyYpKQkAEaPHk3v3r2ZN28ep0+fJiYmxmchRUREfOGtt94i\nd+7czJ8/n5deeomnn37adSQREckAqS56ihQpwgsvvHD27a+++orKlSsDUKtWLdavX5/2dCIiIj7U\nqFEjHn30UQBOnz5NeHi440QiIpIRUl30REVFERYWdvZtr9d79s/Zs2fnyJEjaUsmIiLiY1dccQXZ\nsmUjISGBRx99lF69ermOJCIiGcBnl7gyZTpXPx09epScOXNe8uOPHz9OXFwcefPmvaB4EhGRjHPq\n1Cni4+MpU6YMWbNmdR0nQ+zdu5eePXvSvn177rjjjot+nB6nRET8gy8eq3xW9JQqVY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okkQCgoseXrrkGYmLObXerXl3b3URE/FChQoVYuHCh6xgS7Lxe+Prr\nc0XOxx/bmRuAK66wMRjVqlmBU6GCbS/L6OcLuXLBzTfby9+z79xpxc+Zl88+gyVL7AUgTx4rfmrX\nhjp1bFucnu+In1LR42tntrvVqHFuu9uaNfDyy9ruJiIiEgp274b582HuXPjmm3PvL1sW6te3YqdG\nDduK5q88Hiha1F7uusve5/XCDz/Y85qPPrLXr79uLwBFikDTpvbxtWpB5syOwov8k4qe9BIVdW67\n27Jltk9X3d1ERESC05Ej9uR/7lxYvdoKhCxZIDoaGje2Yueaa1ynTBuPB2680V46d7bv8eefrfhZ\nscJmGT7/vL3kygV33GEFUKNGkDOn6/QS4rQRMz0VLGjb3Z580paIq1fXMFMREZFg4fXalrUOHaBA\nAejUCVatslWcl16C336DxYvh3nsDv+D5Nx4PFCtm3/err8L+/bByJfTsaUXPggXQurU1Xbj7bisK\nT5xwnVpClIqe9BYebmd8Vqywva99+thVj99/d51MREREUuPUKXsCX62anWeZN8+KmuHDbfvXxx/D\nAw/AlVe6TpqxIiKssdPzz9sK0ObNMGwYlCxpMw1btLCf00MP2fkgXQSWDKSiJ6Oc6e5Wrx68/bYd\nWly/3nUqERERSa7jx20Fp1QpewK/YYOtYHz8MXz3HQwZAtdf7zqlf/B47LnO0KHWDW7LFrvwmyUL\nTJ1qBWOJEjBihJ2BEklnKnoyUoEC1r3lqads2FjNmvDMMzZhWURERPzToUMwerQd6u/SxVYxOne2\nJgXLltnjubqWXVq5cjB+vBU4770HbdrYn5980n6uLVqcOwslkg5U9GS0sDD7BV+1yvrdP/64HXCM\nj3edTERERM534gRMmGBPygcOtDk7jz8OP/0EM2bYti1JmfBwaNjQzgDt22c/x3LlbLtg3brW9nrK\nFGsMIeJDKnpcqV3blnobNLArHuXLW/tHERERccvrtVk0pUpB3742gHPsWFuZGDPGGhVJ2uXMaStm\nmzbBunXW8fa776BHDyhUyOYcfvut65QSJHxe9DRv3pyOHTvSsWNHBg4c6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97XoEEDlixZwuLFizlw4ACdO3fmlVde8d0XTUiwYvKmm6y4FBERv6GiR0QkVIWHQ4cOQVn0\n/JsPPvjg7J/r1q3LzJkzffsF3nsPjh/XKo+IiB/SmR4REQk5Ho/H91vc1LVNRMRvaaVHRERCzocf\nfujbGzx+HJYvt/NR5cr59rZFRCTNtNIjIiKSVitW2JmeFi1sRpKIiPgVFT0iIiJppa1tIiJ+TUWP\niIhIWiQmwltvwbXXQtWqrtOIiMi/UNEjIiKSFqtWwaFD0Ly5traJiPgpFT0iIiJpoa1tIiJ+T0WP\niIhIap08CW+8Afnzw623uk4jIiIXoaJHREQktdauhQMHoFkzCAtznUZERC5CRY+IiEhqaWubiEhA\nUNEjIiKSGqdPw+uvQ548ULu26zQiInIJKnpERERS47PPYO9euOsuyJzZdRoREbkEFT0iIiKpoa1t\nIiIBQ0WPiIhISnm9VvTkzAn16rlOIyIil6GiR0REJKU2b4adO6FJE8iSxXUaERG5DBU9IiIiKfXW\nW/b67rvd5hARkWRR0SMiIpJSb79tzQvq13edREREkkFFj4iISErs2QNffAG33WZnekRExO+p6BER\nEUmJd96x102auM0hIiLJpqJHREQkJd5+216r6BERCRgqekRERJLr6FH48EO4+WYoWtR1GhERSSYV\nPSIiIskVEwMnTmiVR0QkwKjoERERSa4zrapV9IiIBBQVPSIiIslx+jQsXw758kHVqq7TiIhICqjo\nERERSY6NG2HfPmjcGDLp4VNEJJDoXltERCQ51LVNRCRgqegRERFJjrfegixZICrKdRIREUkhFT0i\nIiKXs3MnfPkl1K0L2bO7TiMiIimkokdERORyzmxta9rUbQ4REUkVFT0iIiKXc6boadzYbQ4REUkV\nFT0iIiKXkpAAq1dDhQpQuLDrNCIikgoqekRERC5l7VpISlLXNhGRAKaiR0RE5FJiYuy1ih4RkYCl\nokdERORSVq+GggWhYkXXSUREJJXC0/LJK1eu5P3332fChAkAxMTEMHbsWK655hoAHnnkESpXrpz2\nlCIiIj5Qq1YtihYtCkCFChXo1avX5T/pjz/g/vshk64T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G/y07qkZ6zEREFq1Aem0M5O2kTFz1ERERE\nRKRr/E4PERERERHpGhc9RERERESka1z0EBERERGRrnHRQ0REREREusZFDxERERER6RoXPURERERE\npGtc9BARERERka79P7nlTgz2/kesAAAAAElFTkSuQmCC\n", 230 | "text/plain": [ 231 | "" 232 | ] 233 | }, 234 | "metadata": {}, 235 | "output_type": "display_data" 236 | } 237 | ], 238 | "source": [ 239 | "fig, ax = plt.subplots(1, 2, figsize=(14, 5))\n", 240 | "\n", 241 | "ax[0].plot(np.linspace(0, 0.12, 50), npv_cf0, c='r', label='pv(r)')\n", 242 | "ax[0].axhline(0, c='g', label=0)\n", 243 | "ax[0].set_xlim(0, 0.12)\n", 244 | "ax[0].set_xlabel('$C_o=-100, C_1=10, C_2=100$', fontsize=15)\n", 245 | "ax[0].legend()\n", 246 | "\n", 247 | "ax[1].plot(np.linspace(-0.2, .2, 50), npv_cf1, c='r', label='pv(r)')\n", 248 | "ax[1].axhline(0, c='g', label=0)\n", 249 | "ax[1].set_xlim(-.2, 0.2)\n", 250 | "ax[1].set_xlabel('$C_o=-100, C_1=201, C_2=-100$', fontsize=15)\n", 251 | "ax[1].legend();" 252 | ] 253 | }, 254 | { 255 | "cell_type": "markdown", 256 | "metadata": { 257 | "collapsed": true 258 | }, 259 | "source": [ 260 | "### 3.3 Continously compounding interest\n", 261 | "Such discrete compounding as we have just discussed is not the only alternative way to approximate the\n", 262 | "discount factor. The discretely compounded case assumes that interest is added at discrete points in time\n", 263 | "(hence the name). However, an alternative assumption is to assume that interest is added continously. If\n", 264 | "compounding is continous, and $r$ is the interest rate, one would calculate the current price $d_t$ of reciving\n", 265 | "one dollar at a future date $t$ as\n", 266 | "\n", 267 | "$$d_t = e^{-rt}$$" 268 | ] 269 | }, 270 | { 271 | "cell_type": "markdown", 272 | "metadata": {}, 273 | "source": [ 274 | "some rules for translating between continously compounded and discretly compounded\n", 275 | "interest rates.\n", 276 | "\n", 277 | "$r=n\\ln\\Big(1+\\frac{r_n}{n}\\Big)$\n", 278 | "\n", 279 | "$r_n= n \\Big(e^{\\frac{r}{n}}-1\\Big)$\n", 280 | "\n", 281 | "Future value = $e^{rt}$\n", 282 | "\n", 283 | "Present value = $e^{-rt}$\n", 284 | "\n", 285 | "Notation: $r_n$: interest rate with discrete compounding, $n$: compounding periods per year. $r$: interest rate with\n", 286 | "continuous compounding, $t$: time to maturity." 287 | ] 288 | }, 289 | { 290 | "cell_type": "markdown", 291 | "metadata": {}, 292 | "source": [ 293 | "#### Example\n", 294 | "1. Given a 15% interest rate with monthly compounding, calculate the equivalent interest rate with continuous\n", 295 | "compounding.\n", 296 | "2. Given a 12% interest with continuous compounding, find the equivalent interest rate with quarterly\n", 297 | "compounding." 298 | ] 299 | }, 300 | { 301 | "cell_type": "code", 302 | "execution_count": 6, 303 | "metadata": { 304 | "collapsed": false 305 | }, 306 | "outputs": [], 307 | "source": [ 308 | "r = 12 * np.log(1 + .15 / 12)\n", 309 | "r4 = 4 * (np.exp(.12 / 4) - 1)" 310 | ] 311 | }, 312 | { 313 | "cell_type": "code", 314 | "execution_count": 7, 315 | "metadata": { 316 | "collapsed": false 317 | }, 318 | "outputs": [ 319 | { 320 | "name": "stdout", 321 | "output_type": "stream", 322 | "text": [ 323 | "0.149070239983\n", 324 | "0.121818135814\n" 325 | ] 326 | } 327 | ], 328 | "source": [ 329 | "print(r)\n", 330 | "print(r4)" 331 | ] 332 | }, 333 | { 334 | "cell_type": "markdown", 335 | "metadata": {}, 336 | "source": [ 337 | "### 3.3.1 Present value" 338 | ] 339 | }, 340 | { 341 | "cell_type": "markdown", 342 | "metadata": {}, 343 | "source": [ 344 | "Applying this to a set of cash flows at future dates $t_1, t_2, ... t_n$, we get the following present value calculation:\n", 345 | "\n", 346 | "$$PV=\\sum_{t=1}^{n} e^{-rt_i}C_{t_i}$$" 347 | ] 348 | }, 349 | { 350 | "cell_type": "code", 351 | "execution_count": null, 352 | "metadata": { 353 | "collapsed": true 354 | }, 355 | "outputs": [], 356 | "source": [] 357 | } 358 | ], 359 | "metadata": { 360 | "anaconda-cloud": {}, 361 | "kernelspec": { 362 | "display_name": "Python [default]", 363 | "language": "python", 364 | "name": "python3" 365 | }, 366 | "language_info": { 367 | "codemirror_mode": { 368 | "name": "ipython", 369 | "version": 3 370 | }, 371 | "file_extension": ".py", 372 | "mimetype": "text/x-python", 373 | "name": "python", 374 | "nbconvert_exporter": "python", 375 | "pygments_lexer": "ipython3", 376 | "version": "3.5.1" 377 | } 378 | }, 379 | "nbformat": 4, 380 | "nbformat_minor": 1 381 | } 382 | -------------------------------------------------------------------------------- /Chapter 4 - Bond Pricing with a flat term structure.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "## Chapter 4: Bond pricing with a flat term structure" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "In this section we use the present value framework of the previous chapter to price bonds and other fixed income securities. What distinguishes bonds is that the future payments are set when the security is issued. The simplest, and most typical bond, is a fixed interest, constant maturity bond with no default risk. There is however a large number of alternative contractual features of bonds. The bond could for example ba an annuity bond, paying a fixed amount each period. For such a bond the principal amount outstanding is paid gradually during the life of the bond. The interest rate the bond pays need not be fixed, it could be a floating rate, the interest rate paid could be a function of some market rate. Many bonds are issued by corporations, and in such cases there is a risk that the company issued the bond defaults, and the bond does not pay the complete promised amount. Another thing that makes bond pricing difficult in practice, is that interest rates tend to change over time.\n", 15 | "\n", 16 | "\n", 17 | "We start by assuming that all the promised payments are certain. Then the bond current price $B_0$ is found as the present value of these payments. The first step of pricing is to use the terms of the bond to find the promised payments. We start by considering a fixed interest bond with no default risk. Such bonds are typically bonds issued by governments. The bond is a promise to pay a face value $F$ at the maturity date $T$ periods from now. Each period the bond pays a fixed percentage amount of the face value as coupon C. The cash flows from the bond thus look as follows.\n", 18 | "\n", 19 | "In general a bond price is found as the present value\n", 20 | "\n", 21 | "$$B_0=d_1C_1+d_2C_2+\\cdot\\cdot\\cdot+d_TC_T=\\sum_{t=1}^{T}d_tC_t$$\n", 22 | "\n", 23 | "where $d_t$ is the discount factor, or the time 0 price of a payment of 1 at time $t$. To fully specify the\n", 24 | "problem it is necessary to find all discount factors $d_t$. In this chapter we will work with a specially simple\n", 25 | "specifiction of the term structure, namely that it is flat, and specified by the interest rate $r$." 26 | ] 27 | }, 28 | { 29 | "cell_type": "markdown", 30 | "metadata": {}, 31 | "source": [ 32 | "### 4.1 Flat term structure with discrete, annual compounding\n", 33 | "This is the simplest possible specification of a term structure,\n", 34 | "\n", 35 | "$$d_t = \\Big(\\frac{1}{1+r}\\Big)^t=\\frac{1}{(1+r)^t}$$" 36 | ] 37 | }, 38 | { 39 | "cell_type": "markdown", 40 | "metadata": {}, 41 | "source": [ 42 | "### 4.1.1 Bond Price\n", 43 | "The current bond price $(B_0)$ is the present value of the cash flows from the bond\n", 44 | "\n", 45 | "$$B_0=\\sum_{t=1}^{T}\\Bigg(\\frac{1}{(1+r)^t}\\Bigg)C_t=\\sum_{t=1}^{T}\\frac{C_t}{(1+r)^t}$$\n", 46 | "\n", 47 | "If we continue with the example of a standard fixed interest bond, where $C_t = C$ when $t < T$ and\n", 48 | "$CT = C + F$," 49 | ] 50 | }, 51 | { 52 | "cell_type": "markdown", 53 | "metadata": {}, 54 | "source": [ 55 | "#### Example\n", 56 | "A 3 year bond with a face value of $100 makes annual coupon payments of 10%. The current interest rate\n", 57 | "(with annual compounding) is 9%.\n", 58 | "\n", 59 | "1. Determine the current bond price.\n", 60 | "\n", 61 | "The current bond price: $B_0=\\frac{10}{(1+0.09)^1}+\\frac{10}{(1+0.09)^2}+\\frac{110}{(1+0.09)^3}=102.531$" 62 | ] 63 | }, 64 | { 65 | "cell_type": "code", 66 | "execution_count": 1, 67 | "metadata": { 68 | "collapsed": true 69 | }, 70 | "outputs": [], 71 | "source": [ 72 | "# Code 4.1: Bond pricing calculation with discrete, annual compoudning\n", 73 | "\n", 74 | "def bonds_price_discrete(times, cashflows, r):\n", 75 | " \n", 76 | " p = 0\n", 77 | " \n", 78 | " for i in range(len(times)):\n", 79 | " p += cashflows[i] / np.power((1 + r), times[i])\n", 80 | " \n", 81 | " return p" 82 | ] 83 | }, 84 | { 85 | "cell_type": "code", 86 | "execution_count": 2, 87 | "metadata": { 88 | "collapsed": false 89 | }, 90 | "outputs": [], 91 | "source": [ 92 | "import numpy as np \n", 93 | "\n", 94 | "c = np.array([10, 10, 110])\n", 95 | "t = np.arange(1, 4)\n", 96 | "r = 0.09\n", 97 | "d = (1. / np.power((1 + r), t))\n", 98 | "B = np.sum(d * c)" 99 | ] 100 | }, 101 | { 102 | "cell_type": "code", 103 | "execution_count": 3, 104 | "metadata": { 105 | "collapsed": false, 106 | "scrolled": true 107 | }, 108 | "outputs": [ 109 | { 110 | "name": "stdout", 111 | "output_type": "stream", 112 | "text": [ 113 | "bonds price = 102.531\n" 114 | ] 115 | } 116 | ], 117 | "source": [ 118 | "print('bonds price = {:.3f}'.format(bonds_price_discrete(t, c, r)))" 119 | ] 120 | }, 121 | { 122 | "cell_type": "markdown", 123 | "metadata": {}, 124 | "source": [ 125 | "### 4.1.1 Yield to maturity\n", 126 | "Since bonds are issued in terms of interest rate, it is also useful to find an interest rate number that\n", 127 | "summarizes the terms of the bond. The obvious way of doing that is asking the question: What is the\n", 128 | "internal rate of return on the investment of buying the bond now and keeping the bond to maturity?\n", 129 | "The answer to that question is the yield to maturity of a bond. The yield to maturity is the interest\n", 130 | "rate that makes the present value of the future coupon payments equal to the current bond price, that\n", 131 | "is, for a known price $B_0$, the yield is the solution y to the equation\n", 132 | "\n", 133 | "$$B_0\\sum_{t=1}^{T}\\frac{C_t}{(1+y)^t}$$" 134 | ] 135 | }, 136 | { 137 | "cell_type": "markdown", 138 | "metadata": {}, 139 | "source": [ 140 | "This calculation therefore has the same qualifications as discussed earlier calculating IRR, it supposes\n", 141 | "reinvestment of coupon at the bond yield (the IRR).\n", 142 | "\n", 143 | "There is much less likelihood we’ll have technical problems with multiple solutions when doing this yield\n", 144 | "estimation for bonds, since the structure of cash flows is such that there exist only one solution to the\n", 145 | "equation. The algorithm for finding a bonds yield to maturity shown in **Code 4.2** is thus simple\n", 146 | "bisection. We know that the bond yield is above zero and set zero as a lower bound on the bond yield.\n", 147 | "We then find an upper bound on the yield by increasing the interest rate until the bond price with this\n", 148 | "interest rate is negative. We then bisect the interval between the upper and lower until we are “close\n", 149 | "enough.” **Code 4.2** implements this idea." 150 | ] 151 | }, 152 | { 153 | "cell_type": "code", 154 | "execution_count": 4, 155 | "metadata": { 156 | "collapsed": false 157 | }, 158 | "outputs": [], 159 | "source": [ 160 | "# Code 4.2: Bond yield calculation with discrete, annual compounding\n", 161 | "\n", 162 | "def bond_yield_to_maturity_discrete(times, cashflows, bondprice):\n", 163 | " \n", 164 | " ACCURACY = 1e-5\n", 165 | " MAX_ITERATIONS = 200\n", 166 | " bot = 0\n", 167 | " top = 1.\n", 168 | " \n", 169 | " while bonds_price_discrete(times, cashflows, top) > bondprice: \n", 170 | " top = top * 2\n", 171 | " \n", 172 | " r = .5 * (top + bot)\n", 173 | " \n", 174 | " for _ in range(MAX_ITERATIONS):\n", 175 | " diff = bonds_price_discrete(times, cashflows, r) - bondprice\n", 176 | " \n", 177 | " if np.abs(diff) < ACCURACY:\n", 178 | " return r\n", 179 | " \n", 180 | " if diff > 0:\n", 181 | " bot = r\n", 182 | " \n", 183 | " else:\n", 184 | " top = r\n", 185 | " \n", 186 | " r = .5 * (top + bot)\n", 187 | " \n", 188 | " return r" 189 | ] 190 | }, 191 | { 192 | "cell_type": "markdown", 193 | "metadata": {}, 194 | "source": [ 195 | "#### Example \n", 196 | "A 3 year bond with a face value of $100 makes annual coupon payments of 10%. The current interest rate\n", 197 | "(with annual compounding) is 9%.\n", 198 | "\n", 199 | "1. Find the bond’s current price.\n", 200 | "2. Find the bond’s yield to maturity." 201 | ] 202 | }, 203 | { 204 | "cell_type": "code", 205 | "execution_count": 5, 206 | "metadata": { 207 | "collapsed": false 208 | }, 209 | "outputs": [], 210 | "source": [ 211 | "c = np.array([10, 10, 110])\n", 212 | "t = np.arange(1, 4)\n", 213 | "r = .09\n", 214 | "b = np.sum(c * (1. / np.power((1 + r), t)))" 215 | ] 216 | }, 217 | { 218 | "cell_type": "code", 219 | "execution_count": 6, 220 | "metadata": { 221 | "collapsed": false 222 | }, 223 | "outputs": [ 224 | { 225 | "name": "stdout", 226 | "output_type": "stream", 227 | "text": [ 228 | "Bond price, 9 percent discretely compounded interest = 102.531\n", 229 | "bond yield to maturity = 0.09\n" 230 | ] 231 | } 232 | ], 233 | "source": [ 234 | "print('Bond price, 9 percent discretely compounded interest = {:.3f}'.format(\n", 235 | " bonds_price_discrete(t, c, r)))\n", 236 | "\n", 237 | "print('bond yield to maturity = {:.2f}'.format(bond_yield_to_maturity_discrete(t, c, b)))" 238 | ] 239 | }, 240 | { 241 | "cell_type": "markdown", 242 | "metadata": {}, 243 | "source": [ 244 | "### 4.1.3 Duration\n", 245 | "\n", 246 | "When holding a bond one would like to know how sensitive the value of the bond is to changes in\n", 247 | "economic environment. The most relevent piece of the economic environment is the current interest\n", 248 | "rate. An important component of such calculation is the duration of a bond. The duration of a bond\n", 249 | "should be interpreted as the weighted average maturity of the bond, and is calculated as\n", 250 | "\n", 251 | "$$Duration = \\frac{\\sum_{t}t\\frac{C_t}{(1+r)^t}}{Bond\\ Price'}$$\n", 252 | "\n", 253 | "where $C_t$ is the cash flow in period $t$, and $r$ the interest rate. Using the bond price calculated in equation 4.1 we calculate duration as\n", 254 | "\n", 255 | "$$D=\\frac{\\sum_{t}\\frac{tC_t}{(1+r)^t}}{\\sum_{t}\\frac{C_t}{((1+r)^t}}$$" 256 | ] 257 | }, 258 | { 259 | "cell_type": "code", 260 | "execution_count": 7, 261 | "metadata": { 262 | "collapsed": true 263 | }, 264 | "outputs": [], 265 | "source": [ 266 | "# Code 4.3: Bond duration using discrete, annual compounding and a flat term structure\n", 267 | "\n", 268 | "def bonds_duration_discrete(times, cashflows, r):\n", 269 | " \n", 270 | " b = 0\n", 271 | " d = 0\n", 272 | " \n", 273 | " for i in range(len(times)):\n", 274 | " \n", 275 | " d += times[i] * cashflows[i] / np.power((1 + r), times[i])\n", 276 | " b += cashflows[i] / np.power((1 + r), times[i])\n", 277 | " \n", 278 | " return d / b" 279 | ] 280 | }, 281 | { 282 | "cell_type": "markdown", 283 | "metadata": {}, 284 | "source": [ 285 | "An alternative approach to calculating duration is calculate the yield to maturity $y$ for the bond, and\n", 286 | "use that in estimating the bond price. This is called *Macaulay Duration*. First one calculates $y$, the\n", 287 | "yield to maturity, from\n", 288 | "\n", 289 | "$$Bond\\ price = \\sum_{t=1}^{T}\\frac{C_t}{(1+y)^t}$$\n", 290 | "\n", 291 | "and then use this y in the duration calculation:\n", 292 | "\n", 293 | "$$ Macaulay\\ duration=\\frac{\\sum_{t}\\frac{tC_t}{(1+r)^t}}{\\sum_{t}\\frac{C_t}{((1+r)^t}}$$\n", 294 | "\n", 295 | "Note though, that in the present case, with a flat term structure, these should produce the same number.\n", 296 | "If the bond is priced correctly, the yield to maturity must equal the current interest rate. If $r = y$ the\n", 297 | "two calculations in equations (4.4) and (4.5) obviously produces the same number." 298 | ] 299 | }, 300 | { 301 | "cell_type": "markdown", 302 | "metadata": {}, 303 | "source": [ 304 | "#### Example\n", 305 | "A 3 year bond with a face value of $100 makes annual coupon payments of 10%. The current interest rate\n", 306 | "(with annual compounding) is 9%." 307 | ] 308 | }, 309 | { 310 | "cell_type": "code", 311 | "execution_count": 8, 312 | "metadata": { 313 | "collapsed": true 314 | }, 315 | "outputs": [], 316 | "source": [ 317 | "# Code 4.4: Calculating the Macaulay duration of a bond\n", 318 | "\n", 319 | "def bonds_duration_macaulay_discrete(times, cashflows, bondprice):\n", 320 | " y = bond_yield_to_maturity_discrete(times, cashflows, bondprice)\n", 321 | " \n", 322 | " return bonds_duration_discrete(times, cashflows, y) # use YTM in duration calculation" 323 | ] 324 | }, 325 | { 326 | "cell_type": "markdown", 327 | "metadata": {}, 328 | "source": [ 329 | "1. Determine the current bond price.\n", 330 | "2. Calculate the duration using the current interest rate.\n", 331 | "3. Calculate the duration using the MaCaulay definition.\n", 332 | "\n", 333 | "Need to calculate the following:\n", 334 | "\n", 335 | "The current bond price: $B_0=\\frac{10}{(1+0.09)^1}+\\frac{10}{(1+0.09)^2}+\\frac{110}{(1+0.09)^3}=102.531$\n", 336 | "\n", 337 | "The bond's duration: $D=\\frac{1}{102.531}\\Big(\\frac{1.10}{1.09}+\\frac{2.10}{1.09^2}+\\frac{3.110}{1.09^3}\\Big)=2.74$" 338 | ] 339 | }, 340 | { 341 | "cell_type": "code", 342 | "execution_count": 9, 343 | "metadata": { 344 | "collapsed": false 345 | }, 346 | "outputs": [], 347 | "source": [ 348 | "c = np.array([10., 10, 110])\n", 349 | "t = np.arange(1, 4)\n", 350 | "r = .09\n", 351 | "b = np.sum(c * (1. / np.power((1 + r), t)))\n", 352 | "d = np.sum(( 1 / b) * t * c * (1. / np.power((1 + r), t)))\n", 353 | "y = np.irr(np.insert(c, 0, -b))\n", 354 | "dm = np.sum((1 / b) * t * c * (1. / np.power((1 + r), t)))" 355 | ] 356 | }, 357 | { 358 | "cell_type": "code", 359 | "execution_count": 10, 360 | "metadata": { 361 | "collapsed": false 362 | }, 363 | "outputs": [ 364 | { 365 | "name": "stdout", 366 | "output_type": "stream", 367 | "text": [ 368 | "bonds price = 102.531\n", 369 | "bond duration = 2.73895\n", 370 | "bond macaulay = 2.73895\n" 371 | ] 372 | } 373 | ], 374 | "source": [ 375 | "print('bonds price = {:.3f}'.format(bonds_price_discrete(t, c, r)))\n", 376 | "print('bond duration = {:.5f}'.format(bonds_duration_discrete(t, c, r)))\n", 377 | "print('bond macaulay = {:.5f}'.format(bonds_duration_macaulay_discrete(t, c, b)))" 378 | ] 379 | }, 380 | { 381 | "cell_type": "markdown", 382 | "metadata": {}, 383 | "source": [ 384 | "### 4.1.4 Measuring bond sensitivity to interest rate changes\n", 385 | "\n", 386 | "Now, the reason for why we say that we can measure the sensitivity of a bond price using duration. To\n", 387 | "a first approximation, $\\Delta B_0$, the change in the bond price for a small change in the interest rate $\\Delta r$, can\n", 388 | "be calculated\n", 389 | "\n", 390 | "$$\\frac{\\Delta B_0}{B_0} \\approx - \\frac{D}{1+r} \\Delta r$$\n", 391 | "\n", 392 | "where $D$ is the bond’s duration. For simplicity one often calculates the term in front of the $\\Delta y$ in the above, $\\frac{D}{1+y}$ directly and terms it the bond’s *modified duration*.\n", 393 | "\n", 394 | "$$Modified\\ Duration=D^*=\\frac{D}{1+r}$$\n", 395 | "\n", 396 | "The sensitivity calculation is then\n", 397 | "$$D^*=\\frac{D}{1+y}$$" 398 | ] 399 | }, 400 | { 401 | "cell_type": "code", 402 | "execution_count": 11, 403 | "metadata": { 404 | "collapsed": false 405 | }, 406 | "outputs": [], 407 | "source": [ 408 | "# Code 4.5: Modified duration\n", 409 | "def bonds_duration_modifed_discrete(times, cashflows, bond_price):\n", 410 | " \n", 411 | " y = bond_yield_to_maturity_discrete(times, cashflows, bond_price)\n", 412 | " d = bonds_duration_discrete(times, cashflows, y)\n", 413 | " \n", 414 | " return d / (1 + y)" 415 | ] 416 | }, 417 | { 418 | "cell_type": "markdown", 419 | "metadata": {}, 420 | "source": [ 421 | "The modified duration measures the angle of the tangent at the current bond yield. Approximating\n", 422 | "the change in bond price with duration is thus only a first order approximation. To improve on this\n", 423 | "approximation we also need to account for the curvature in the relationship between bond price and\n", 424 | "interest rate. To quantify this curvature we calculate the *convexity* of a bond.\n", 425 | "\n", 426 | "$$Convexity=Cx=\\frac{1}{B_0}\\frac{1}{((1+r)^2}\\sum_{t=1}^{T}(t+t^2)\\frac{C_t}{(1+r)^t}$$\n", 427 | "\n", 428 | "This calculation is implemented in **Code 4.6**. To improve on the estimate of how the bond price" 429 | ] 430 | }, 431 | { 432 | "cell_type": "code", 433 | "execution_count": 12, 434 | "metadata": { 435 | "collapsed": false 436 | }, 437 | "outputs": [], 438 | "source": [ 439 | "# Code 4.6: Bond convexity with a flat term structure and annual compounding\n", 440 | "\n", 441 | "def bonds_convexity_discrete(times, cashflows, r):\n", 442 | " \n", 443 | " cx = 0.\n", 444 | " \n", 445 | " for i in range(len(times)):\n", 446 | " cx += cashflows[i] * times[i] * (times[i] + 1) / np.power((1 + r), times[i])\n", 447 | " \n", 448 | " b = bonds_price_discrete(times, cashflows, r)\n", 449 | "\n", 450 | " return (cx / (np.power((1 + r), 2))) / b" 451 | ] 452 | }, 453 | { 454 | "cell_type": "markdown", 455 | "metadata": {}, 456 | "source": [ 457 | "change when the interest rates changes you will then calculate\n", 458 | "\n", 459 | "$$\\frac{\\Delta B_0}{B_0}\\approx-D^*\\Delta y + \\frac{1}{2}Cx(\\Delta y)^2$$" 460 | ] 461 | }, 462 | { 463 | "cell_type": "markdown", 464 | "metadata": { 465 | "collapsed": true 466 | }, 467 | "source": [ 468 | "#### Example \n", 469 | "A 3 year bond with a face value of $100 makes annual coupon payments of 10%. The current interest rate\n", 470 | "(with annual compounding) is 9%.\n", 471 | "1. Determine the current bond price.\n", 472 | "2. Suppose the interest rate changes to 10%, determine the new price of the bond by direct calculation.\n", 473 | "3. Use duration to estimate the new price and compare it to the correct price.\n", 474 | "4. Use convexity to improve on the estimate using duration only." 475 | ] 476 | }, 477 | { 478 | "cell_type": "code", 479 | "execution_count": 13, 480 | "metadata": { 481 | "collapsed": false 482 | }, 483 | "outputs": [], 484 | "source": [ 485 | "c = np.array([10., 10, 110])\n", 486 | "t = np.arange(1, 4)\n", 487 | "r = .09\n", 488 | "b = np.sum(c * (1. / np.power((1 + r), t)))\n", 489 | "d = np.sum(( 1 / b) * t * c * (1. / np.power((1 + r), t)))" 490 | ] 491 | }, 492 | { 493 | "cell_type": "code", 494 | "execution_count": 14, 495 | "metadata": { 496 | "collapsed": false 497 | }, 498 | "outputs": [ 499 | { 500 | "name": "stdout", 501 | "output_type": "stream", 502 | "text": [ 503 | "bonds price = 102.531\n", 504 | "bond duration = 2.73895\n", 505 | "bond macaulay = 2.51280\n", 506 | "bond convexity = 8.93248\n", 507 | "new bond price = 100\n" 508 | ] 509 | } 510 | ], 511 | "source": [ 512 | "print('bonds price = {:.3f}'.format(bonds_price_discrete(t, c, r)))\n", 513 | "print('bond duration = {:.5f}'.format(bonds_duration_discrete(t, c, r)))\n", 514 | "print('bond macaulay = {:.5f}'.format(bonds_duration_modifed_discrete(t, c, b)))\n", 515 | "print('bond convexity = {:.5f}'.format(bonds_convexity_discrete(t, c, r)))\n", 516 | "print('new bond price = {:.0f}'.format(bonds_price_discrete(t, c, .1)))" 517 | ] 518 | }, 519 | { 520 | "cell_type": "markdown", 521 | "metadata": {}, 522 | "source": [ 523 | "### 4.2 Continously compounded interest\n", 524 | "\n", 525 | "Some important differences is worth pointing out. When using continously compounded interest, one\n", 526 | "does not need the concept of *modified duration*. In the continously compounded case one uses the\n", 527 | "calculated duration directly to approximate bond changes, as seen in the formulas describing the approximation of bond price changes. Note also the difference in the *convexity* calculation, one does not divide by $(1 + y)^2$ in the continously compounded formula, as was done in the discrete case." 528 | ] 529 | }, 530 | { 531 | "cell_type": "code", 532 | "execution_count": 15, 533 | "metadata": { 534 | "collapsed": true 535 | }, 536 | "outputs": [], 537 | "source": [ 538 | "# Code 4.7: Bond price calculation with continously compounded interest and a flat term structure\n", 539 | "def bonds_price(cashflows_times, cashflows, r):\n", 540 | " \n", 541 | " p = 0\n", 542 | " \n", 543 | " for i in range(len(cashflows_times)):\n", 544 | " p += np.exp(-r * cashflows_times[i]) * cashflows[i]\n", 545 | " \n", 546 | " return p" 547 | ] 548 | }, 549 | { 550 | "cell_type": "code", 551 | "execution_count": 16, 552 | "metadata": { 553 | "collapsed": true 554 | }, 555 | "outputs": [], 556 | "source": [ 557 | "# Code 4.8: Bond duration calculation with continously compounded interest and a flat term strucutre\n", 558 | "def bonds_duration(cashflows_times, cashflows, r):\n", 559 | " \n", 560 | " s = 0\n", 561 | " d1 = 0\n", 562 | " \n", 563 | " for i in range(len(cashflows_times)):\n", 564 | " s += cashflows[i] * np.exp(-r * cashflows_times[i])\n", 565 | " d1 += cashflows_times[i] * cashflows[i] * np.exp(-r * cashflows_times[i])\n", 566 | " \n", 567 | " return d1 / s" 568 | ] 569 | }, 570 | { 571 | "cell_type": "code", 572 | "execution_count": 17, 573 | "metadata": { 574 | "collapsed": true 575 | }, 576 | "outputs": [], 577 | "source": [ 578 | "# Code 4.9: Calculating the Macaulay duration of a bond with continously\n", 579 | "# compounded interest and a flat term structure\n", 580 | "def bonds_duration_macaulay(cashflows_times, cashflows, bond_price):\n", 581 | " \n", 582 | " y = bond_yield_to_maturity_discrete(cashflows_times, cashflows, bond_price)\n", 583 | " \n", 584 | " return bonds_duration(cashflows_times, cashflows, y) # use YTM in duration" 585 | ] 586 | }, 587 | { 588 | "cell_type": "code", 589 | "execution_count": 18, 590 | "metadata": { 591 | "collapsed": true 592 | }, 593 | "outputs": [], 594 | "source": [ 595 | "# Code 4.10: Bond convexity calculation with continously compounded interest\n", 596 | "# and a flat term structure\n", 597 | "def bonds_convexity(times, cashflows, r):\n", 598 | " \n", 599 | " c = 0\n", 600 | " for i in range(len(times)):\n", 601 | " \n", 602 | " c += cashflows[i] * np.power(times[i], 2) * np.exp(-r * times[i])\n", 603 | " \n", 604 | " b = bonds_price(times, cashflows, r)\n", 605 | " \n", 606 | " return c / b" 607 | ] 608 | }, 609 | { 610 | "cell_type": "markdown", 611 | "metadata": {}, 612 | "source": [ 613 | "#### Example\n", 614 | "A 3 year bond with a face value of $100 makes annual coupon payments of 10%. The current interest rate\n", 615 | "(with continous compounding) is 9%.\n", 616 | "1. Calculate the bond’s price, yield to maturity, duration and convexity.\n", 617 | "2. Suppose the interest rate falls to 8%. Estimate the new bond price using duration, and compare with\n", 618 | "the actual bond price using the correct interest rate." 619 | ] 620 | }, 621 | { 622 | "cell_type": "code", 623 | "execution_count": 19, 624 | "metadata": { 625 | "collapsed": true 626 | }, 627 | "outputs": [], 628 | "source": [ 629 | "c = np.array([10., 10, 110])\n", 630 | "t = np.arange(1, 4)\n", 631 | "r = .09" 632 | ] 633 | }, 634 | { 635 | "cell_type": "code", 636 | "execution_count": 20, 637 | "metadata": { 638 | "collapsed": false 639 | }, 640 | "outputs": [ 641 | { 642 | "name": "stdout", 643 | "output_type": "stream", 644 | "text": [ 645 | "bonds price = 101.464\n", 646 | "bond duration = 2.73753\n", 647 | "bond convexity = 7.86779\n", 648 | "new bond price = 104.282\n" 649 | ] 650 | } 651 | ], 652 | "source": [ 653 | "print('bonds price = {:.3f}'.format(bonds_price(t, c, r)))\n", 654 | "print('bond duration = {:.5f}'.format(bonds_duration(t, c, r)))\n", 655 | "print('bond convexity = {:.5f}'.format(bonds_convexity(t, c, r)))\n", 656 | "print('new bond price = {:.3f}'.format(bonds_price(t, c, .08)))" 657 | ] 658 | }, 659 | { 660 | "cell_type": "markdown", 661 | "metadata": {}, 662 | "source": [ 663 | "The term structure is flat, and compounding is continous. Consider two definitions of duration, the “usual” definition $D = \\frac{1}{B_0}\\sum_{i}t_iC_{t_i}e^{-rt}$ and the Macaulay defintion: $D=\\frac{1}{b_0}\\sum_{i}t_iC_{t_i}e^{-yt_i}$, where $B_0$ is the current bond price, $C_{t_i}$ is the coupon payment at date $t_i$, $r$ is the current interest rate and $y$ is the bond’s yield to maturity." 664 | ] 665 | }, 666 | { 667 | "cell_type": "code", 668 | "execution_count": null, 669 | "metadata": { 670 | "collapsed": true 671 | }, 672 | "outputs": [], 673 | "source": [] 674 | } 675 | ], 676 | "metadata": { 677 | "anaconda-cloud": {}, 678 | "kernelspec": { 679 | "display_name": "Python [default]", 680 | "language": "python", 681 | "name": "python3" 682 | }, 683 | "language_info": { 684 | "codemirror_mode": { 685 | "name": "ipython", 686 | "version": 3 687 | }, 688 | "file_extension": ".py", 689 | "mimetype": "text/x-python", 690 | "name": "python", 691 | "nbconvert_exporter": "python", 692 | "pygments_lexer": "ipython3", 693 | "version": "3.5.1" 694 | } 695 | }, 696 | "nbformat": 4, 697 | "nbformat_minor": 1 698 | } 699 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Financial Numerical Recipes in Python 2 | 3 | Jupyter notebooks of "Financial Numerical Recipes in C++ by Bernt Arne Ødegaard " rewritten in Python. 4 | 5 | The textbook and C++ code can be found at http://finance.bi.no/~bernt/gcc_prog/recipes/recipes/ 6 | 7 | ##Financial Numerical Recipes in C++ 8 | ### Table of Contents 9 | - [Chapter 3 - The value of time](https://nbviewer.jupyter.org/github/jeffrey-liang/Financial-Numerical-Recipes-in-Python/blob/master/Chapter%203%20-%20The%20value%20of%20time.ipynb) 10 | - [Chapter 4 - Bond pricing with a flat term structure](https://nbviewer.jupyter.org/github/jeffrey-liang/Financial-Numerical-Recipes-in-Python/blob/master/Chapter%204%20-%20Bond%20Pricing%20with%20a%20flat%20term%20structure.ipynb) 11 | - Chapter 5 - The term strucutre of interest rates and an object lession 12 | - Chapter 6 - The Mean Variance Frontier 13 | - Chapter 7 - Futures algoritms. 14 | - Chapter 8 - Binomial option pricing 15 | - Chapter 9 - Basic Option Pricing, the Black Scholes formula 16 | - Chapter 10 - Warrants 17 | - Chapter 11 - Extending the Black Scholes formula 18 | - Chapter 12 - Option pricing with binomial approximations 19 | - Chapter 13 - Finite Differences 20 | - Chapter 14 - Option pricing by simulation 21 | - Chapter 15 - Pricing American Options – Approximations 22 | - Chapter 16 - Average, lookback and other exotic options 23 | - Chapter 17 - Generic binomial pricing 24 | - Chapter 18 - Trinomial trees 25 | - Chapter 19 - Alternatives to the Black Scholes type option formula 26 | - Chapter 20 - Pricing of bond options, basic models 27 | - Chapter 21 - Credit risk 28 | - Chapter 22 - Term Structure Models 29 | - Chapter 23 - Binomial Term Structure models 30 | - Chapter 24 - Interest rate trees 31 | - Chapter 25 - Building term structure trees using the Ho and Lee (1986) approach 32 | - Chapter 26 - Term Structure Derivatives 33 | --------------------------------------------------------------------------------