cov_func {NFCP}R Documentation

N-factor model covariance:

Description

Calculate the covariance matrix of state variables for a given N-factor model parameters and discrete time step.

Usage

cov_func(parameters, dt)

Arguments

parameters

a named vector of parameters of an N-factor model. Function NFCP_parameters is recommended.

dt

a discrete time step

Details

The primary purpose of the model_covariance function is to be called within other functions of the NFCP package. The covariance of an N-factor model is given by:

\[cov_{1,1}(x_{1,t},x_{1,t}) = \sigma_1^2t\] \[cov_{i,j}(x_{i,t},x_{j,t}) = \sigma_i\sigma_j\rho_{i,j}\frac{1-e^{-(\kappa_i+\kappa_j)t}}{\kappa_i+\kappa_j}\]

Value

A matrix object with dimensions \(N \times N\), where N is the number of factors of the specified N-factor model.

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

#Calculate the covariance matrix of a two-factor model over one discrete (weekly) time step:
SS_oil.covariance <- cov_func(SS_oil$two_factor, SS_oil$dt)


[Package NFCP version 1.2.1 Index]