NFCP (version 0.1.0)

TSFit.Volatility: Volatility Term Structure of futures returns

Description

Estimate the Theoretical and Empirical Volatility Term Structure of futures returns

Usage

TSFit.Volatility(parameter.values, parameters, Futures, TTM, dt)

Arguments

parameter.values

Vector of parameter values of an N-factor model. The NFCP.Kalman.filter function is designed for application to optim type functions, and thus the parameter values and corresponding parameter names are separated by different inputs within the function.

parameters

A named vector of parameters of an N-factor model. Function NFCP.Parameters is recommended.

Futures

A Matrix of futures price data. Each column corresponds to a given futures contract, and each row is an observation of the futures contracts.

TTM

A vector listing the Time to Maturities of each listed Futures contract from the current observation point.

dt

Numeric. The length of the discrete time step (years).

Value

TSFit.Volatility returns a matrix with the theoretical and empirical volatility term structure of futures returns, with the number of columns of this matrix coinciding with the number of input futures contracts.

Details

The fit of the models theoretical volatility term structure of futures returns to those obtained directly from observed futures prices can be used as an additional measure of robustness for the models ability to explain the behavior of a commodities term structure. A commodity pricing model should capture all dynamics of a commodities term structure,

The theoretical model volatility term structure of futures returns is given by the following equation:

_F() = _i=1^N _j=1^N _i _j _i,j e^-(_i + _j)sigma_F(tau) = sum_i = 1, j = 1^N sigma[i] sigma[j] rho[i,j] e^(-(kappa[i] + kappa[j]) tau)

Under the case that _1 = 0kappa[1] = 0, the model volatility term structure converges to _1^2sigma[1]^2 as tau grows large.

The empirical volatility term structure of futures returns is given by:

_F^2() = 1 t_i=1^N(log(F(t_i,)/F(t_i- t,)) - )^2hat(sigma)[F^2](tau) = 1/(Delta * t) sum_i=1^N (log(F(t[i],tau) / F(t[i] - Delta t, tau)) - bar(mu))^2

According to Cortazar and Naranjo (2006): "A larger number of factors gives more flexibility to adjust first and second moments simultaneously, hence explaining why (a) four-factor (may) outperform (a) three-factor one in fitting the volatility term structure."

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 {
### Test the volatility term structure fit of the Schwartz-Smith two-factor model on crude oil:
V_TSFit <- TSFit.Volatility(
 parameter.values = SS.Oil$Two.Factor,
 parameters = names(SS.Oil$Two.Factor),
 Futures = SS.Oil$Stitched.Futures,
 TTM = SS.Oil$Stitched.TTM,
 dt = SS.Oil$dt)

# }

Run the code above in your browser using DataLab