Skip to content
All library documents

Plotting American Option Values Through Time with R

Article Quant Q&A · Author: user27705

Summary

The document gives a brief pointer for plotting an option’s modeled value as time to expiry changes. It demonstrates using RQuantLib to calculate a sequence of American call prices at different remaining maturities, then drawing those values as a line plot. This turns a pricing model’s time dimension into a visual series that can help inspect how modeled value changes as expiry approaches.

It also names fOptions as another R package to investigate and points readers to a book on option pricing and financial model estimation in R. The example is limited to an American call and does not explain the pricing assumptions, parameter choices, or how to price Asian or European contracts. It offers starting references rather than a comparison of models or guidance on validating the resulting valuation curve.

Key ideas

  • A pricing library can calculate option values over a sequence of remaining maturities.
  • Plotting those values produces a visual profile of modeled option value as expiry approaches.
  • The example uses an American call and does not demonstrate Asian or European pricing.
  • Package and book references are starting points, while model assumptions and validation remain unspecified.

Tags

Full text
# Is there any useful links for option pricing (american + asian + european) using R


# Is there any useful links for option pricing (american + asian + european) using R












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 ?

## Answer by zer0hedge (score 4)

https://quant.stackexchange.com/a/33970

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:

Another useful package is fOptions

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

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.