28 const std::vector<Time>& exerciseTimes,
29 std::vector<Rate> strikes)
30 : rateTimes_(rateTimes), exerciseTimes_(exerciseTimes), strikes_(
std::move(strikes)),
31 rateIndex_(exerciseTimes.size()), evolution_(rateTimes, exerciseTimes) {
33 for (
Size i=0; i<exerciseTimes.size(); ++i) {
34 while (j < rateTimes.size() && rateTimes[j] < exerciseTimes[i])
61 std::vector<Real>&
results)
const {
77 const std::vector<Real>& parameters,
78 const std::vector<Real>& variables)
const {
79 return variables[0] >= parameters[0];
83 std::vector<Real>& parameters)
const {
85 parameters[0] =
strikes_.at(exerciseIndex);
88 std::unique_ptr<MarketModelParametricExercise>
Curve state for market-model simulations
virtual Rate coterminalSwapRate(Size i) const =0
Market-model evolution description.
void values(const CurveState &, std::vector< Real > &results) const override
std::vector< Size > rateIndex_
std::vector< Size > numberOfVariables() const override
TriggeredSwapExercise(const std::vector< Time > &rateTimes, const std::vector< Time > &exerciseTimes, std::vector< Rate > strikes)
std::vector< Size > numberOfParameters() const override
Size numberOfExercises() const override
void nextStep(const CurveState &) override
std::unique_ptr< MarketModelParametricExercise > clone() const override
void guess(Size exerciseNumber, std::vector< Real > ¶meters) const override
std::valarray< bool > isExerciseTime() const override
const EvolutionDescription & evolution() const override
std::vector< Time > exerciseTimes_
EvolutionDescription evolution_
bool exercise(Size exerciseNumber, const std::vector< Real > ¶meters, const std::vector< Real > &variables) const override
std::vector< Rate > strikes_
std::size_t Size
size of a container