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) {
43 std::vector<Size>& numberCashFlowsThisStep,
44 std::vector<std::vector<MarketModelMultiProduct::CashFlow> >&
46 std::fill(numberCashFlowsThisStep.begin(),
47 numberCashFlowsThisStep.end(),0);
52 genCashFlows[i][(indexOfTime)*2].timeIndex = indexOfTime;
53 genCashFlows[i][(indexOfTime)*2].amount =
56 genCashFlows[i][(indexOfTime)*2+1].timeIndex = indexOfTime;
57 genCashFlows[i][(indexOfTime)*2+1].amount =
60 numberCashFlowsThisStep[i] += 2;
66 std::unique_ptr<MarketModelMultiProduct>
Curve state for market-model simulations
virtual Rate forwardRate(Size i) const =0
Single-step market-model product.
OneStepCoinitialSwaps(const std::vector< Time > &rateTimes, std::vector< Real > fixedAccruals, std::vector< Real > floatingAccruals, const std::vector< Time > &paymentTimes, Real fixedRate)
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
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