|
6 | 6 | "metadata": { |
7 | 7 | "collapsed": true, |
8 | 8 | "ExecuteTime": { |
9 | | - "end_time": "2025-05-23T02:31:22.631355Z", |
10 | | - "start_time": "2025-05-23T02:31:22.625849Z" |
| 9 | + "end_time": "2025-05-23T02:54:25.031837Z", |
| 10 | + "start_time": "2025-05-23T02:54:25.027815Z" |
11 | 11 | } |
12 | 12 | }, |
13 | 13 | "source": [ |
14 | 14 | "from financepy.utils import *\n", |
15 | 15 | "from financepy.products.rates import *\n", |
16 | 16 | "from financepy.market.curves import *\n", |
17 | | - "import datetime as dt" |
| 17 | + "import datetime as dt\n", |
| 18 | + "\n", |
| 19 | + "from notebooks.products.rates.FINIBORSWAP_ReplicationgBONDMATHDurationExample import payment_periods" |
18 | 20 | ], |
19 | 21 | "outputs": [], |
20 | | - "execution_count": 2 |
| 22 | + "execution_count": 34 |
21 | 23 | }, |
22 | 24 | { |
23 | 25 | "metadata": { |
24 | 26 | "ExecuteTime": { |
25 | | - "end_time": "2025-05-23T02:31:22.679560Z", |
26 | | - "start_time": "2025-05-23T02:31:22.657680Z" |
| 27 | + "end_time": "2025-05-23T02:54:25.043454Z", |
| 28 | + "start_time": "2025-05-23T02:54:25.039940Z" |
27 | 29 | } |
28 | 30 | }, |
29 | 31 | "cell_type": "code", |
|
63 | 65 | ], |
64 | 66 | "id": "1ebf43316efee835", |
65 | 67 | "outputs": [], |
66 | | - "execution_count": 3 |
| 68 | + "execution_count": 35 |
67 | 69 | }, |
68 | 70 | { |
69 | 71 | "metadata": { |
70 | 72 | "ExecuteTime": { |
71 | | - "end_time": "2025-05-23T02:31:22.694667Z", |
72 | | - "start_time": "2025-05-23T02:31:22.687165Z" |
| 73 | + "end_time": "2025-05-23T02:54:25.056980Z", |
| 74 | + "start_time": "2025-05-23T02:54:25.052895Z" |
73 | 75 | } |
74 | 76 | }, |
75 | 77 | "cell_type": "code", |
|
89 | 91 | "31-MAR-2024" |
90 | 92 | ] |
91 | 93 | }, |
92 | | - "execution_count": 4, |
| 94 | + "execution_count": 36, |
93 | 95 | "metadata": {}, |
94 | 96 | "output_type": "execute_result" |
95 | 97 | } |
96 | 98 | ], |
97 | | - "execution_count": 4 |
| 99 | + "execution_count": 36 |
98 | 100 | }, |
99 | 101 | { |
100 | 102 | "metadata": { |
101 | 103 | "ExecuteTime": { |
102 | | - "end_time": "2025-05-23T02:31:22.727011Z", |
103 | | - "start_time": "2025-05-23T02:31:22.719602Z" |
| 104 | + "end_time": "2025-05-23T02:54:25.078736Z", |
| 105 | + "start_time": "2025-05-23T02:54:25.073700Z" |
104 | 106 | } |
105 | 107 | }, |
106 | 108 | "cell_type": "code", |
|
123 | 125 | ], |
124 | 126 | "id": "290b7a06932da41d", |
125 | 127 | "outputs": [], |
126 | | - "execution_count": 5 |
| 128 | + "execution_count": 37 |
127 | 129 | }, |
128 | 130 | { |
129 | 131 | "metadata": { |
130 | 132 | "ExecuteTime": { |
131 | | - "end_time": "2025-05-23T02:31:22.746919Z", |
132 | | - "start_time": "2025-05-23T02:31:22.739589Z" |
| 133 | + "end_time": "2025-05-23T02:54:25.092695Z", |
| 134 | + "start_time": "2025-05-23T02:54:25.087190Z" |
133 | 135 | } |
134 | 136 | }, |
135 | 137 | "cell_type": "code", |
|
142 | 144 | "0.030065619962567392" |
143 | 145 | ] |
144 | 146 | }, |
145 | | - "execution_count": 6, |
| 147 | + "execution_count": 38, |
146 | 148 | "metadata": {}, |
147 | 149 | "output_type": "execute_result" |
148 | 150 | } |
149 | 151 | ], |
150 | | - "execution_count": 6 |
| 152 | + "execution_count": 38 |
151 | 153 | }, |
152 | 154 | { |
153 | 155 | "metadata": { |
154 | 156 | "ExecuteTime": { |
155 | | - "end_time": "2025-05-23T02:31:22.765913Z", |
156 | | - "start_time": "2025-05-23T02:31:22.759349Z" |
| 157 | + "end_time": "2025-05-23T02:54:25.120452Z", |
| 158 | + "start_time": "2025-05-23T02:54:25.116135Z" |
157 | 159 | } |
158 | 160 | }, |
159 | 161 | "cell_type": "code", |
|
166 | 168 | "-404094.769553849" |
167 | 169 | ] |
168 | 170 | }, |
169 | | - "execution_count": 7, |
| 171 | + "execution_count": 39, |
170 | 172 | "metadata": {}, |
171 | 173 | "output_type": "execute_result" |
172 | 174 | } |
173 | 175 | ], |
174 | | - "execution_count": 7 |
| 176 | + "execution_count": 39 |
175 | 177 | }, |
176 | 178 | { |
177 | 179 | "metadata": { |
178 | 180 | "ExecuteTime": { |
179 | | - "end_time": "2025-05-23T02:31:22.784960Z", |
180 | | - "start_time": "2025-05-23T02:31:22.779808Z" |
| 181 | + "end_time": "2025-05-23T02:54:25.148481Z", |
| 182 | + "start_time": "2025-05-23T02:54:25.143313Z" |
181 | 183 | } |
182 | 184 | }, |
183 | 185 | "cell_type": "code", |
|
190 | 192 | "-6.794198629548404" |
191 | 193 | ] |
192 | 194 | }, |
193 | | - "execution_count": 8, |
| 195 | + "execution_count": 40, |
194 | 196 | "metadata": {}, |
195 | 197 | "output_type": "execute_result" |
196 | 198 | } |
197 | 199 | ], |
198 | | - "execution_count": 8 |
| 200 | + "execution_count": 40 |
199 | 201 | }, |
200 | 202 | { |
201 | 203 | "metadata": { |
202 | 204 | "ExecuteTime": { |
203 | | - "end_time": "2025-05-23T02:31:22.817161Z", |
204 | | - "start_time": "2025-05-23T02:31:22.812093Z" |
| 205 | + "end_time": "2025-05-23T02:54:25.169741Z", |
| 206 | + "start_time": "2025-05-23T02:54:25.164469Z" |
205 | 207 | } |
206 | 208 | }, |
207 | 209 | "cell_type": "code", |
|
214 | 216 | "6.794198629548404" |
215 | 217 | ] |
216 | 218 | }, |
217 | | - "execution_count": 9, |
| 219 | + "execution_count": 41, |
218 | 220 | "metadata": {}, |
219 | 221 | "output_type": "execute_result" |
220 | 222 | } |
221 | 223 | ], |
222 | | - "execution_count": 9 |
| 224 | + "execution_count": 41 |
223 | 225 | }, |
224 | 226 | { |
225 | 227 | "metadata": { |
226 | 228 | "ExecuteTime": { |
227 | | - "end_time": "2025-05-23T02:31:22.858301Z", |
228 | | - "start_time": "2025-05-23T02:31:22.853154Z" |
| 229 | + "end_time": "2025-05-23T02:54:25.199176Z", |
| 230 | + "start_time": "2025-05-23T02:54:25.193898Z" |
229 | 231 | } |
230 | 232 | }, |
231 | 233 | "cell_type": "code", |
|
238 | 240 | "-6.743511664816526" |
239 | 241 | ] |
240 | 242 | }, |
241 | | - "execution_count": 10, |
| 243 | + "execution_count": 42, |
242 | 244 | "metadata": {}, |
243 | 245 | "output_type": "execute_result" |
244 | 246 | } |
245 | 247 | ], |
246 | | - "execution_count": 10 |
| 248 | + "execution_count": 42 |
247 | 249 | }, |
248 | 250 | { |
249 | 251 | "metadata": { |
250 | 252 | "ExecuteTime": { |
251 | | - "end_time": "2025-05-23T02:31:22.894478Z", |
252 | | - "start_time": "2025-05-23T02:31:22.889858Z" |
| 253 | + "end_time": "2025-05-23T02:54:25.228763Z", |
| 254 | + "start_time": "2025-05-23T02:54:25.224367Z" |
253 | 255 | } |
254 | 256 | }, |
255 | 257 | "cell_type": "code", |
|
262 | 264 | "6.743511664816526" |
263 | 265 | ] |
264 | 266 | }, |
265 | | - "execution_count": 11, |
| 267 | + "execution_count": 43, |
266 | 268 | "metadata": {}, |
267 | 269 | "output_type": "execute_result" |
268 | 270 | } |
269 | 271 | ], |
270 | | - "execution_count": 11 |
| 272 | + "execution_count": 43 |
271 | 273 | }, |
272 | 274 | { |
273 | 275 | "metadata": { |
274 | 276 | "ExecuteTime": { |
275 | | - "end_time": "2025-05-23T02:31:22.942622Z", |
276 | | - "start_time": "2025-05-23T02:31:22.937046Z" |
| 277 | + "end_time": "2025-05-23T02:54:25.264697Z", |
| 278 | + "start_time": "2025-05-23T02:54:25.260233Z" |
277 | 279 | } |
278 | 280 | }, |
279 | 281 | "cell_type": "code", |
|
323 | 325 | ] |
324 | 326 | } |
325 | 327 | ], |
326 | | - "execution_count": 12 |
| 328 | + "execution_count": 44 |
327 | 329 | }, |
328 | 330 | { |
329 | 331 | "metadata": { |
330 | 332 | "ExecuteTime": { |
331 | | - "end_time": "2025-05-23T02:31:22.977499Z", |
332 | | - "start_time": "2025-05-23T02:31:22.971711Z" |
| 333 | + "end_time": "2025-05-23T02:54:25.286790Z", |
| 334 | + "start_time": "2025-05-23T02:54:25.282897Z" |
333 | 335 | } |
334 | 336 | }, |
335 | 337 | "cell_type": "code", |
|
361 | 363 | ] |
362 | 364 | } |
363 | 365 | ], |
364 | | - "execution_count": 13 |
| 366 | + "execution_count": 45 |
365 | 367 | }, |
366 | 368 | { |
367 | 369 | "metadata": { |
368 | 370 | "ExecuteTime": { |
369 | | - "end_time": "2025-05-23T02:31:23.015658Z", |
370 | | - "start_time": "2025-05-23T02:31:23.010172Z" |
| 371 | + "end_time": "2025-05-23T02:54:25.315781Z", |
| 372 | + "start_time": "2025-05-23T02:54:25.311063Z" |
371 | 373 | } |
372 | 374 | }, |
373 | 375 | "cell_type": "code", |
|
399 | 401 | ] |
400 | 402 | } |
401 | 403 | ], |
402 | | - "execution_count": 14 |
| 404 | + "execution_count": 46 |
403 | 405 | }, |
404 | 406 | { |
405 | 407 | "metadata": { |
406 | 408 | "ExecuteTime": { |
407 | | - "end_time": "2025-05-23T02:31:23.043840Z", |
408 | | - "start_time": "2025-05-23T02:31:23.039172Z" |
| 409 | + "end_time": "2025-05-23T02:54:25.345988Z", |
| 410 | + "start_time": "2025-05-23T02:54:25.341966Z" |
409 | 411 | } |
410 | 412 | }, |
411 | 413 | "cell_type": "code", |
412 | | - "source": "swap.payer_side_profits(value_dt, zero_curve,8,-0.004)", |
| 414 | + "source": [ |
| 415 | + "payment_periods=8\n", |
| 416 | + "swap_rate_changes=-0.004\n", |
| 417 | + "swap.payer_side_profits(value_dt, zero_curve,payment_periods,swap_rate_changes)" |
| 418 | + ], |
413 | 419 | "id": "5ef5f29ad5dfad00", |
414 | 420 | "outputs": [ |
415 | 421 | { |
|
418 | 424 | "-404610.6998889916" |
419 | 425 | ] |
420 | 426 | }, |
421 | | - "execution_count": 15, |
| 427 | + "execution_count": 47, |
| 428 | + "metadata": {}, |
| 429 | + "output_type": "execute_result" |
| 430 | + } |
| 431 | + ], |
| 432 | + "execution_count": 47 |
| 433 | + }, |
| 434 | + { |
| 435 | + "metadata": { |
| 436 | + "ExecuteTime": { |
| 437 | + "end_time": "2025-05-23T02:54:25.433818Z", |
| 438 | + "start_time": "2025-05-23T02:54:25.427828Z" |
| 439 | + } |
| 440 | + }, |
| 441 | + "cell_type": "code", |
| 442 | + "source": "swap.receiver_side_profits(value_dt, zero_curve,payment_periods,swap_rate_changes)", |
| 443 | + "id": "11109a6f2da7b7dc", |
| 444 | + "outputs": [ |
| 445 | + { |
| 446 | + "data": { |
| 447 | + "text/plain": [ |
| 448 | + "404610.6998889916" |
| 449 | + ] |
| 450 | + }, |
| 451 | + "execution_count": 48, |
| 452 | + "metadata": {}, |
| 453 | + "output_type": "execute_result" |
| 454 | + } |
| 455 | + ], |
| 456 | + "execution_count": 48 |
| 457 | + }, |
| 458 | + { |
| 459 | + "metadata": { |
| 460 | + "ExecuteTime": { |
| 461 | + "end_time": "2025-05-23T02:54:25.518531Z", |
| 462 | + "start_time": "2025-05-23T02:54:25.513863Z" |
| 463 | + } |
| 464 | + }, |
| 465 | + "cell_type": "code", |
| 466 | + "source": "swap.payer_side_BPV(value_dt, zero_curve,payment_periods)", |
| 467 | + "id": "a4c532a9a90b445c", |
| 468 | + "outputs": [ |
| 469 | + { |
| 470 | + "data": { |
| 471 | + "text/plain": [ |
| 472 | + "-40461.06998889916" |
| 473 | + ] |
| 474 | + }, |
| 475 | + "execution_count": 49, |
| 476 | + "metadata": {}, |
| 477 | + "output_type": "execute_result" |
| 478 | + } |
| 479 | + ], |
| 480 | + "execution_count": 49 |
| 481 | + }, |
| 482 | + { |
| 483 | + "metadata": { |
| 484 | + "ExecuteTime": { |
| 485 | + "end_time": "2025-05-23T02:54:25.578843Z", |
| 486 | + "start_time": "2025-05-23T02:54:25.574712Z" |
| 487 | + } |
| 488 | + }, |
| 489 | + "cell_type": "code", |
| 490 | + "source": "swap.receiver_side_BPV(value_dt, zero_curve,payment_periods)", |
| 491 | + "id": "8f8630e90883e3b5", |
| 492 | + "outputs": [ |
| 493 | + { |
| 494 | + "data": { |
| 495 | + "text/plain": [ |
| 496 | + "40461.06998889916" |
| 497 | + ] |
| 498 | + }, |
| 499 | + "execution_count": 50, |
422 | 500 | "metadata": {}, |
423 | 501 | "output_type": "execute_result" |
424 | 502 | } |
425 | 503 | ], |
426 | | - "execution_count": 15 |
| 504 | + "execution_count": 50 |
427 | 505 | } |
428 | 506 | ], |
429 | 507 | "metadata": { |
|
0 commit comments