#include <ored/scripting/models/gaussiancamcg.hpp>
Public Member Functions | |
GaussianCamCG (const Handle< CrossAssetModel > &cam, const Size paths, const std::vector< std::string > ¤cies, const std::vector< Handle< YieldTermStructure > > &curves, const std::vector< Handle< Quote > > &fxSpots, const std::vector< std::pair< std::string, QuantLib::ext::shared_ptr< InterestRateIndex > > > &irIndices, const std::vector< std::pair< std::string, QuantLib::ext::shared_ptr< ZeroInflationIndex > > > &infIndices, const std::vector< std::string > &indices, const std::vector< std::string > &indexCurrencies, const std::set< Date > &simulationDates, const Size timeStepsPerYear=1, const IborFallbackConfig &iborFallbackConfig=IborFallbackConfig::defaultConfig(), const std::vector< Size > &projectedStateProcessIndices={}, const std::vector< std::string > &conditionalExpectationModelStates={}, const bool sloppySimDates=false) | |
Type | type () const override |
const Date & | referenceDate () const override |
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 override |
std::size_t | fwdCompAvg (const bool isAvg, const std::string &indexInput, 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 override |
QuantLib::Size | size () const override |
Real | getDirectFxSpotT0 (const std::string &forCcy, const std::string &domCcy) const override |
Real | getDirectDiscountT0 (const Date &paydate, const std::string ¤cy) const override |
![]() | |
ModelCGImpl (const DayCounter &dayCounter, const Size size, const std::vector< std::string > ¤cies, const std::vector< std::pair< std::string, QuantLib::ext::shared_ptr< InterestRateIndex > > > &irIndices, const std::vector< std::pair< std::string, QuantLib::ext::shared_ptr< ZeroInflationIndex > > > &infIndices, const std::vector< std::string > &indices, const std::vector< std::string > &indexCurrencies, const std::set< Date > &simulationDates, const IborFallbackConfig &iborFallbackConfig) | |
const std::string & | baseCcy () const override |
std::size_t | dt (const Date &d1, const Date &d2) const override |
std::size_t | pay (const std::size_t amount, const Date &obsdate, const Date &paydate, const std::string ¤cy) const override |
std::size_t | discount (const Date &obsdate, const Date &paydate, const std::string ¤cy) const override |
std::size_t | eval (const std::string &index, const Date &obsdate, const Date &fwddate, const bool returnMissingMissingAsNull=false, const bool ignoreTodaysFixing=false) const override |
std::size_t | fxSpotT0 (const std::string &forCcy, const std::string &domCcy) const override |
std::size_t | barrierProbability (const std::string &index, const Date &obsdate1, const Date &obsdate2, const std::size_t barrier, const bool above) const override |
Real | extractT0Result (const RandomVariable &value) const override |
std::size_t | cgVersion () const override |
const std::vector< std::vector< std::size_t > > & | randomVariates () const override |
std::vector< std::pair< std::size_t, double > > | modelParameters () const override |
std::vector< std::pair< std::size_t, std::function< double(void)> > > & | modelParameterFunctors () const override |
![]() | |
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 Member Functions | |
virtual std::size_t | getFutureBarrierProb (const std::string &index, const Date &obsdate1, const Date &obsdate2, const std::size_t barrier, const bool above) const override |
void | performCalculations () const override |
std::size_t | getIndexValue (const Size indexNo, const Date &d, const Date &fwd=Null< Date >()) const override |
std::size_t | getIrIndexValue (const Size indexNo, const Date &d, const Date &fwd=Null< Date >()) const override |
std::size_t | getInfIndexValue (const Size indexNo, const Date &d, const Date &fwd=Null< Date >()) const override |
std::size_t | getDiscount (const Size idx, const Date &s, const Date &t) const override |
std::size_t | getNumeraire (const Date &s) const override |
std::size_t | getFxSpot (const Size idx) const override |
![]() | |
virtual std::size_t | getIndexValue (const Size indexNo, const Date &d, const Date &fwd=Null< Date >()) const =0 |
virtual std::size_t | getIrIndexValue (const Size indexNo, const Date &d, const Date &fwd=Null< Date >()) const =0 |
virtual std::size_t | getInfIndexValue (const Size indexNo, const Date &d, const Date &fwd) const =0 |
virtual std::size_t | getDiscount (const Size idx, const Date &s, const Date &t) const =0 |
virtual std::size_t | getNumeraire (const Date &s) const =0 |
virtual std::size_t | getFxSpot (const Size idx) const =0 |
virtual std::size_t | getFutureBarrierProb (const std::string &index, const Date &obsdate1, const Date &obsdate2, const std::size_t barrier, const bool above) const =0 |
std::size_t | addModelParameter (const std::string &id, std::function< double(void)> f) const |
void | performCalculations () const override |
Protected Attributes | |
const Handle< CrossAssetModel > | cam_ |
const std::vector< Handle< YieldTermStructure > > | curves_ |
const std::vector< Handle< Quote > > | fxSpots_ |
const Size | timeStepsPerYear_ |
const std::vector< Size > | projectedStateProcessIndices_ |
const bool | sloppySimDates_ |
Date | referenceDate_ |
std::set< Date > | effectiveSimulationDates_ |
TimeGrid | timeGrid_ |
std::vector< Size > | positionInTimeGrid_ |
std::map< Date, std::vector< std::size_t > > | underlyingPaths_ |
std::map< Date, std::vector< std::size_t > > | irStates_ |
std::map< Date, std::vector< std::pair< std::size_t, std::size_t > > > | infStates_ |
std::vector< Size > | indexPositionInProcess_ |
std::vector< Size > | infIndexPositionInProcess_ |
std::vector< Size > | currencyPositionInProcess_ |
std::vector< Size > | irIndexPositionInCam_ |
std::vector< Size > | infIndexPositionInCam_ |
std::vector< Size > | currencyPositionInCam_ |
std::vector< Size > | eqIndexInCam_ |
bool | conditionalExpectationUseIr_ |
bool | conditionalExpectationUseInf_ |
bool | conditionalExpectationUseAsset_ |
std::size_t | underlyingPathsCgVersion_ = 0 |
const std::vector< QuantLib::Real > * | injectedPathTimes_ = nullptr |
const std::vector< std::vector< std::size_t > > * | injectedPaths_ = nullptr |
const std::vector< bool > * | injectedPathIsRelevantTime_ |
bool | injectedPathStickyCloseOutRun_ |
Size | overwriteModelSize_ = Null<Size>() |
![]() | |
const DayCounter | dayCounter_ |
const std::vector< std::string > | currencies_ |
const std::vector< std::string > | indexCurrencies_ |
const std::set< Date > | simulationDates_ |
const IborFallbackConfig | iborFallbackConfig_ |
std::vector< std::pair< IndexInfo, QuantLib::ext::shared_ptr< InterestRateIndex > > > | irIndices_ |
std::vector< std::pair< IndexInfo, QuantLib::ext::shared_ptr< ZeroInflationIndex > > > | infIndices_ |
std::vector< IndexInfo > | indices_ |
std::vector< std::vector< size_t > > | randomVariates_ |
std::vector< std::pair< std::size_t, std::function< double(void)> > > | modelParameters_ |
![]() | |
std::map< std::string, boost::any > | additionalResults_ |
QuantLib::ext::shared_ptr< QuantExt::ComputationGraph > | g_ |
Additional Inherited Members | |
![]() | |
enum class | Type { MC , FD } |
Definition at line 23 of file gaussiancamcg.hpp.
GaussianCamCG | ( | const Handle< CrossAssetModel > & | cam, |
const Size | paths, | ||
const std::vector< std::string > & | currencies, | ||
const std::vector< Handle< YieldTermStructure > > & | curves, | ||
const std::vector< Handle< Quote > > & | fxSpots, | ||
const std::vector< std::pair< std::string, QuantLib::ext::shared_ptr< InterestRateIndex > > > & | irIndices, | ||
const std::vector< std::pair< std::string, QuantLib::ext::shared_ptr< ZeroInflationIndex > > > & | infIndices, | ||
const std::vector< std::string > & | indices, | ||
const std::vector< std::string > & | indexCurrencies, | ||
const std::set< Date > & | simulationDates, | ||
const Size | timeStepsPerYear = 1 , |
||
const IborFallbackConfig & | iborFallbackConfig = IborFallbackConfig::defaultConfig() , |
||
const std::vector< Size > & | projectedStateProcessIndices = {} , |
||
const std::vector< std::string > & | conditionalExpectationModelStates = {} , |
||
const bool | sloppySimDates = false |
||
) |
Definition at line 26 of file gaussiancamcg.cpp.
|
overridevirtual |
|
overridevirtual |
Implements ModelCG.
Definition at line 90 of file gaussiancamcg.cpp.
|
overridevirtual |
Implements ModelCG.
Definition at line 391 of file gaussiancamcg.cpp.
|
overridevirtual |
Implements ModelCG.
Definition at line 326 of file gaussiancamcg.cpp.
|
overridevirtual |
Reimplemented from ModelCG.
Definition at line 95 of file gaussiancamcg.cpp.
|
overridevirtual |
Implements ModelCG.
Definition at line 369 of file gaussiancamcg.cpp.
|
overridevirtual |
Implements ModelCG.
Definition at line 384 of file gaussiancamcg.cpp.
|
overrideprotectedvirtual |
Implements ModelCGImpl.
Definition at line 55 of file gaussiancamcg.hpp.
|
overrideprotected |
Definition at line 103 of file gaussiancamcg.cpp.
|
overrideprotectedvirtual |
Implements ModelCGImpl.
Definition at line 299 of file gaussiancamcg.cpp.
|
overrideprotectedvirtual |
Implements ModelCGImpl.
Definition at line 303 of file gaussiancamcg.cpp.
|
overrideprotectedvirtual |
Implements ModelCGImpl.
Definition at line 322 of file gaussiancamcg.cpp.
|
overrideprotectedvirtual |
Implements ModelCGImpl.
Definition at line 335 of file gaussiancamcg.cpp.
|
overrideprotectedvirtual |
Implements ModelCGImpl.
Definition at line 349 of file gaussiancamcg.cpp.
|
overrideprotectedvirtual |
Implements ModelCGImpl.
Definition at line 363 of file gaussiancamcg.cpp.
|
protected |
Definition at line 69 of file gaussiancamcg.hpp.
|
protected |
Definition at line 70 of file gaussiancamcg.hpp.
|
protected |
Definition at line 71 of file gaussiancamcg.hpp.
|
protected |
Definition at line 72 of file gaussiancamcg.hpp.
|
protected |
Definition at line 73 of file gaussiancamcg.hpp.
|
protected |
Definition at line 74 of file gaussiancamcg.hpp.
|
mutableprotected |
Definition at line 77 of file gaussiancamcg.hpp.
|
mutableprotected |
Definition at line 78 of file gaussiancamcg.hpp.
|
mutableprotected |
Definition at line 79 of file gaussiancamcg.hpp.
|
mutableprotected |
Definition at line 80 of file gaussiancamcg.hpp.
|
mutableprotected |
Definition at line 81 of file gaussiancamcg.hpp.
|
mutableprotected |
Definition at line 82 of file gaussiancamcg.hpp.
|
mutableprotected |
Definition at line 84 of file gaussiancamcg.hpp.
|
mutableprotected |
Definition at line 85 of file gaussiancamcg.hpp.
|
mutableprotected |
Definition at line 86 of file gaussiancamcg.hpp.
|
mutableprotected |
Definition at line 87 of file gaussiancamcg.hpp.
|
mutableprotected |
Definition at line 88 of file gaussiancamcg.hpp.
|
mutableprotected |
Definition at line 89 of file gaussiancamcg.hpp.
|
mutableprotected |
Definition at line 90 of file gaussiancamcg.hpp.
|
mutableprotected |
Definition at line 91 of file gaussiancamcg.hpp.
|
mutableprotected |
Definition at line 92 of file gaussiancamcg.hpp.
|
mutableprotected |
Definition at line 93 of file gaussiancamcg.hpp.
|
mutableprotected |
Definition at line 94 of file gaussiancamcg.hpp.
|
mutableprotected |
Definition at line 96 of file gaussiancamcg.hpp.
|
protected |
Definition at line 99 of file gaussiancamcg.hpp.
|
protected |
Definition at line 100 of file gaussiancamcg.hpp.
|
protected |
Definition at line 101 of file gaussiancamcg.hpp.
|
protected |
Definition at line 102 of file gaussiancamcg.hpp.
|
protected |
Definition at line 103 of file gaussiancamcg.hpp.