2
$\begingroup$

I'm trying to evaluate option pricing mainly american, asian and european options in order to get a plot to measure option valuation in time. Is there any useful references to do that using R ?

$\endgroup$
3
$\begingroup$

Below is an example of how you could plot a "call" option value with RQuantLib:

library(RQuantLib)
library(ggplot2)
call_price <- sapply(seq(365,0,-1), function(x) AmericanOption("call", 100, 100, 0.2, 0.03, x/365, 0.4)$value)
qplot(day, call_price, data=data.frame(day=0:365, call_price=call_price), geom="line")

The code output:

enter image description here

Another useful package is fOptions

There is also a book "Option Pricing and Estimation of Financial Models with R"

$\endgroup$
  • $\begingroup$ Quite an improvement! $\endgroup$ – Bob Jansen Apr 30 '17 at 7:54
  • $\begingroup$ @BobJansen I have to work hard to improve my reputation :-) $\endgroup$ – zer0hedge Apr 30 '17 at 7:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.