CallOptionsOverStrikePrices: Call Option Values for Differently Priced European Call...

View source: R/CallOptionsOverStrikePrices.R

CallOptionsOverStrikePricesR Documentation

Call Option Values for Differently Priced European Call Options

Description

This function calculates the value of the a European call option for a list of strike price / buy values, given stock price data and a given future time.

Usage

CallOptionsOverStrikePrices(
  stock_data,
  future_time,
  buy_values,
  max.p = 5,
  max.q = 5,
  method = "CSS-ML"
)

Arguments

stock_data

Numeric vector of stock prices data.

future_time

Numeric constant of the future time

buy_values

Numeric vector of the buy values at which to calculate the call option values

max.p

The maximum order of the Auto Regressive part of the ARMA model (default is set to 5)

max.q

The maximum order of the Moving Average part of the ARMA model (default is set to 5)

method

The way that the ARMA model is calculated, accepted values are "ML", "CSS-ML" and "CSS"

Value

Estimated values of a European call option at different buy values

Examples

library(stats)
library(forecast)

# Create simulated data
n = 100
set.seed(42)
arma_values = arima.sim(n = n, model = list(ar = c(0.6), ma = c(0.5, -0.5)))
linear_model = 5 + 1:n
stock_data = arma_values + linear_model

future_time = 3
buy_values = seq(90, 110, length.out = 5)

CallOptionsOverStrikePrices(stock_data, future_time, buy_values)


armaOptions documentation built on Aug. 31, 2025, 1:07 a.m.