Examples by kramkov

DATA CURVES FOR FINANCIAL MODELS

YIELD SHAPE 1

lambda = 0.05
initial time = 2

VALUES VERSUS TIME:

    time           value
   2.001        0.999975
   2.476        0.988194
   2.951        0.976597
   3.426        0.965182
   3.901        0.953946
   4.376        0.942884
   4.851        0.931994
   5.326        0.921274
   5.801        0.910719
   6.276        0.900328

YIELD SHAPE 2

lambda = 0.05
initial time = 2

VALUES VERSUS TIME:

    time           value
   2.001      2.49992e-05
   2.476       0.0117129
   2.951       0.0230346
   3.426       0.0339999
   3.901       0.0446182
   4.376       0.0548986
   4.851       0.0648502
   5.326       0.0744817
   5.801       0.0838016
   6.276       0.0928181

FORWARD PRICES FOR EXCHANGE RATES

initial time = 1
spot FX rate = 100
domestic interest rate = 0.12
foreign interest rate = 0.05

VALUES VERSUS TIME:

    time           value
       1             100
    1.05         100.351
     1.1         100.702
    1.15         101.056
     1.2          101.41
    1.25         101.765
     1.3         102.122
    1.35          102.48
     1.4          102.84
    1.45           103.2

FORWARD PRICES FOR AN ANNUITY

interest rate = 0.07
initial time = 1

annuity parameters:
notional = 1
period between payments = 0.25
number of payments = 6
rate = 0.07

clean prices:

VALUES VERSUS TIME:

    time           value
       1       0.0988059
 1.13636       0.0902081
 1.27273       0.0815915
 1.40909       0.0728439
 1.54545       0.0640481
 1.68182       0.0551475
 1.81818       0.0461693
 1.95455       0.0371124
 2.09091       0.0279485
 2.22727       0.0187322

dirty prices:

VALUES VERSUS TIME:

    time           value
       1       0.0988059
 1.13636       0.0997535
 1.27273       0.0831824
 1.40909       0.0839802
 1.54545       0.0672299
 1.68182       0.0678747
 1.81818        0.050942
 1.95455       0.0514306
 2.09091       0.0343122
 2.22727       0.0346413

INTERPOLATION OF DATA CURVES

LOG LINEAR INTERPOLATION OF DISCOUNT CURVE

initial time = 1

Input discount factors:

      time           value      
       1.5          0.9674      
         2        0.939098      
       2.5        0.914449      
         3        0.892917      
       3.5        0.874059      
         4        0.857504      
       4.5         0.84294      
         5        0.830103      
       5.5        0.818769      
         6        0.808748      
       6.5        0.799874      
         7        0.792008      

VALUES VERSUS TIME:

    time           value
       1               1
     1.6        0.961672
     2.2         0.92916
     2.8        0.901469
     3.4        0.877799
       4        0.857504
     4.6        0.840357
     5.2        0.825551
     5.8        0.812742
     6.4        0.801641

FORWARD PRICES BY INTERPOLATION OF COST-OF-CARRY RATES

spot = 100
initial time = 1

Input forward prices:

      time           value      
       1.5          103.37      
         2         106.485      
       2.5         109.355      
         3         111.992      
       3.5         114.409      
         4         116.617      
       4.5         118.632      
         5         120.467      
       5.5         122.135      
         6         123.648      

initial carry rate = 0.0662874

interpolation with cubic spline:

VALUES VERSUS TIME:

    time           value
       1             100
     1.5          103.37
       2         106.485
     2.5         109.355
       3         111.992
     3.5         114.409
       4         116.617
     4.5         118.632
       5         120.467
     5.5         122.135

LEAST-SQUARES FITTING OF DATA CURVES

DISCOUNT CURVE OBTAINED BY LEAST-SQUARES FIT OF YIELD CURVE

initial time = 1

Input discount factors:

      time           value      
       1.5          0.9674      
         2        0.939098      
       2.5        0.914449      
         3        0.892917      
       3.5        0.874059      
         4        0.857504      
       4.5         0.84294      
         5        0.830103      
       5.5        0.818769      
         6        0.808748      
       6.5        0.799874      
         7        0.792008      

We fit with constant yield.

Fitted coefficients and their covariance matrix:

       value      covariance matrix
   0.0510151       6.69773e-06

chi^2 error = 0.0008841

Fitted discount factors and their errors:

    time         value           err      
       1             1             0      
 1.66667      0.966562      0.00166764      
 2.33333      0.934242      0.00322375      
       3      0.903002      0.00467393      
 3.66667      0.872808      0.00602353      
 4.33333      0.843622      0.00727764      
       5      0.815413      0.00844115      
 5.66667      0.788147      0.0095187      
 6.33333      0.761793      0.0105148      
       7       0.73632      0.0114336      

LEAST-SQUARES FIT OF DISCOUNT CURVE IN NELSON-SIEGEL MODEL

lambda = 0.05
initial time = 1

Input discount factors:

      time           value      
       1.5          0.9674      
         2        0.939098      
       2.5        0.914449      
         3        0.892917      
       3.5        0.874059      
         4        0.857504      
       4.5         0.84294      
         5        0.830103      
       5.5        0.818769      
         6        0.808748      
       6.5        0.799874      
         7        0.792008      

Fitted coefficients and their covariance matrix:

       value                  covariance matrix
    0.485612       0.000162787      -0.000162276      -0.000181002
   -0.415815      -0.000162276       0.000161767       0.000180423
   -0.710245      -0.000181002       0.000180423       0.000201385

chi^2 error = 2.00562e-08

Fitted discount factors and their errors:

    time         value           err      
       1             1             0      
 1.66667      0.957545      2.00159e-05      
 2.33333      0.922248      2.53473e-05      
       3      0.892828      3.32175e-05      
 3.66667      0.868241      4.64687e-05      
 4.33333       0.84762      5.78835e-05      
       5      0.830236      6.3475e-05      
 5.66667      0.815469      6.91927e-05      
 6.33333      0.802782      9.66241e-05      
       7      0.791709      0.000163228      

OPTIONS ON A SINGLE STOCK IN BLACK MODEL

PARAMETERS OF BLACK MODEL:

interest rate = 0.07
spot price = 100
convenience yield = 0.02
sigma = 0.2
lambda = 0.05
initial time = 0

quality = 200

EUROPEAN PUT OPTION IN ASSET MODEL

strike = 100
maturity = 0.5

RISK REPORT: 

price = 4.3089
delta = -38.7927
one percent gamma = 2.22853

OPTION VALUES VERSUS SPOT:

    spot            option
 90.4837           9.24874
 92.3116           8.10301
 94.1765           7.03037
 96.0789           6.03745
 98.0199           5.12924
     100            4.3089
  102.02           3.57757
 104.081           2.93443
 106.184           2.37676
 108.329           1.90019
 110.517           1.49895

AMERICAN PUT OPTION IN ASSET MODEL

strike = 100

exercise times:
[0] = 0.0416667
[1] = 0.0833333
[2] = 0.125
[3] = 0.166667
[4] = 0.208333
[5] = 0.25
[6] = 0.291667
[7] = 0.333333
[8] = 0.375
[9] = 0.416667
[10] = 0.458333
[11] = 0.5

RISK REPORT: 

price = 4.5762
delta = -42.4272
one percent gamma = 2.64427

OPTION VALUES VERSUS SPOT:

    spot            option
 90.4837           10.1571
 92.3116           8.82895
 94.1765           7.60467
 96.0789           6.48729
 98.0199           5.47793
     100            4.5762
  102.02           3.78014
 104.081           3.08613
 106.184           2.48898
 108.329           1.98218
 110.517           1.55811

BARRIER UP-OR-DOWN-AND-OUT OPTION IN ASSET MODEL

lower barrier = 90
upper barrier = 110
notional = 100

barrier times:
[0] = 0.04
[1] = 0.08
[2] = 0.12
[3] = 0.16
[4] = 0.2
[5] = 0.24
[6] = 0.28
[7] = 0.32
[8] = 0.36
[9] = 0.4

RISK REPORT: 

price = 32.8592
delta = -50.7345
one percent gamma = -52.3925

OPTION VALUES VERSUS SPOT:

    spot            option
 90.4837           14.4652
 92.3116            20.753
 94.1765           26.4473
 96.0789            30.629
 98.0199           32.8144
     100           32.8592
  102.02           30.8171
 104.081           26.8985
 106.184           21.5402
 108.329            15.501
 110.517           9.78911

DOWN-AND-OUT AMERICAN CALL OPTION IN ASSET MODEL

strike = 100
lower barrier = 90

exercise times:
[0] = 0.0416667
[1] = 0.0833333
[2] = 0.125
[3] = 0.166667
[4] = 0.208333
[5] = 0.25
[6] = 0.291667
[7] = 0.333333
[8] = 0.375
[9] = 0.416667
[10] = 0.458333
[11] = 0.5

barrier times:
[0] = 0.04
[1] = 0.08
[2] = 0.12
[3] = 0.16
[4] = 0.2
[5] = 0.24
[6] = 0.28
[7] = 0.32
[8] = 0.36
[9] = 0.4

RISK REPORT: 

price = 6.53862
delta = 61.8303
one percent gamma = 2.48004

OPTION VALUES VERSUS SPOT:

    spot            option
 90.4837           1.49281
 92.3116           2.30086
 94.1765           3.23153
 96.0789            4.2506
 98.0199           5.35033
     100           6.53862
  102.02           7.82586
 104.081            9.2194
 106.184           10.7228
 108.329           12.3367
 110.517           14.0592

SWING OPTION IN ASSET MODEL

strike = 100
maximal number of exercises = 4

exercise times:
[0] = 0.0416667
[1] = 0.0833333
[2] = 0.125
[3] = 0.166667
[4] = 0.208333
[5] = 0.25
[6] = 0.291667
[7] = 0.333333
[8] = 0.375
[9] = 0.416667
[10] = 0.458333
[11] = 0.5

RISK REPORT: 

price = 25.0003
delta = 229.598
one percent gamma = 13.5614

OPTION VALUES VERSUS SPOT:

    spot            option
 90.4837            8.4908
 92.3116           10.8281
 94.1765            13.616
 96.0789           16.8902
 98.0199           20.6787
     100           25.0003
  102.02           29.8636
 104.081           35.2676
 106.184           41.2014
 108.329           47.6463
 110.517           54.5769

INTEREST RATE OPTIONS IN HULL-WHITE MODEL

PARAMETERS OF HULL-WHITE MODEL:

interest rate = 0.07
sigma = 0.02
lambda = 0.05
initial time = 0

quality = 200

CAP IN INTEREST RATE MODEL

cap parameters:
notional = 1000
period between payments = 0.25
number of payments = 6
rate = 0.077

RISK REPORT: 

price = 4.5771
delta = -436.731
one percent gamma = 330.572

OPTION VALUES VERSUS SHORT RATE:

 rate            option
 0.17           120.802
 0.15           96.2911
 0.13           71.0954
 0.11           45.4291
 0.09           20.8753
 0.07            4.5771
 0.05          0.677671
 0.03         0.0623211
 0.01        0.00320394
-0.01       8.08522e-05
-0.03        8.3588e-07

SWAP IN INTEREST RATE MODEL

swap parameters:
notional = 1000
period between payments = 0.25
number of payments = 6
rate = 0.07
we pay float and receive fixed

RISK REPORT: 

price = -0.869617
delta = 1384.09
one percent gamma = 19.6642

OPTION VALUES VERSUS SHORT RATE:

 rate            option
 0.17          -129.895
 0.15          -105.534
 0.13          -80.4718
 0.11          -54.6877
 0.09          -28.1609
 0.07         -0.869617
 0.05           27.2082
 0.03           56.0956
 0.01           85.8159
-0.01           116.393
-0.03           147.853

SWAP IN INTEREST RATE MODEL

swap parameters:
notional = 1000
period between payments = 0.25
number of payments = 6
rate = 0.07
we pay fixed and receive float

RISK REPORT: 

price = 0.869617
delta = -1384.09
one percent gamma = -19.6642

OPTION VALUES VERSUS SHORT RATE:

 rate            option
 0.17           129.895
 0.15           105.534
 0.13           80.4718
 0.11           54.6877
 0.09           28.1609
 0.07          0.869617
 0.05          -27.2082
 0.03          -56.0956
 0.01          -85.8159
-0.01          -116.393
-0.03          -147.853

SWAPTION IN INTEREST RATE MODEL

swap parameters:
notional = 1000
period between payments = 0.25
number of payments = 6
rate = 0.07
we pay float and receive fixed

maturity = 1.5

RISK REPORT: 

price = 11.3781
delta = 592.318
one percent gamma = 202.465

OPTION VALUES VERSUS SHORT RATE:

 rate            option
 0.17       0.000128513
 0.15        0.00424875
 0.13         0.0696886
 0.11          0.624955
 0.09           3.32589
 0.07           11.3781
 0.05           27.2818
 0.03           50.3176
 0.01           77.9697
-0.01            108.62
-0.03           141.881

SWAPTION IN INTEREST RATE MODEL

swap parameters:
notional = 1000
period between payments = 0.25
number of payments = 6
rate = 0.07
we pay fixed and receive float

maturity = 1.5

RISK REPORT: 

price = 12.161
delta = -562.862
one percent gamma = 153.826

OPTION VALUES VERSUS SHORT RATE:

 rate            option
 0.17            94.416
 0.15           78.8945
 0.13             61.94
 0.11           43.8781
 0.09           26.2553
 0.07            12.161
 0.05           3.97222
 0.03          0.838708
 0.01           0.10564
-0.01        0.00731502
-0.03       0.000252931

CANCELLABLE COLLAR IN INTEREST RATE MODEL

cap parameters:
notional = 1000
period between payments = 0.25
number of payments = 6
rate = 0.077

floor rate = 0.063

RISK REPORT: 

price = 4.38707
delta = -476.262
one percent gamma = 279.597

OPTION VALUES VERSUS SHORT RATE:

 rate            option
 0.17           120.802
 0.15           96.2911
 0.13           71.0954
 0.11           45.4288
 0.09           20.8644
 0.07           4.38707
 0.05          -2.74701
 0.03          -8.09666
 0.01          -13.1192
-0.01          -18.1658
-0.03          -23.2375

DOWN-AND-OUT CAP IN INTEREST RATE MODEL

cap parameters:
notional = 1000
period between payments = 0.25
number of payments = 6
rate = 0.077

lower barrier = 0.063

RISK REPORT: 

price = 4.26716
delta = -455.197
one percent gamma = 333.172

OPTION VALUES VERSUS SHORT RATE:

 rate            option
 0.17           120.802
 0.15           96.2911
 0.13           71.0954
 0.11           45.4279
 0.09            20.847
 0.07           4.26716
 0.05          0.271873
 0.03       0.000483986
 0.01      -2.45848e-08
-0.01      -1.26729e-10
-0.03      -6.53261e-13

LIBOR FUTURES IN INTEREST RATE MODEL

period for LIBOR = 0.25
number of futures times = 20
maturity = 0.25

RISK REPORT: 

price = 0.929347
delta = 0.998767
one percent gamma = -0.00245055

OPTION VALUES VERSUS SHORT RATE:

 rate            option
 0.17          0.828235
 0.15          0.848657
 0.13          0.868978
 0.11            0.8892
 0.09          0.909323
 0.07          0.929347
 0.05          0.949274
 0.03          0.969102
 0.01          0.988834
-0.01           1.00847
-0.03           1.02801

