A matrix with the corresponding time to maturity (see Details).
s0
Either a numeric representing the initial value of the
commodity spot price or an object inheriting from class
schwartz2f.
delta0
Initial value of the convenience yield.
mu
enters the drift of the commodity spot price.
sigmaS
Diffusion parameter of the spot price process.
kappa
Speed of mean-reversion of the convenience yield process.
alpha
Mean-level of the convenience yield process.
sigmaE
Diffusion parameter of the convenience yield process.
rho
Correlation coefficient between the Brownian motion
driving the spot price and the convenience yield process.
r
Instantaneous risk-free interest rate.
lambda
Market price of convenience yield risk.
alphaT
Mean-level of the convenience yield process with
respect to the equivalent martingale measure.
deltat
Time increment.
meas.sd
The standard deviation of the measurement equation (see
Details section of fit.schwartz2f).
P0
Variance of the state variables s0 and P0.
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. The unit of
ttm is defined by deltat.
deltat is the time between observation data[i,j] and
data[i + 1,j]. It is assumed to be constant, i.e., that
data is a regular time-series.
Value
A list with components:
state
A matrix with colnames are “S” and
“delta” giving the the expected spot price and the
convenience yield.
fkf.obj
The filter output from the package
fkf. Note that the log of the commodity spot
price is filtered.
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
See Also
fit.schwartz2f, pricefutures.
Examples
# data(futures)
#
# ## Estimate parameters for coffee data (stop after 20 iterations)
# fit.obj <- fit.schwartz2f(futures$coffee$price, futures$coffee$ttm / 260,
# deltat = 1 / 260, control = list(maxit = 20))
#
# ## Filter the futures data to get the spot price and the convenience yield.
# filtered <- filter.schwartz2f(futures$coffee$price, futures$coffee$ttm / 260, fit.obj)
#
# ## ...and plot it.
# par(mfrow = c(2, 1))
# plot(filtered$state[,1], ylab = "Spot price", type = "l")
# lines(futures$coffee$price[,1], col = "red") # Closest to maturity futures
# plot(filtered$state[,2], ylab = "Convenience yield", type = "l")
# abline(h = 0)