28 std::vector<Real> fixedAccruals,
29 std::vector<Real> floatingAccruals,
30 const std::vector<Time>& paymentTimes,
33 floatingAccruals_(
std::move(floatingAccruals)), paymentTimes_(paymentTimes),
34 fixedRate_(fixedRate) {
42 std::vector<Size>& numberCashFlowsThisStep,
43 std::vector<std::vector<MarketModelMultiProduct::CashFlow> >&
46 std::fill(numberCashFlowsThisStep.begin(),
47 numberCashFlowsThisStep.end(),0);
51 genCashFlows[i][0].amount =
55 genCashFlows[i][1].amount =
58 numberCashFlowsThisStep[i] = 2;
65 std::unique_ptr<MarketModelMultiProduct>
Curve state for market-model simulations
virtual Rate forwardRate(Size i) const =0
Multiple-step market-model product.
std::vector< Real > floatingAccruals_
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
MultiStepCoinitialSwaps(const std::vector< Time > &rateTimes, std::vector< Real > fixedAccruals, std::vector< Real > floatingAccruals, const std::vector< Time > &paymentTimes, Real fixedRate)
std::vector< Real > fixedAccruals_
std::size_t Size
size of a container
void checkIncreasingTimes(const std::vector< Time > ×)
check for strictly increasing times, first time greater than zero