A matrix with futures prices. NA-values are allowed.
ttm
A matrix with the corresponding time to maturity (see
Details).
deltat
Time increment (see Details).
s0
Initial value of the commodity spot price.
delta0
Initial value of the convenience yield.
mu
Initial value of the drift parameter of the commodity spot price.
kappa
Initial parameter of the speed of mean-reversion of the convenience yield process.
alpha
Initial parameter of the mean-level of the convenience yield process.
sigmaS
Initial parameter of the diffusion parameter of the spot price process.
sigmaE
Initial parameter of the diffusion parameter of the convenience yield process.
rho
Initial parameter of the correlation coefficient between the Brownian motion
driving the spot price and the convenience yield process.
meas.sd
Initial parameter of the standard deviation of the measurement equation (see Details).
lambda
Initial value of the market price of convenience yield risk.
opt.pars
A logical vector giving the parameters which
shall be fitted. The order is as given in the function header,
names are discarded.
opt.meas.sd
States how the standard deviation of the
measurement equation should be treated (see Details).
r
Instantaneous risk-free interest rate.
silent
If FALSE the log-likelihood and parameters will
be printed in each iteration.
...
Arguments passed to optim.
Details
The elements of data and ttm have the following
interpretation: data[i,j] denotes the futures price whose time
to maturity was ttm[i,j] when it was observed (in units of
deltat).
The time increment between observation data[i,j] and
data[i + 1,j] is denoted with deltat. Note that this
specification requires a regularly spaced data series.
opt.meas.sd specifies how measurement uncertainty is treated in
the fit: According to the model there should be a one-to-one
correspondence between the spot and the futures price. In reality, the
term structure does not fully match for any set of parameters. This is
reflected in the measurement uncertainty-vector meas.sd. All
components of meas.sd can be fitted. However, it might be
sufficient to fit only a scalar where the measurement uncertainty is
parametrized by scalar * meas.sd. In this case define the
vector meas.sd and set opt.meas.sd to
“scalar”. meas.sd can be set to a vector with each
component set to, e.g., 2%, giving each point in the term structure
equal weight. Another reasonable specification takes open interest or
volumes into account: The higher the volume, the higher the weight and
therefore the lower the corresponding component of meas.sd. If
all components of meas.sd shall be fitted choose
“all”. If the measurement uncertainty is known set
meas.sd to “none”. Note that the measurement errors are
assumed to be independent in this implementation (even though the
model and the filter do not require independence).
The model and its parameters are described in the Details
section of the schwartz2f-class
documentation and in the package vignette Technical Document.
Value
An object of class schwartz2f.fit.
Note
Parameter estimation is statistically fragile and computationally
demanding. Multiple local maxima of the likelihood may exist which can
result in absurd parameter estimates as, e.g., a yearly drift of 300%
and or a market price of convenience yield risk of -200%. Therefore,
a reasonable parameter estimation is most likely an iteration where
several initial values are used and different combinations of
parameters are held constant during estimation. Also, simulation
studies showed that a fairly large sample is required to get adequate
estimates (e.g. 20000 daily observations, depending on the number of
parameters which shall be estimated). For this reason the default is
to hold s0, delta0, and lambda constant.
Several utility functions may help to investigate the fit (see
e.g. fitted,
resid,
plot,
coef).
The fitting procedure generally requires a large number of iterations
to achieve a reasonable tolerance level. Each optimization iteration
involves the filtering of the data set by the Kalman
filter. Therefore, an efficient implementation of the Kalman filter is
key. Hence, the fkf function of the package
FKF can be considered as the backbone of the
estimation procedure.
Author(s)
Philipp Erb, David Luethi, Juri Hinz
References
The Stochastic Behavior of Commodity Prices: Implications for
Valuation and Hedging by Eduardo S. Schwartz Journal of Finance
52, 1997, 923-973