28 std::vector<Real> accruals,
29 const std::vector<Time>& paymentTimes,
30 std::vector<Rate> strikes)
32 strikes_(
std::move(strikes)) {
38 std::vector<Size>& numberCashFlowsThisStep,
39 std::vector<std::vector<MarketModelMultiProduct::CashFlow> >&
43 genCashFlows[i][0].timeIndex = i;
44 genCashFlows[i][0].amount =
48 std::fill(numberCashFlowsThisStep.begin(),
49 numberCashFlowsThisStep.end(), 1);
53 std::unique_ptr<MarketModelMultiProduct>
55 return std::unique_ptr<MarketModelMultiProduct>(
new OneStepForwards(*
this));
Curve state for market-model simulations
virtual Rate forwardRate(Size i) const =0
Single-step market-model product.
std::unique_ptr< MarketModelMultiProduct > clone() const override
returns a newly-allocated copy of itself
OneStepForwards(const std::vector< Time > &rateTimes, std::vector< Real > accruals, const std::vector< Time > &paymentTimes, std::vector< Rate > strikes)
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< Rate > strikes_
std::vector< Real > accruals_
std::size_t Size
size of a container
void checkIncreasingTimes(const std::vector< Time > ×)
check for strictly increasing times, first time greater than zero