futures_price_forecast: Forecast the futures prices of an N-factor model

View source: R/simulations.R

futures_price_forecastR Documentation

Forecast the futures prices of an N-factor model

Description

Analytically forecast future expected Futures prices under the risk-neutral version of a specified N-factor model.

Usage

futures_price_forecast(
  x_0,
  parameters,
  t = 0,
  futures_TTM = 1:10,
  percentiles = NULL
)

Arguments

x_0

vector. Initial values of the state variables, where the length must correspond to the number of factors specified in the parameters.

parameters

vector. A named vector of parameter values of a specified N-factor model. Function NFCP_parameters is recommended.

t

numeric. The time point, in years, at which to forecast futures prices.

futures_TTM

vector. the time-to-maturity, in years, of futures contracts to forecast.

percentiles

vector. Optional. Probabilistic forecasting percentile intervals.

Details

\loadmathjax

Under the assumption or risk-neutrality, futures prices are equal to the expected future spot price. Additionally, under deterministic interest rates, forward prices are equal to futures prices. Let \mjeqnF_T,tF[T,t] denote the market price of a futures contract at time \mjeqntt with time \mjeqnTT until maturity. let * denote the risk-neutral expectation and variance of futures prices. The following equations assume that the first factor follows a Brownian Motion.

\mjdeqn

E^*[ln(F_T,t)] = season(T) + \sum_i=1^Ne^-\kappa_iTx_i(0) + \mu^*t + A(T-t)E^*[ln(F[T,t])] = season(T) + sum_i=1^N (e^(-kappa[i] T) x[i,0] + mu * t + A(T-t))

Where: \mjdeqnA(T-t) = \mu^*(T-t)-\sum_i=1^N - \frac1-e^-\kappa_i (T-t)\lambda_i\kappa_i+\frac12(\sigma_1^2(T-t) + \sum_i.j\neq 1 \sigma_i \sigma_j \rho_i,j \frac1-e^-(\kappa_i+\kappa_j)(T-t)\kappa_i+\kappa_j) A(T-t) = mu^* (T-t) - sum_i=1^N ( - (1 - e^(-kappa[i] (T-t))lambda[i]) / kappa[i]) + 1/2 sigma[1]^2 (T-t) + sum_i.j != 1 sigma[i] sigma[j] rho[i,j] (1 - e^(-(kappa[i] + kappa[j])(T-t))) / (kappa[i] + kappa[j]) The variance is given by: \mjdeqnVar^*[ln(F_T,t)]= \sigma_1^2t + \sum_i.j\neq1 e^-(\kappa_i + \kappa_j)(T-t)\sigma_i\sigma_j\rho_i,j\frac1-e^-(\kappa_i+\kappa_j)t\kappa_i+\kappa_j Var^*[ln(F[T,t])] = sigma[1]^2 * t + sum_i.j != 1 e^(-(kappa[i] + kappa[j])(T-t)) sigma[i] sigma[j] rho[i,j] (1 - e^(-(kappa[i] + kappa[j])t))/(kappa[i] + kappa[j])

Value

futures_price_forecast returns a vector of expected Futures prices under a given N-factor model with specified time to maturities at time \mjeqntt. When percentiles are specified, the function returns a matrix with the corresponding confidence bands in each column of the matrix.

References

Schwartz, E. S., and J. E. Smith, (2000). Short-Term Variations and Long-Term Dynamics in Commodity Prices. Manage. Sci., 46, 893-911.

Cortazar, G., and L. Naranjo, (2006). An N-factor Gaussian model of oil futures prices. Journal of Futures Markets: Futures, Options, and Other Derivative Products, 26(3), 243-268.

Examples


# Forecast futures prices of the Schwartz and Smith (2000) two-factor oil model:
## Step 1 - Run the Kalman filter for the two-factor oil model:
SS_2F_filtered <- NFCP_Kalman_filter(parameter_values = SS_oil$two_factor,
                                    parameter_names = names(SS_oil$two_factor),
                                    log_futures = log(SS_oil$stitched_futures),
                                    dt = SS_oil$dt,
                                    futures_TTM = SS_oil$stitched_TTM,
                                    verbose = TRUE)

## Step 2 - Probabilistic forecast of the risk-neutral two-factor
## stochastic differential equation (SDE):
futures_price_forecast(x_0 = SS_2F_filtered$x_t,
                      parameters = SS_oil$two_factor,
                      t = 0,
                      futures_TTM = seq(0,9,1/12),
                      percentiles = c(0.1, 0.9))

NFCP documentation built on March 18, 2022, 5:06 p.m.