Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

spot_price_forecast

Forecast the spot prices of an N-factor model


Description

Analytically forecast expected spot prices following the "true" process of a given n-factor stochastic model

Usage

spot_price_forecast(x_0, parameters, t, 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 vector of discrete time points to forecast

percentiles

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

Details

Future expected spot prices under the N-factor model can be forecasted through the analytic expression of expected future prices under the "true" N-factor process.

Given that the log of the spot price is equal to the sum of the state variables (equation 1), the spot price is log-normally distributed with the expected prices given by:

Where: \[E[ln(S_t)] = \sum_{i=1}^Ne^{-(\kappa_it)}x_i(0) + \mu t\]

Where \(\kappa_i = 0\) when GBM=T and \(\mu = 0\) when GBM = F

and thus:

Under the assumption that the first factor follows a Brownian Motion, in the long-run expected spot prices grow over time at a constant rate of \(\mu + \frac{1}{2}\sigma_1^2\) as the \(e^{-\kappa_it}\) and \(e^{-(\kappa_i + \kappa_j)t}\) terms approach zero.

An important consideration when forecasting spot prices using parameters estimated through maximum likelihood estimation is that the parameter estimation process takes the assumption of risk-neutrality and thus the true process growth rate \(\mu\) is not estimated with a high level of precision. This can be shown from the higher standard error for \(\mu\) than other estimated parameters, such as the risk-neutral growth rate \(\mu^*\). See Schwartz and Smith (2000) for more details.

Value

spot_price_forecast returns a vector of expected future spot prices under a given N-factor model at specified discrete future time points. 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 the Schwartz and Smith (2000) two-factor oil model:

##Step 1 - Kalman filter of the two-factor oil model:
SS_2F_filtered <- NFCP_Kalman_filter(SS_oil$two_factor,
                                    names(SS_oil$two_factor),
                                    log(SS_oil$stitched_futures),
                                    SS_oil$dt,
                                    SS_oil$stitched_TTM,
                                    verbose = TRUE)

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

NFCP

N-Factor Commodity Pricing Through Term Structure Estimation

v1.0.1
GPL-3
Authors
Thomas Aspinall [aut, cre] (<https://orcid.org/0000-0002-6968-1989>), Adrian Gepp [aut] (<https://orcid.org/0000-0003-1666-5501>), Geoff Harris [aut] (<https://orcid.org/0000-0003-4284-8619>), Simone Kelly [aut] (<https://orcid.org/0000-0002-6528-8557>), Colette Southam [aut] (<https://orcid.org/0000-0001-7263-2347>), Bruce Vanstone [aut] (<https://orcid.org/0000-0002-3977-2468>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.