Dear R-sig-finance members,
I am trying to use the CashorNothingOption , and would like to access the Option Price directly.
When I use CashorNothingOption, I am being given back the following:
CashOrNothingOption("p",100,30,50,5,.05,0,.2)
Title:
Cash Or Nothing Option
Call:
CashOrNothingOption(TypeFlag = "p", S = 100, X = 30, K = 50,
Time = 5, r = 0.05, b = 0, sigma = 0.2)
Parameters:
Value:
TypeFlag p
S 100
X 30
K 50
Time 5
r 0.05
b 0
sigma 0.2
Option Price:
0.2641278
Description:
Tue May 02 12:46:07 2006
How can I access the Option Price by assigning it's value to a variable so that I can multiply it by something else ?
Assuming the formula returned a list, I tried a number of things, none of which worked:
CashOrNothingOption("p",100,30,50,5,.05,0,.2)$par
CashOrNothingOption("p",100,30,50,5,.05,0,.2)$price
CashOrNothingOption("p",100,30,50,5,.05,0,.2)$OptionPrice
The documentation just says:
...
Value:
The option price, a numeric value.
....
which is not very revealing, neither does it seem to be true !
Many thanks in advance,
Tolga