Accessing the Option Price in CashorNothingOption

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Accessing the Option Price in CashorNothingOption

Uzuner, Tolga-2
> 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
> NULL
> > CashOrNothingOption("p",100,30,50,5,.05,0,.2)$price
> NULL
> > CashOrNothingOption("p",100,30,50,5,.05,0,.2)$OptionPrice
> NULL
> >
>
> 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
>

==============================================================================
Please access the attached hyperlink for an important electr...{{dropped}}

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
Reply | Threaded
Open this post in threaded view
|

Re: Accessing the Option Price in CashorNothingOption

Wojciech Slusarski
Hi,

Try the one below:

CashOrNothingOption("p",100,30,50,5,.05,0,.2)@price

should work.

Best regards,
Wojtek

2006/5/2, Uzuner, Tolga <[hidden email]>:

> > 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
> > NULL
> > > CashOrNothingOption("p",100,30,50,5,.05,0,.2)$price
> > NULL
> > > CashOrNothingOption("p",100,30,50,5,.05,0,.2)$OptionPrice
> > NULL
> > >
> >
> > 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
> >
>
> ==============================================================================
> Please access the attached hyperlink for an important electr...{{dropped}}
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
Reply | Threaded
Open this post in threaded view
|

Re: Accessing the Option Price in CashorNothingOption

Diethelm Wuertz

CashOrNothingOption() returns as all other options an S4
object.

CashOrNothingOption("p",100,30,50,5,.05,0,.2)@parameters

returns a list of all parameters

CashOrNothingOption("p",100,30,50,5,.05,0,.2)@parameters$sigma

returns a specific parameter, here sigma

The price has its own slot

CashOrNothingOption("p",100,30,50,5,.05,0,.2)@price

returns the price of the option.


DW





Wojciech Slusarski wrote:

>Hi,
>
>Try the one below:
>
>CashOrNothingOption("p",100,30,50,5,.05,0,.2)@price
>
>should work.
>
>Best regards,
>Wojtek
>
>2006/5/2, Uzuner, Tolga <[hidden email]>:
>  
>
>>>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
>>>>        
>>>>
>>>NULL
>>>      
>>>
>>>>CashOrNothingOption("p",100,30,50,5,.05,0,.2)$price
>>>>        
>>>>
>>>NULL
>>>      
>>>
>>>>CashOrNothingOption("p",100,30,50,5,.05,0,.2)$OptionPrice
>>>>        
>>>>
>>>NULL
>>>      
>>>
>>>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
>>>
>>>      
>>>
>>==============================================================================
>>Please access the attached hyperlink for an important electr...{{dropped}}
>>
>>_______________________________________________
>>[hidden email] mailing list
>>https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>>
>>    
>>
>
>_______________________________________________
>[hidden email] mailing list
>https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>
>  
>

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance