COM Schwartz parametrization. More...
#include <qle/models/commodityschwartzparametrization.hpp>
Public Member Functions | |
CommoditySchwartzParametrization (const Currency ¤cy, const std::string &name, const Handle< QuantExt::PriceTermStructure > &priceCurve, const Handle< Quote > &fxSpotToday, const Real sigma, const Real kappa, bool driftFreeState=false) | |
Size | numberOfParameters () const override |
Real | variance (const Time t) const |
State variable variance on [0, t]. More... | |
Real | sigma (const Time t) const |
State variable Y's diffusion at time t: sigma * exp(kappa * t) More... | |
Real | sigmaParameter () const |
Inspector for the current value of model parameter sigma (direct) More... | |
Real | kappaParameter () const |
Inspector for the current value of model parameter kappa (direct) More... | |
const QuantLib::ext::shared_ptr< Parameter > | parameter (const Size) const override |
Inspector for current value of the model parameter vector (inverse values) More... | |
Handle< QuantExt::PriceTermStructure > | priceCurve () |
Inspector for today's price curve. More... | |
Real | VtT (Real t, Real T) |
Variance V(t,T) used in the computation of F(t,T) More... | |
bool | driftFreeState () const |
Public Member Functions inherited from Parametrization | |
Parametrization (const Currency ¤cy, const std::string &name="") | |
virtual | ~Parametrization () |
virtual const Currency & | currency () const |
virtual const Array & | parameterTimes (const Size) const |
virtual Size | numberOfParameters () const |
virtual Array | parameterValues (const Size) const |
virtual const QuantLib::ext::shared_ptr< Parameter > | parameter (const Size) const |
virtual void | update () const |
const std::string & | name () const |
virtual Real | direct (const Size, const Real x) const |
virtual Real | inverse (const Size, const Real y) const |
Protected Member Functions | |
Real | direct (const Size i, const Real x) const override |
Real | inverse (const Size i, const Real y) const override |
Protected Member Functions inherited from Parametrization | |
Time | tr (const Time t) const |
Time | tl (const Time t) const |
Time | tr2 (const Time t) const |
Time | tm2 (const Time t) const |
Time | tl2 (const Time t) const |
Private Attributes | |
const Handle< QuantExt::PriceTermStructure > | priceCurve_ |
const Handle< Quote > | fxSpotToday_ |
std::string | comName_ |
const QuantLib::ext::shared_ptr< PseudoParameter > | sigma_ |
const QuantLib::ext::shared_ptr< PseudoParameter > | kappa_ |
bool | driftFreeState_ |
Additional Inherited Members | |
Protected Attributes inherited from Parametrization | |
const Real | h_ |
const Real | h2_ |
COM Schwartz parametrization.
COM parametrization for the Schwartz (1997) mean-reverting one-factor model with log-normal forward price dynamics and forward volatility sigma * exp(-kappa*(T-t)): dF(t,T) / F(t,T) = sigma * exp(-kappa * (T-t)) * dW
The model can be propagated in terms of an artificial spot price process of the form S(t) = A(t) * exp(B(t) * X(t)) where
dX(t) = -kappa * X(t) * dt + sigma * dW(t) X(t) - X(s) = -X(s) * (1 - exp(-kappa*(t-s)) + int_s^t sigma * exp(-kappa*(t-u)) dW(u) E[X(t)|s] = X(s) * exp(-kappa*(t-s)) Var[X(t)-X(s)|s] = sigma^2 * (1 - exp(-2*kappa*(t-s))) / (2*kappa)
The stochastic future price curve in terms of X(t) is F(t,T) = F(0,T) * exp( X(t) * exp(-kappa*(T-t) - 1/2 * (V(0,T) - V(t,T)) with V(t,T) = sigma^2 * (1 - exp(-2*kappa*(T-t))) / (2*kappa) and Var[ln F(T,T)] = VaR[X(T)]
Instead of state variable X we can use Y(t) = exp(kappa * t) * X(t) with drift-free dY(t) = sigma * exp(kappa * t) * dW Y(t) = int_0^t sigma * exp(kappa * s) * dW(s) Var[Y(t)] = sigma^2 * (exp(2*kappa*t) - 1) / (2*kappa) Var[Y(t)-Y(s)|s] = int_s^t sigma * exp(kappa * u) * dW(u) = Var[Y(t)] - Var[Y(s)] The stochastic future price curve in terms of Y(t) is F(t,T) = F(0,t) * exp( Y(t) * exp(-kappa*T) - 1/2 * (V(0,T) - V(t,T))
Definition at line 64 of file commodityschwartzparametrization.hpp.
CommoditySchwartzParametrization | ( | const Currency & | currency, |
const std::string & | name, | ||
const Handle< QuantExt::PriceTermStructure > & | priceCurve, | ||
const Handle< Quote > & | fxSpotToday, | ||
const Real | sigma, | ||
const Real | kappa, | ||
bool | driftFreeState = false |
||
) |
The currency refers to the commodity currency, the fx spot is as of today (i.e. the discounted spot)
Definition at line 24 of file commodityschwartzparametrization.cpp.
|
overridevirtual |
the number of parameters in this parametrization
Reimplemented from Parametrization.
Definition at line 73 of file commodityschwartzparametrization.hpp.
Real variance | ( | const Time | t | ) | const |
State variable variance on [0, t].
Definition at line 111 of file commodityschwartzparametrization.hpp.
Real sigma | ( | const Time | t | ) | const |
State variable Y's diffusion at time t: sigma * exp(kappa * t)
Definition at line 122 of file commodityschwartzparametrization.hpp.
Real sigmaParameter | ( | ) | const |
Inspector for the current value of model parameter sigma (direct)
Definition at line 131 of file commodityschwartzparametrization.hpp.
Real kappaParameter | ( | ) | const |
Inspector for the current value of model parameter kappa (direct)
Definition at line 135 of file commodityschwartzparametrization.hpp.
|
overridevirtual |
Inspector for current value of the model parameter vector (inverse values)
Reimplemented from Parametrization.
Definition at line 139 of file commodityschwartzparametrization.hpp.
Handle< QuantExt::PriceTermStructure > priceCurve | ( | ) |
Inspector for today's price curve.
Definition at line 85 of file commodityschwartzparametrization.hpp.
Real VtT | ( | Real | t, |
Real | T | ||
) |
Variance V(t,T) used in the computation of F(t,T)
Definition at line 36 of file commodityschwartzparametrization.cpp.
bool driftFreeState | ( | ) | const |
Definition at line 89 of file commodityschwartzparametrization.hpp.
|
overrideprotectedvirtual |
transformations between raw and actual parameters
Reimplemented from Parametrization.
Definition at line 107 of file commodityschwartzparametrization.hpp.
|
overrideprotectedvirtual |
Reimplemented from Parametrization.
Definition at line 109 of file commodityschwartzparametrization.hpp.
|
private |
Definition at line 97 of file commodityschwartzparametrization.hpp.
|
private |
Definition at line 98 of file commodityschwartzparametrization.hpp.
|
private |
Definition at line 99 of file commodityschwartzparametrization.hpp.
|
private |
Definition at line 100 of file commodityschwartzparametrization.hpp.
|
private |
Definition at line 101 of file commodityschwartzparametrization.hpp.
|
private |
Definition at line 102 of file commodityschwartzparametrization.hpp.