CPM.bounds: CPM.bounds

Description Usage Arguments Details Value References Examples

View source: R/KF-dependencies.R

Description

Generate boundaries for the domain of parameters of the N-factor model for parameter estimation.

Usage

1
CPM.bounds(parameters)

Arguments

parameters

a vector of parameter names of an N-factor model. Function CPM.Parameters is recommended.

Details

The CPM.bounds function is called 'as-is' within the CPM.MLE function when domains are not provided as an input. CPM.bounds allows easy setting of custom boundaries for parameter estimation, whilst also providing default domains of parameters that should realistically work for all types of observation datasets.

Value

A matrix of defaulted domains for the given unknown parameters. The first column corresponds to the lower bound of the allowable search space for the parameter, whilst the second column corresponds to the upper bound. These values were set to allow for the 'realistic' possible values of given parameters as well as restricting some parameters (such as variance and mean-reverting terms) from taking negative values. The format of the returned matrix matches that required by the Domains argument of the Genoud function from the package RGenoud.

References

Mebane, W. R., and J. S. Sekhon, (2011). Genetic Optimization Using Derivatives: The rgenoud Package for R. Journal of Statistical Software, 42(11), 1-26. URL http://www.jstatsoft.org/v42/i11/.

Schwartz, E. S., and J. E. Smith, (2000). Short-Term Variations and Long-Term Dynamics in Commodity Prices. Manage. Sci., 46, 893-911.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
##Specify a GBM model with constant contract white noise:
GBM.parameters <- CPM.Parameters(N.factors = 1,
                                        GBM = TRUE,
                                        Initial.State = TRUE,
                                        S.Constant = TRUE)

###Generate the bounds of the defaults input into the optimization function:
Parameter.Estimation.Bounds <- CPM.bounds(GBM.parameters)

##Not Run - Input the Bounds into the parameter estimation function for the
##Schwartz and Smith (2000) data:
# Estimated.parameters <- CPM.MLE(
#       ####Arguments
#       log.futures = log(SS.Oil$Stitched.Futures),
#       dt = SS.Oil$dt,
#       TTM= SS.Oil$Stitched.TTM,
#       S.Constant = TRUE, N.factors = 1, GBM = TRUE,
#       Estimate.Initial.State = TRUE,
#       ##Consider the specified domains:
#       Domains = Parameter.Estimation.Bounds)

TomAspinall/TSE documentation built on Jan. 7, 2021, 7:43 p.m.