[R-SIG-Finance] Simulation of price

Megh Dal megh700004 at yahoo.com
Mon Jul 26 10:55:43 CEST 2010


Dear all, I was trying to simulate the price based on the valatility information implied by an Option contract traded on different strike prices however at same maturity.

Following are the information on strike prices and premiums (taken from CME, and these are american options however for simplicity I assume it is european):

> dat
   Strike.price Premium
1          17.5  21.840
2          18.0  21.340
3          18.5  20.840
4          19.0  20.340
5          19.5  19.840
6          20.0  19.340
7          20.5  18.840
8          21.0  18.340
9          21.5  17.840
10         22.0  17.340
11         22.5  16.840
12         23.0  16.340
13         23.5  15.840
14         24.0  15.340
15         24.5  14.840
16         25.0  14.340
17         25.5  13.840
18         26.0  13.340
19         26.5  12.840
20         27.0  12.340
21         27.5  11.840
22         28.0  11.340
23         28.5  10.845
24         29.0  10.345
25         29.5   9.845
26         30.0   9.345
27         30.5   8.845
28         31.0   8.345
29         31.5   7.845
30         32.0   7.350
31         32.5   6.860
32         33.0   6.370
33         33.5   5.885
34         34.0   5.410
35         34.5   4.940
36         35.0   4.475
37         35.5   4.025
38         36.0   3.605
39         36.5   3.200
40         37.0   2.815
41         37.5   2.455
42         38.0   2.130
43         38.5   1.850
44         39.0   1.600
45         39.5   1.380
46         40.0   1.190
47         40.5   1.025
48         41.0   0.880
49         41.5   0.755
50         42.0   0.650
51         42.5   0.510
52         43.0   0.480
53         43.5   0.410
54         44.0   0.355
55         44.5   0.260
56         45.0   0.260
57         45.5   0.185
58         46.0   0.195
59         46.5   0.130
60         47.0   0.150
61         47.5   0.095
62         48.0   0.115
63         48.5   0.070
64         49.0   0.060
65         49.5   0.050
66         50.0   0.070
67         50.5   0.035
68         51.0   0.030
69         51.5   0.025
70         52.0   0.020
71         52.5   0.015
72         53.0   0.010
73         53.5   0.010
74         54.0   0.005
75         54.5   0.005
76         55.0   0.005
77         55.5   0.005
78         56.0   0.005
79         56.5   0.005
80         57.0   0.005
81         57.5   0.005
82         58.0   0.005
83         58.5   0.005
84         59.0   0.005
85         59.5   0.005

I used following code to extract the local volatilities at different regions of underlying:

underlyingPrice <- 39.34
timeToMaturity <- 4/12
riskFreeRate <- 5/100
impVol <- vector(length=dim(dat)[1])

library(fOptions)
for (i in 1:dim(dat)[1]) {
      impVol[i] <- (100/sqrt(250))*GBSVolatility(price=dat[i,2], TypeFlag="c", S=underlyingPrice,
                                 X=dat[i,1], Time=timeToMaturity, r=riskFreeRate, b=riskFreeRate)
      # Implied volatility (daily estimate) expressed in percentage}
res = cbind(dat, impVol); res

   Strike.price Premium impVol
1          17.5  21.840 7.724883e-15
2          18.0  21.340 1.232125e-14
3          18.5  20.840 5.917147e-15
4          19.0  20.340 1.088114e-14
5          19.5  19.840 7.094265e-15
6          20.0  19.340 1.053997e-14
7          20.5  18.840 5.426928e-15
8          21.0  18.340 9.238716e-16
9          21.5  17.840 4.436073e-15
10         22.0  17.340 4.904896e-15
11         22.5  16.840 8.370957e-15
12         23.0  16.340 3.710246e-15
13         23.5  15.840 1.961919e-14
14         24.0  15.340 3.824677e-15
15         24.5  14.840 1.301505e-14
16         25.0  14.340 1.712942e-14
17         25.5  13.840 8.658216e-16
18         26.0  13.340 3.747886e-15
19         26.5  12.840 8.214812e-15
20         27.0  12.340 5.305739e-15
21         27.5  11.840 3.354832e-15
22         28.0  11.340 1.006733e-14
23         28.5  10.845 1.030830e-14
24         29.0  10.345 1.916116e-14
25         29.5   9.845 1.253146e-14
26         30.0   9.345 1.036751e-15
27         30.5   8.845 4.400677e-16
28         31.0   8.345 6.654011e-16
29         31.5   7.845 1.070967e-14
30         32.0   7.350 4.716033e-16
31         32.5   6.860 9.312604e-15
32         33.0   6.370 4.733471e-15
33         33.5   5.885 2.210236e-15
34         34.0   5.410 1.428132e-14
35         34.5   4.940 1.780143e-15
36         35.0   4.475 1.594120e-14
37         35.5   4.025 1.125700e-14
38         36.0   3.605 4.346041e-15
39         36.5   3.200 2.285618e-15
40         37.0   2.815 7.141752e-15
41         37.5   2.455 3.150332e-15
42         38.0   2.130 8.851790e+00
43         38.5   1.850 1.048079e+01
44         39.0   1.600 1.155831e+01
45         39.5   1.380 1.239998e+01
46         40.0   1.190 1.312996e+01
47         40.5   1.025 1.376907e+01
48         41.0   0.880 1.431780e+01
49         41.5   0.755 1.482054e+01
50         42.0   0.650 1.531835e+01
51         42.5   0.510 1.511276e+01
52         43.0   0.480 1.619179e+01
53         43.5   0.410 1.655231e+01
54         44.0   0.355 1.697767e+01
55         44.5   0.260 1.647831e+01
56         45.0   0.260 1.763186e+01
57         45.5   0.185 1.706169e+01
58         46.0   0.195 1.834414e+01
59         46.5   0.130 1.755057e+01
60         47.0   0.150 1.910064e+01
61         47.5   0.095 1.815284e+01
62         48.0   0.115 1.977070e+01
63         48.5   0.070 1.873199e+01
64         49.0   0.060 1.899834e+01
65         49.5   0.050 1.916409e+01
66         50.0   0.070 2.107177e+01
67         50.5   0.035 1.950852e+01
68         51.0   0.030 1.974265e+01
69         51.5   0.025 1.989061e+01
70         52.0   0.020 1.992809e+01
71         52.5   0.015 1.981176e+01
72         53.0   0.010 1.945081e+01
73         53.5   0.010 2.001460e+01
74         54.0   0.005 1.910885e+01
75         54.5   0.005 1.962718e+01
76         55.0   0.005 2.013911e+01
77         55.5   0.005 2.064482e+01
78         56.0   0.005 2.114449e+01
79         56.5   0.005 2.163828e+01
80         57.0   0.005 2.212634e+01
81         57.5   0.005 2.260881e+01
82         58.0   0.005 2.308584e+01
83         58.5   0.005 2.355756e+01
84         59.0   0.005 2.402409e+01
85         59.5   0.005 2.448556e+01

I understand that, in neibourhood of "17.5" local volatility of the underlying (daily estimate) is "7.724883e-15%", similarly, in neibourhood of "18" local volatility is "1.232125e-14" and so on.........

Now I like to simulate possible price path at different time period, spanning from 1-day to next 5-days, using above Option-implied information.

Can anyone please suggest me how to implement this? It would really be very helpful if someone guide me on that.

Thanks



More information about the R-SIG-Finance mailing list