NFCP (version 0.1.0)

Futures.Price.Forecast: Futures.Price.Forecast

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, TTM = 1:10, Percentiles = NULL)

Arguments

X.0

Initial values of the state vector.

parameters

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

t

a numeric specifying the time point at which to forecast futures prices

TTM

a vector specifying the time to maturity of futures contracts to value.

Percentiles

Optional. A vector of percentiles to include probabilistic forecasting intervals.

Value

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

Details

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 F_T,tF[T,t] denote the market price of a futures contract at time tt with time TT 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.

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

Where: A(T-t) = ^*(T-t)-_i=1^N - 1-e^-_i (T-t)_i_i+12(_1^2(T-t) + _i.j 1 _i _j _i,j 1-e^-(_i+_j)(T-t)_i+_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: Var^*[ln(F_T,t)]= _1^2t + _i.j1 e^-(_i + _j)(T-t)_i_j_i,j1-e^-(_i+_j)t_i+_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])

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

Run this code
# NOT RUN {
# 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:
Schwartz.Smith.Oil = NFCP.Kalman.filter(parameter.values = SS.Oil$Two.Factor,
                                      parameters = names(SS.Oil$Two.Factor),
                                      log.futures = log(SS.Oil$Stitched.Futures),
                                      dt = SS.Oil$dt,
                                      TTM = SS.Oil$Stitched.TTM,
                                      verbose = TRUE)

## Step 2 - Probabilistic forecast of the risk-neutral two-factor
## stochastic differential equation (SDE):
E.Futures = Futures.Price.Forecast(X.0 = Schwartz.Smith.Oil$X.t,
                                       parameters = SS.Oil$Two.Factor,
                                       t = 0,
                                       TTM = seq(0,9,1/12),
                                       Percentiles = c(0.1, 0.9))
# }

Run the code above in your browser using DataLab