#include <ored/scripting/models/modelcg.hpp>
Public Types | |
enum class | Type { MC , FD } |
Public Member Functions | |
ModelCG (const QuantLib::Size n) | |
virtual | ~ModelCG () |
QuantLib::ext::shared_ptr< QuantExt::ComputationGraph > | computationGraph () |
virtual Type | type () const =0 |
virtual QuantLib::Size | size () const |
virtual Size | trainingSamples () const |
virtual void | toggleTrainingPaths () const |
virtual const Date & | referenceDate () const =0 |
virtual const std::string & | baseCcy () const =0 |
virtual std::size_t | dt (const Date &d1, const Date &d2) const |
virtual std::size_t | pay (const std::size_t amount, const Date &obsdate, const Date &paydate, const std::string ¤cy) const =0 |
virtual std::size_t | discount (const Date &obsdate, const Date &paydate, const std::string ¤cy) const =0 |
virtual std::size_t | npv (const std::size_t amount, const Date &obsdate, const std::size_t filter, const boost::optional< long > &memSlot, const std::size_t addRegressor1, const std::size_t addRegressor2) const =0 |
virtual std::size_t | eval (const std::string &index, const Date &obsdate, const Date &fwddate, const bool returnMissingFixingAsNull=false, const bool ignoreTodaysFixing=false) const =0 |
virtual std::size_t | fwdCompAvg (const bool isAvg, const std::string &index, const Date &obsdate, const Date &start, const Date &end, const Real spread, const Real gearing, const Integer lookback, const Natural rateCutoff, const Natural fixingDays, const bool includeSpread, const Real cap, const Real floor, const bool nakedOption, const bool localCapFloor) const =0 |
virtual std::size_t | barrierProbability (const std::string &index, const Date &obsdate1, const Date &obsdate2, const std::size_t barrier, const bool above) const =0 |
virtual std::size_t | fxSpotT0 (const std::string &forCcy, const std::string &domCcy) const =0 |
virtual Real | extractT0Result (const QuantExt::RandomVariable &value) const =0 |
virtual void | resetNPVMem () |
const std::map< std::string, boost::any > & | additionalResults () const |
virtual std::size_t | cgVersion () const =0 |
virtual const std::vector< std::vector< std::size_t > > & | randomVariates () const =0 |
virtual std::vector< std::pair< std::size_t, double > > | modelParameters () const =0 |
virtual std::vector< std::pair< std::size_t, std::function< double(void)> > > & | modelParameterFunctors () const =0 |
virtual Real | getDirectFxSpotT0 (const std::string &forCcy, const std::string &domCcy) const =0 |
virtual Real | getDirectDiscountT0 (const Date &paydate, const std::string ¤cy) const =0 |
void | calculate () const override |
Protected Attributes | |
std::map< std::string, boost::any > | additionalResults_ |
QuantLib::ext::shared_ptr< QuantExt::ComputationGraph > | g_ |
Private Member Functions | |
void | performCalculations () const override |
Private Attributes | |
const QuantLib::Size | n_ |
Definition at line 48 of file modelcg.hpp.
|
strong |
Enumerator | |
---|---|
MC | |
FD |
Definition at line 50 of file modelcg.hpp.
|
explicit |
Definition at line 26 of file modelcg.cpp.
|
virtual |
Definition at line 53 of file modelcg.hpp.
QuantLib::ext::shared_ptr< QuantExt::ComputationGraph > computationGraph | ( | ) |
Definition at line 56 of file modelcg.hpp.
|
pure virtual |
Implemented in BlackScholesCGBase, and GaussianCamCG.
|
virtual |
Reimplemented in GaussianCamCG.
Definition at line 62 of file modelcg.hpp.
|
virtual |
Definition at line 65 of file modelcg.hpp.
|
virtual |
Definition at line 69 of file modelcg.hpp.
|
pure virtual |
|
pure virtual |
Implemented in ModelCGImpl.
|
virtual |
Reimplemented in ModelCGImpl.
Definition at line 28 of file modelcg.cpp.
|
pure virtual |
Implemented in ModelCGImpl.
|
pure virtual |
Implemented in ModelCGImpl.
|
pure virtual |
Implemented in BlackScholesCGBase, and GaussianCamCG.
|
pure virtual |
Implemented in ModelCGImpl.
|
pure virtual |
Implemented in BlackScholesCGBase, and GaussianCamCG.
|
pure virtual |
Implemented in ModelCGImpl.
|
pure virtual |
Implemented in ModelCGImpl.
|
pure virtual |
Implemented in ModelCGImpl.
|
virtual |
Definition at line 124 of file modelcg.hpp.
const std::map< std::string, boost::any > & additionalResults | ( | ) | const |
Definition at line 127 of file modelcg.hpp.
|
pure virtual |
Implemented in ModelCGImpl.
|
pure virtual |
Implemented in ModelCGImpl.
|
pure virtual |
Implemented in ModelCGImpl.
|
pure virtual |
Implemented in ModelCGImpl.
|
pure virtual |
Implemented in BlackScholesCGBase, and GaussianCamCG.
|
pure virtual |
Implemented in BlackScholesCGBase, and GaussianCamCG.
|
override |
Definition at line 142 of file modelcg.hpp.
|
overrideprivate |
Definition at line 152 of file modelcg.hpp.
|
mutableprotected |
Definition at line 146 of file modelcg.hpp.
|
protected |
Definition at line 149 of file modelcg.hpp.
|
private |
Definition at line 155 of file modelcg.hpp.