31#include <ql/indexes/interestrateindex.hpp>
32#include <ql/processes/blackscholesprocess.hpp>
33#include <ql/timegrid.hpp>
52 const Size paths,
const std::vector<std::string>& currencies,
53 const std::vector<Handle<YieldTermStructure>>& curves,
const std::vector<Handle<Quote>>& fxSpots,
54 const std::vector<std::pair<std::string, QuantLib::ext::shared_ptr<InterestRateIndex>>>& irIndices,
55 const std::vector<std::pair<std::string, QuantLib::ext::shared_ptr<ZeroInflationIndex>>>& infIndices,
56 const std::vector<std::string>& indices,
const std::vector<std::string>& indexCurrencies,
57 const Handle<BlackScholesModelWrapper>& model,
58 const std::map<std::pair<std::string, std::string>, Handle<QuantExt::CorrelationTermStructure>>& correlations,
62 BlackScholesBase(
const Size paths,
const std::string& currency,
const Handle<YieldTermStructure>& curve,
63 const std::string& index,
const std::string& indexCurrency,
64 const Handle<BlackScholesModelWrapper>& model,
const Model::McParams& mcParams,
71 const boost::optional<long>& memSlot,
const RandomVariable& addRegressor1,
74 const Date& end,
const Real spread,
const Real gearing,
const Integer lookback,
75 const Natural rateCutoff,
const Natural fixingDays,
const bool includeSpread,
76 const Real cap,
const Real floor,
const bool nakedOption,
77 const bool localCapFloor)
const override;
82 Size
size()
const override;
92 Real
getFxSpot(
const Size idx)
const override;
98 const std::vector<Handle<YieldTermStructure>>
curves_;
100 const Handle<BlackScholesModelWrapper>
model_;
101 const std::map<std::pair<std::string, std::string>, Handle<QuantExt::CorrelationTermStructure>>
correlations_;
RandomVariable getInfIndexValue(const Size indexNo, const Date &d, const Date &fwd=Null< Date >()) const override
void performCalculations() const override
void releaseMemory() override
const std::vector< Date > simulationDates_
Size size() const override
RandomVariable getIrIndexValue(const Size indexNo, const Date &d, const Date &fwd=Null< Date >()) const override
RandomVariable npv(const RandomVariable &amount, const Date &obsdate, const Filter &filter, const boost::optional< long > &memSlot, const RandomVariable &addRegressor1, const RandomVariable &addRegressor2) const override
Real getFxSpot(const Size idx) const override
const Date & referenceDate() const override
std::map< long, std::tuple< Array, Size, Matrix > > storedRegressionModel_
std::map< Date, std::vector< RandomVariable > > underlyingPathsTraining_
RandomVariable getNumeraire(const Date &s) const override
Type type() const override
std::map< Date, std::vector< RandomVariable > > underlyingPaths_
std::set< Date > effectiveSimulationDates_
const std::vector< Handle< Quote > > fxSpots_
const Handle< BlackScholesModelWrapper > model_
RandomVariable getDiscount(const Size idx, const Date &s, const Date &t) const override
RandomVariable getIndexValue(const Size indexNo, const Date &d, const Date &fwd=Null< Date >()) const override
Size trainingSamples() const override
void resetNPVMem() override
void toggleTrainingPaths() const override
const std::map< std::pair< std::string, std::string >, Handle< QuantExt::CorrelationTermStructure > > correlations_
RandomVariable 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 override
const std::vector< Handle< YieldTermStructure > > curves_
std::vector< Size > positionInTimeGrid_
Matrix getCorrelation() const
SafeStack< Filter > filter
basis implementation for a script engine model
Serializable Credit Default Swap.