The schwartz2f
class stores parameters which determine initial
values and the dynamics of the state variables. The class
schwartz2f.fit
inherits from the schwartz2f
class. The
class schwartz2f.fit
adds slots which contain data regarding
the estimation procedure and parameters of the risk-neutral
dynamics. In particular, it adds the market price of convenience yield
risk lambda
and the interest rate.
schwartz2f
and fit.schwartz2f
. call
:call
.s0
:numeric
.delta0
:numeric
.mu
:numeric
.sigmaS
:numeric
.kappaE
:numeric
.alpha
:numeric
.sigmaE
:numeric
.rhoSE
:numeric
.n.iter
:numeric
.llh
:numeric
.converged
:logical
stating whether the fit converged or
not.error.code
:numeric
. The
value of optim
's convergence. If an unknown
error occurs the value -1 is returned.error.message
:character
, if any.fitted.params
:logical
vector stating which
parameters were fitted.trace.pars
:matrix
.r
:numeric
.alphaT
:numeric
(see Details).lambda
:numeric
.meas.sd
:numeric
.deltat
:numeric
.Stochastic Convenience Yield and the Pricing of Oil Contingent Claims by Rajna Gibson and Eduardo S. Schwartz The Journal of Finance 45, 1990, 959-976
The Stochastic Behavior of Commodity Prices: Implications for Valuation and Hedging by Eduardo S. Schwartz Journal of Finance 52, 1997, 923-973
Pricing of Options on Commodity Futures with Stochastic Term Structures of Convenience Yields and Interest Rates by Kristian R. Miltersen and Eduardo S. Schwartz Journal of Financial and Quantitative Analysis 33, 1998, 33-59
Valuation of Commodity Futures and Options under Stochastic Convenience Yields, Interest Rates, and Jump Diffusions in the Spot by Jimmy E. Hilliard and Jorge Reis Journal of Financial and Quantitative Analysis 33, 1998, 61-86
schwartz2f
to initialize
schwartz2f
-objects. fit.schwartz2f
to fit the
two-factor model to data and get a schwartz2f.fit
object,
schwartz97-package
for an overview.
# obj <- schwartz2f() # create an object of class schwartz2f
# obj # print it
# coef(obj) # get coefficients
# unclass(obj) # see the slots
#
# ## create an object of class schwartz2f.fit
# data(futures)
# fit.obj <- fit.schwartz2f(futures$wheat$price, futures$wheat$ttm / 260,
# deltat = 1 / 260, control = list(maxit = 3))
# fit.obj # print it
# coef(fit.obj) # get coefficients
# unclass(fit.obj) # see the slots
Run the code above in your browser using DataLab