NFCP v0.1.0

0

Monthly downloads

0th

Percentile

N-Factor Commodity Pricing Through Term Structure Estimation

Commodity pricing models are (systems of) stochastic differential equations that are utilized for the valuation and hedging of commodity contingent claims (i.e. derivative products on the commodity) and other commodity related investments. Commodity pricing models that capture market dynamics are of great importance to commodity market participants in order to exercise sound investment and risk-management strategies. Parameters of commodity pricing models are estimated through maximum likelihood estimation, using available term structure futures data of a commodity. 'NFCP' (n-factor commodity pricing) provides a framework for the modeling, parameter estimation, probabilistic forecasting, option valuation and simulation of commodity prices through state space and Monte Carlo methods, risk-neutral valuation and Kalman filtering. 'NFCP' allows the commodity pricing model to consist of n correlated factors, with both random walk and mean-reverting elements. The n-factor commodity pricing model framework was first presented in the work of Cortazar and Naranjo (2006) <doi:10.1002/fut.20198>. Examples presented in 'NFCP' replicate the two-factor crude oil commodity pricing model presented in the prolific work of Schwartz and Smith (2000) <doi:10.1287/mnsc.46.7.893.12034> with the approximate term structure futures data applied within this study provided in the 'NFCP' package.

Readme

NFCP

N-Factor Commodity Pricing Through Term Structure Estimation

Commodity pricing models are (systems of) stochastic differential equations that are utilized for the valuation and hedging of commodity contingent claims (i.e. derivative products on the commodity) and other commodity related investments. Parameters of commodity pricing models are estimated through maximum likelihood estimation, using available term structure futures data of a commodity. 'NFCP' (n-factor commodity pricing) provides a framework for the modeling, parameter estimation, probabilistic forecasting, option valuation and simulation of commodity prices through state space and Monte Carlo methods, risk-neutral valuation and Kalman filtering. 'NFCP' allows the commodity pricing model to consist of n correlated factors, with both random walk and mean-reverting elements. Commodity pricing models that capture market dynamics are of great importance to commodity market participants in order to exercise sound investment and risk-management strategies. The n-factor commodity pricing model framework was first presented in the work of Cortazar and Naranjo (2006). Examples presented in 'NFCP' replicate the two-factor crude oil commodity pricing model presented in the prolific work of Schwartz and Smith (2000) with the approximate term structure futures data applied within this study provided in the 'NFCP' package. Kalman filtering in 'NFCP' is performed using sequential processing through the 'FKF.SP' package to optimise computational efficiency. Parameter estimation of n-factor models is performed using genetic algorithms through the 'rGenoud' package to maximise the likelihood that a global maximum is reached during maximum likelihood estimation.

Primary features of 'NFCP' include:

  • Parameter estimation of n-factor commodity pricing models through state space methods, Kalman filtering and maximum likelihood estimation.

  • Analytic pricing of European call and put options under estimated n-factor commodity pricing models

  • Probabilistic forecasting and Monte Carlo simulation of future commodity price paths.

Installation

You can install the released version of NFCP from CRAN with:

install.packages("NFCP")

And the development version from GitHub with:

devtools::install_github("TomAspinall/NFCP")

which contains source code for the package starting with version 0.1.0.

Functions in NFCP

Name Description
NFCP.bounds NFCP.bounds
NFCP.Parameters Specify parameters of N-factor model
A_T Calculate \(A(T)\)
NFCP.MLE N-Factor Model Parameter Estimation through the Kalman Filter and Maximum Likelihood Estimation
Futures.Price.Simulate Futures.Price.Simulate:
Futures.Price.Forecast Futures.Price.Forecast
European.Option.Value European.Option.Value
NFCP.Kalman.filter NFCP.Kalman.filter
SS.Oil SS.Oil
TSFit.Volatility Volatility Term Structure of futures returns
Spot.Price.Forecast Spot.Price.Forecast
cov_func model_covariance: (formerly cov_func)
Stitch.Contracts Stitch Futures Contracts
Spot.Price.Simulate Spot.Price.Simulate
No Results!

Vignettes of NFCP

Name
NFCP.Rmd
No Results!

Last month downloads

Details

License GPL-3
Encoding UTF-8
LazyData true
RoxygenNote 7.1.1.9000
RdMacros mathjaxr, Rdpack
VignetteBuilder knitr
NeedsCompilation no
Packaged 2021-01-09 04:05:01 UTC; Thomas Aspinall
Repository CRAN
Date/Publication 2021-01-13 12:00:06 UTC

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/NFCP)](http://www.rdocumentation.org/packages/NFCP)