NFCP (version 0.1.0)

NFCP.Parameters: Specify parameters of N-factor model

Description

the NFCP.Parameters function specifies the parameters of a commodity pricing model under the N-factor framework first described by Cortazar and Naranjo (2006). This function is a recommended starting position for the application of N-factor models within the NFCP package.

Usage

NFCP.Parameters(
  N.factors,
  GBM,
  Initial.State,
  S.Constant,
  N.contracts = NULL,
  verbose = TRUE
)

Arguments

N.factors

numeric. Number of state variables in the spot price process.

GBM

logical. If GBM = T, factor 1 of the model is assumed to follow a Brownian Motion, inducing a unit-root in the spot price process.

Initial.State

logical. If Initial.State = T, the initial state vector is specified as unknown parameters of the commodity pricing model.

S.Constant

logical. If S.Constant = T, the white noise of observable contracts are assumed and identical (and independent).

N.contracts

numeric. The number of individual observation white noise terms when S.Constant = F. Optional when S.Constant = T. When N.contracts = 0, the value of NFCP.Parameters returns a vector without any "sigma.contract" or "sigma.contracts" elements.

verbose

logical. If verbose = T, the specified N-factor model is printed when the function is called.

Value

A vector of parameter names for a specified N-factor spot price process. This vector is ideal for application within many other functions within the NFCP package

Details

The N-factor model The N-factor model was first presented in the work of Cortazar and Naranjo (2006, equations 1-3). The N-factor framework describes the spot price process of a commodity as the correlated sum of NN state variables x_tx[t].

When GBM = TRUE: log(S_t) = _i=1^N x_i,tlog(S[t]) = sum_i=1^n x[i,t] When GBM = FALSE: log(S_t) = E + _i=1^N x_i,tlog(S[t]) = E + sum_i=1^n x[i,t]

Additional factors within the spot-price process are designed to result in additional flexibility, and possibly fit to the observable term structure, in the spot price process of a commodity. The fit of different N-factor models, represented by the log-likelihood can be directly compared with statistical testing possible through a chi-squared test.

Flexibility in the spot price under the N-factor framework allows the first factor to follow a Brownian Motion or Ornstein-Uhlenbeck process to induce a unit root. In general, an N-factor model where GBM = T allows for non-reversible behaviour within the price of a commodity, whilst GBM = F assumes that there is a long-run equilibrium that the commodity price will revert to in the long-term.

State variables are thus assumed to follow the following processes:

When GBM = TRUE: dx_1,t = ^*dt + _1 dw_1tdx[1,t] = mu^* dt + sigma[1] dw[1]t

When GBM = FALSE: dx_1,t = - (_1 + _1x_1,t)dt + _1 dw_1tdx[1,t] = - (lambda[1] + kappa[1] x[1,t]) dt + sigma[1] dw[t]t

And: dx_i,t =_i 1 - (_i + _ix_i,t)dt + _i dw_itdx[i,t] =_(i != 1) - (lambda[i] + kappa[i] x[i,t]dt + sigma[i] dw[i]t)

where: E(w_i)E(w_j) = _i,jE(w[i])E(w[j])

The following constant parameters are defined as:

var mu: long-term growth rate of the Brownian Motion process.

var EE: Constant equilibrium level.

var ^*=-_1mu^* = mu-lambda[1]: Long-term risk-neutral growth rate

var _ilambda[i]: Risk premium of state variable ii.

var _ikappa[i]: Reversion rate of state variable ii.

var _isigma[i]: Instantaneous volatility of state variable ii.

var _i,j [-1,1]rho[i,j] in [-1,1]: Instantaneous correlation between state variables ii and jj.

Measurement Error:

The Kalman filtering algorithm assumes a given measure of measurement error (ie. matrix HH). Measurement errors can be interpreted as error in the model's fit to observed prices, or as errors in the reporting of prices (Schwartz and Smith, 2000) and are assumed independent.

var s_is[i] Observation error of contract ii.

When S.Constant = T, the values of parameter s_is[i] are assumed constant and equal to parameter object 'sigma.contracts'. When S.Constant = F, observation errors are assumed unique, where the error of futures contracts s_is[i] is equal to parameter object 'sigma.contract_' [i] (i.e. 'sigma.contract_1', 'sigma.contract_2', ...).

When N.contracts = 0, "sigma.contract" parameters are not returned within the parameter vector.

Diffuse Assumption: If Initial.State = F, a 'diffuse' assumption is made within Kalman filtering and parameter estimation functions (See NFCP.MLE or NFCP.Kalman.filter for more information)

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 {
##Generate parameter of a Two-factor model Crude Oil model
##as first presented by Schwartz and Smith (2000):
SS.Oil.Two.Factor.parameters <- NFCP.Parameters(N.factors = 2,
                                                      GBM = TRUE,
                                                      Initial.State = FALSE,
                                                      S.Constant = FALSE,
                                                      N.contracts = 5)
print(SS.Oil.Two.Factor.parameters)
# }

Run the code above in your browser using DataCamp Workspace