18#include <ql/termstructures/volatility/swaption/swaptionvolstructure.hpp>
26 GaussianCamCG(
const Handle<CrossAssetModel>& cam,
const Size paths,
const std::vector<std::string>& currencies,
27 const std::vector<Handle<YieldTermStructure>>& curves,
const std::vector<Handle<Quote>>& fxSpots,
28 const std::vector<std::pair<std::string, QuantLib::ext::shared_ptr<InterestRateIndex>>>& irIndices,
29 const std::vector<std::pair<std::string, QuantLib::ext::shared_ptr<ZeroInflationIndex>>>& infIndices,
30 const std::vector<std::string>& indices,
const std::vector<std::string>& indexCurrencies,
31 const std::set<Date>& simulationDates,
const Size timeStepsPerYear = 1,
33 const std::vector<Size>& projectedStateProcessIndices = {},
34 const std::vector<std::string>& conditionalExpectationModelStates = {},
35 const bool sloppySimDates =
false);
40 std::size_t
npv(
const std::size_t amount,
const Date& obsdate,
const std::size_t
filter,
41 const boost::optional<long>& memSlot,
const std::size_t addRegressor1,
42 const std::size_t addRegressor2)
const override;
43 std::size_t
fwdCompAvg(
const bool isAvg,
const std::string& indexInput,
const Date& obsdate,
const Date& start,
44 const Date& end,
const Real spread,
const Real gearing,
const Integer lookback,
45 const Natural rateCutoff,
const Natural fixingDays,
const bool includeSpread,
const Real cap,
46 const Real floor,
const bool nakedOption,
const bool localCapFloor)
const override;
47 QuantLib::Size
size()
const override;
50 Real
getDirectFxSpotT0(
const std::string& forCcy,
const std::string& domCcy)
const override;
55 virtual std::size_t
getFutureBarrierProb(
const std::string& index,
const Date& obsdate1,
const Date& obsdate2,
56 const std::size_t barrier,
const bool above)
const override {
57 QL_FAIL(
"getFutureBarrierProb not implemented by GaussianCamCG");
61 std::size_t
getIndexValue(
const Size indexNo,
const Date& d,
const Date& fwd = Null<Date>())
const override;
62 std::size_t
getIrIndexValue(
const Size indexNo,
const Date& d,
const Date& fwd = Null<Date>())
const override;
63 std::size_t
getInfIndexValue(
const Size indexNo,
const Date& d,
const Date& fwd = Null<Date>())
const override;
64 std::size_t
getDiscount(
const Size idx,
const Date& s,
const Date& t)
const override;
66 std::size_t
getFxSpot(
const Size idx)
const override;
69 const Handle<CrossAssetModel>
cam_;
70 const std::vector<Handle<YieldTermStructure>>
curves_;
82 mutable std::map<Date, std::vector<std::size_t>>
irStates_;
83 mutable std::map<Date, std::vector<std::pair<std::size_t, std::size_t>>>
bool injectedPathStickyCloseOutRun_
void performCalculations() const override
std::map< Date, std::vector< std::size_t > > underlyingPaths_
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
QuantLib::Size size() const override
std::size_t underlyingPathsCgVersion_
std::vector< Size > infIndexPositionInCam_
std::vector< Size > infIndexPositionInProcess_
std::size_t getNumeraire(const Date &s) const override
std::vector< Size > indexPositionInProcess_
std::vector< Size > eqIndexInCam_
std::size_t getFxSpot(const Size idx) const override
const bool sloppySimDates_
Real getDirectFxSpotT0(const std::string &forCcy, const std::string &domCcy) const override
std::size_t getInfIndexValue(const Size indexNo, const Date &d, const Date &fwd=Null< Date >()) const override
const std::vector< QuantLib::Real > * injectedPathTimes_
const Date & referenceDate() const override
Real getDirectDiscountT0(const Date &paydate, const std::string ¤cy) const override
bool conditionalExpectationUseAsset_
std::vector< Size > currencyPositionInProcess_
std::vector< Size > irIndexPositionInCam_
std::map< Date, std::vector< std::pair< std::size_t, std::size_t > > > infStates_
bool conditionalExpectationUseIr_
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
std::vector< Size > currencyPositionInCam_
const Handle< CrossAssetModel > cam_
Type type() const override
std::set< Date > effectiveSimulationDates_
std::size_t getIrIndexValue(const Size indexNo, const Date &d, const Date &fwd=Null< Date >()) const override
std::map< Date, std::vector< std::size_t > > irStates_
bool conditionalExpectationUseInf_
const std::vector< Handle< Quote > > fxSpots_
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
const std::vector< std::vector< std::size_t > > * injectedPaths_
std::size_t getDiscount(const Size idx, const Date &s, const Date &t) const override
const std::vector< Size > projectedStateProcessIndices_
std::size_t getIndexValue(const Size indexNo, const Date &d, const Date &fwd=Null< Date >()) const override
const Size timeStepsPerYear_
const std::vector< bool > * injectedPathIsRelevantTime_
const std::vector< Handle< YieldTermStructure > > curves_
std::vector< Size > positionInTimeGrid_
static IborFallbackConfig defaultConfig()
SafeStack< Filter > filter
Build a cross asset model.
basis implementation for a script engine model
Serializable Credit Default Swap.