32#include <ql/indexes/interestrateindex.hpp>
33#include <ql/processes/blackscholesprocess.hpp>
34#include <ql/timegrid.hpp>
53 const Size paths,
const std::vector<std::string>& currencies,
54 const std::vector<Handle<YieldTermStructure>>& curves,
const std::vector<Handle<Quote>>& fxSpots,
55 const std::vector<std::pair<std::string, QuantLib::ext::shared_ptr<InterestRateIndex>>>& irIndices,
56 const std::vector<std::pair<std::string, QuantLib::ext::shared_ptr<ZeroInflationIndex>>>& infIndices,
57 const std::vector<std::string>& indices,
const std::vector<std::string>& indexCurrencies,
58 const Handle<BlackScholesModelWrapper>& model,
59 const std::map<std::pair<std::string, std::string>, Handle<QuantExt::CorrelationTermStructure>>& correlations,
63 BlackScholesCGBase(
const Size paths,
const std::string& currency,
const Handle<YieldTermStructure>& curve,
64 const std::string& index,
const std::string& indexCurrency,
65 const Handle<BlackScholesModelWrapper>& model,
const std::set<Date>& simulationDates,
71 std::size_t
npv(
const std::size_t amount,
const Date& obsdate,
const std::size_t
filter,
72 const boost::optional<long>& memSlot,
const std::size_t addRegressor1,
73 const std::size_t addRegressor2)
const override;
74 std::size_t
fwdCompAvg(
const bool isAvg,
const std::string& indexInput,
const Date& obsdate,
const Date& start,
75 const Date& end,
const Real spread,
const Real gearing,
const Integer lookback,
76 const Natural rateCutoff,
const Natural fixingDays,
const bool includeSpread,
const Real cap,
77 const Real floor,
const bool nakedOption,
const bool localCapFloor)
const override;
80 Real
getDirectFxSpotT0(
const std::string& forCcy,
const std::string& domCcy)
const override;
86 std::size_t
getIndexValue(
const Size indexNo,
const Date& d,
const Date& fwd = Null<Date>())
const override;
87 std::size_t
getIrIndexValue(
const Size indexNo,
const Date& d,
const Date& fwd = Null<Date>())
const override;
88 std::size_t
getInfIndexValue(
const Size indexNo,
const Date& d,
const Date& fwd = Null<Date>())
const override;
89 std::size_t
getDiscount(
const Size idx,
const Date& s,
const Date& t)
const override;
91 std::size_t
getFxSpot(
const Size idx)
const override;
94 const std::vector<Handle<YieldTermStructure>>
curves_;
96 const Handle<BlackScholesModelWrapper>
model_;
97 const std::map<std::pair<std::string, std::string>, Handle<QuantExt::CorrelationTermStructure>>
correlations_;
void performCalculations() const override
std::map< Date, std::vector< std::size_t > > underlyingPaths_
const std::vector< Date > simulationDates_
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 underlyingPathsCgVersion_
std::size_t getNumeraire(const Date &s) const override
std::size_t getFxSpot(const Size idx) const override
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 Date & referenceDate() const override
Real getDirectDiscountT0(const Date &paydate, const std::string ¤cy) const override
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
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 Handle< BlackScholesModelWrapper > model_
std::size_t getDiscount(const Size idx, const Date &s, const Date &t) const override
std::size_t getIndexValue(const Size indexNo, const Date &d, const Date &fwd=Null< Date >()) const override
const std::map< std::pair< std::string, std::string >, Handle< QuantExt::CorrelationTermStructure > > correlations_
const std::vector< Handle< YieldTermStructure > > curves_
std::vector< Size > positionInTimeGrid_
SafeStack< Filter > filter
interface for model against which a script can be run
basis implementation for a script engine model
Serializable Credit Default Swap.