34 const std::vector<Real>& accruals,
35 const std::vector<Rate>& strikes,
37 : rateTimes_(rateTimes),
40 numberRates_(rateTimes.size()-1),
41 multiplier_(multiplier)
48 "rateTimes.size()<> numberOfRates+1");
57 "accruals.size() does not equal numberOfRates or 1");
60 "strikes.size() does not equal numberOfRates or 1" );
68 std::vector<Size>& numberCashFlowsThisStep,
69 std::vector<std::vector<MarketModelPathwiseMultiProduct::CashFlow> >& cashFlowsGenerated)
74 cashFlowsGenerated[0][0].amount[0] =
77 numberCashFlowsThisStep[0] = 1;
80 cashFlowsGenerated[0][0].amount[i] =0;
88 std::unique_ptr<MarketModelPathwiseMultiProduct>
Curve state for market-model simulations
virtual Rate forwardRate(Size i) const =0
Market-model evolution description.
std::vector< Size > suggestedNumeraires() const override
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
std::vector< Rate > strikes_
std::vector< Real > rateTimes_
std::vector< Real > accruals_
void reset() override
during simulation put product at start of path
MarketModelPathwiseSwap(const std::vector< Time > &rateTimes, const std::vector< Time > &accruals, const std::vector< Rate > &strikes, Real multiplier=1.0)
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
std::size_t Size
size of a container
void checkIncreasingTimes(const std::vector< Time > ×)
check for strictly increasing times, first time greater than zero