Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
CommoditySchwartzStateProcess Class Reference

COM Schwartz model one-factor state process. More...

#include <qle/processes/commodityschwartzstateprocess.hpp>

+ Inheritance diagram for CommoditySchwartzStateProcess:
+ Collaboration diagram for CommoditySchwartzStateProcess:

Classes

class  ExactDiscretization
 

Public Member Functions

 CommoditySchwartzStateProcess (const QuantLib::ext::shared_ptr< CommoditySchwartzParametrization > &parametrization, const CommoditySchwartzModel::Discretization discretization)
 

StochasticProcess interface

const QuantLib::ext::shared_ptr< CommoditySchwartzParametrizationp_
 
Real x0 () const override
 
Real drift (Time t, Real x) const override
 
Real diffusion (Time t, Real x) const override
 

Detailed Description

COM Schwartz model one-factor state process.

Definition at line 37 of file commodityschwartzstateprocess.hpp.

Constructor & Destructor Documentation

◆ CommoditySchwartzStateProcess()

CommoditySchwartzStateProcess ( const QuantLib::ext::shared_ptr< CommoditySchwartzParametrization > &  parametrization,
const CommoditySchwartzModel::Discretization  discretization 
)

Definition at line 25 of file commodityschwartzstateprocess.cpp.

29 ? QuantLib::ext::make_shared<EulerDiscretization>()
30 : QuantLib::ext::static_pointer_cast<StochasticProcess1D::discretization>(
31 QuantLib::ext::make_shared<ExactDiscretization>(parametrization))),
32 p_(parametrization) {}
const QuantLib::ext::shared_ptr< CommoditySchwartzParametrization > p_

Member Function Documentation

◆ x0()

Real x0 ( ) const
override

Definition at line 43 of file commodityschwartzstateprocess.hpp.

43{ return 0.0; }
+ Here is the caller graph for this function:

◆ drift()

Real drift ( Time  t,
Real  x 
) const
override

Definition at line 34 of file commodityschwartzstateprocess.cpp.

34 {
35 if (p_->driftFreeState())
36 return 0.0;
37 else
38 return -x0 * p_->kappaParameter();
39}
+ Here is the call graph for this function:

◆ diffusion()

Real diffusion ( Time  t,
Real  x 
) const
override

Definition at line 41 of file commodityschwartzstateprocess.cpp.

41{ return p_->sigma(t); }

Member Data Documentation

◆ p_

const QuantLib::ext::shared_ptr<CommoditySchwartzParametrization> p_
private

Definition at line 60 of file commodityschwartzstateprocess.hpp.