Logo
Reference manual - version qle_version
Public Member Functions | Protected Member Functions | List of all members
CommoditySchwartzParametrization Class Reference

COM Schwartz parametrization. More...

#include <qle/models/commodityschwartzparametrization.hpp>

+ Inheritance diagram for CommoditySchwartzParametrization:

Public Member Functions

 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)
 
Size numberOfParameters () const override
 
Real variance (const Time t) const
 State variable variance on [0, t].
 
Real sigma (const Time t) const
 State variable Y's diffusion at time t: sigma * exp(kappa * t)
 
Real sigmaParameter () const
 Inspector for the current value of model parameter sigma (direct)
 
Real kappaParameter () const
 Inspector for the current value of model parameter kappa (direct)
 
const boost::shared_ptr< Parameterparameter (const Size) const override
 Inspector for current value of the model parameter vector (inverse values)
 
Handle< QuantExt::PriceTermStructurepriceCurve ()
 Inspector for today's price curve.
 
Real VtT (Real t, Real T)
 Variance V(t,T) used in the computation of F(t,T)
 
bool driftFreeState () const
 
- Public Member Functions inherited from Parametrization
 Parametrization (const Currency &currency, const std::string &name="")
 
virtual const Currency & currency () const
 
virtual const Array & parameterTimes (const Size) const
 
virtual Array parameterValues (const Size) const
 
virtual void update () const
 
const std::string & name () 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
 

Additional Inherited Members

- Protected Attributes inherited from Parametrization
const Real h_
 
const Real h2_
 

Detailed Description

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))

Constructor & Destructor Documentation

◆ CommoditySchwartzParametrization()

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)

Member Function Documentation

◆ numberOfParameters()

Size numberOfParameters ( ) const
overridevirtual

the number of parameters in this parametrization

Reimplemented from Parametrization.

◆ direct()

Real direct ( const Size  Size,
const Real  x 
) const
overrideprotectedvirtual

transformations between raw and actual parameters

Reimplemented from Parametrization.