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
sell_value = 110
future_times = c(1, 3, 5)
PutOptionsOverTime(stock_data = stock_data, future_times = future_times, sell_value = sell_value)
Run the code above in your browser using DataLab