36 const std::vector<Time>& paymentTimes,
38 Size numberOfProducts)
39 : evolution_(
std::move(evolution)), paymentTimes_(paymentTimes), amounts_(
std::move(amounts)),
40 numberOfProducts_(numberOfProducts) {
45 "the number of rows in the matrix must equal "
46 "the number of products");
48 "the number of columns in the matrix must equal "
49 "the number of payment times");
51 "the number of evolution times must equal "
52 "the number of payment times");
80 QL_FAIL(
"not implemented (yet?)");
91 std::vector<Size>& numberCashFlowsThisStep,
92 std::vector<std::vector<MarketModelPathwiseMultiProduct::CashFlow> >& cashFlowsGenerated)
96 numberCashFlowsThisStep[i] = 1;
101 cashFlowsGenerated[i][0].amount[k] = 0.0;
108 std::unique_ptr<MarketModelPathwiseMultiProduct>
Curve state for market-model simulations
Market-model evolution description.
Size numberOfRates() const
const std::vector< Time > & evolutionTimes() const
std::vector< Time > paymentTimes_
std::vector< Size > suggestedNumeraires() const override
MarketModelPathwiseCashRebate(EvolutionDescription evolution, const std::vector< Time > &paymentTimes, Matrix amounts, Size numberOfProducts)
bool nextTimeStep(const CurveState ¤tState, std::vector< Size > &numberCashFlowsThisStep, std::vector< std::vector< MarketModelPathwiseMultiProduct::CashFlow > > &cashFlowsGenerated) override
return value indicates whether path is finished, TRUE means done
std::unique_ptr< MarketModelPathwiseMultiProduct > clone() const override
returns a newly-allocated copy of itself
bool alreadyDeflated() const override
std::vector< Time > possibleCashFlowTimes() const override
const EvolutionDescription & evolution() const override
Size maxNumberOfCashFlowsPerProductPerStep() const override
EvolutionDescription evolution_
Size numberOfProducts() const override
void reset() override
during simulation put product at start of path
Matrix used in linear algebra.
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
#define QL_FAIL(message)
throw an error (possibly with file and line information)
std::size_t Size
size of a container
void checkIncreasingTimes(const std::vector< Time > ×)
check for strictly increasing times, first time greater than zero