27 const std::vector<Time>& paymentTimes,
29 Size numberOfProducts)
30 : evolution_(
std::move(evolution)), paymentTimes_(paymentTimes), amounts_(
std::move(amounts)),
31 numberOfProducts_(numberOfProducts) {
36 "the number of rows in the matrix must equal "
37 "the number of products");
39 "the number of columns in the matrix must equal "
40 "the number of payment times");
42 "the number of evolution times must equal "
43 "the number of payment times");
71 QL_FAIL(
"not implemented (yet?)");
82 std::vector<Size>& numberCashFlowsThisStep,
83 std::vector<std::vector<MarketModelMultiProduct::CashFlow> >&
88 numberCashFlowsThisStep[i] = 1;
96 std::unique_ptr<MarketModelMultiProduct>
Curve state for market-model simulations
Market-model evolution description.
const std::vector< Time > & evolutionTimes() const
std::vector< Time > paymentTimes_
std::vector< Size > suggestedNumeraires() const override
std::unique_ptr< MarketModelMultiProduct > clone() const override
returns a newly-allocated copy of itself
bool nextTimeStep(const CurveState ¤tState, std::vector< Size > &numberCashFlowsThisStep, std::vector< std::vector< CashFlow > > &cashFlowsGenerated) override
return value indicates whether path is finished, TRUE means done
MarketModelCashRebate(EvolutionDescription evolution, const std::vector< Time > &paymentTimes, Matrix amounts, Size numberOfProducts)
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