Skip to content

Commit c25f25b

Browse files
pcaspersjenkins
authored andcommitted
QPR-11773 preliminary update, needs proper implementation
1 parent 3b5ec4d commit c25f25b

2 files changed

Lines changed: 14 additions & 13 deletions

File tree

QuantExt/qle/models/lgmvectorised.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -505,11 +505,9 @@ RandomVariable LgmVectorised::averagedBmaRate(const boost::shared_ptr<BMAIndex>&
505505
return avgBMA;
506506
}
507507

508-
RandomVariable LgmVectorised::subPeriodsRate(const boost::shared_ptr<IborIndex>& index,
509-
const std::vector<Date>& fixingDates, const Date& accrualStartDate,
510-
const Date& accrualEndDate, const Real spread, const Real gearing,
511-
const Real cap, const Real floor, const bool nakedOption, const Time t,
512-
const RandomVariable& x) const {
508+
RandomVariable LgmVectorised::subPeriodsRate(const boost::shared_ptr<InterestRateIndex>& index,
509+
const std::vector<Date>& fixingDates, const Real cap, const Real floor,
510+
const bool nakedOption, const Time t, const RandomVariable& x) const {
513511
QL_FAIL("not implemented yet.");
514512
}
515513

QuantExt/qle/models/lgmvectorised.hpp

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ class LgmVectorised {
5959
RandomVariable fixing(const boost::shared_ptr<InterestRateIndex>& index, const Date& fixingDate, const Time t,
6060
const RandomVariable& x) const;
6161

62-
/*! Handles observation time > first value date by applying an approximation. */
62+
/* Exact if no cap/floors are present and t <= first value date.
63+
Approximations are applied for t > first value date or when cap / floors are present. */
6364
RandomVariable compoundedOnRate(const boost::shared_ptr<OvernightIndex>& index,
6465
const std::vector<Date>& fixingDates, const std::vector<Date>& valueDates,
6566
const std::vector<Real>& dt, const Natural rateCutoff, const bool includeSpread,
@@ -68,25 +69,27 @@ class LgmVectorised {
6869
const bool localCapFloor, const bool nakedOption, const Time t,
6970
const RandomVariable& x) const;
7071

71-
/*! Handles observation time > first value date by applying an approximation. */
72+
/* Exact if no cap/floors are present and t <= first value date.
73+
Approximations are applied for t > first value date or when cap / floors are present. */
7274
RandomVariable averagedOnRate(const boost::shared_ptr<OvernightIndex>& index, const std::vector<Date>& fixingDates,
7375
const std::vector<Date>& valueDates, const std::vector<Real>& dt,
7476
const Natural rateCutoff, const bool includeSpread, const Real spread,
7577
const Real gearing, const Period lookback, const DayCounter& accrualDayCounter,
7678
const Real cap, const Real floor, const bool localCapFloor, const bool nakedOption,
7779
const Time t, const RandomVariable& x) const;
7880

79-
/*! Handles observation time > first value date by applying an approximation. */
81+
/* Exact if no cap/floors are present and t <= first value date.
82+
Approximations are applied for t > first value date or when cap / floors are present. */
8083
RandomVariable averagedBmaRate(const boost::shared_ptr<BMAIndex>& index, const std::vector<Date>& fixingDates,
8184
const Date& accrualStartDate, const Date& accrualEndDate, const Real spread,
8285
const Real gearing, const Real cap, const Real floor, const bool nakedOption,
8386
const Time t, const RandomVariable& x) const;
8487

85-
/*! Handles observation time > first value date by applying an approximation. */
86-
RandomVariable subPeriodsRate(const boost::shared_ptr<IborIndex>& index, const std::vector<Date>& fixingDates,
87-
const Date& accrualStartDate, const Date& accrualEndDate, const Real spread,
88-
const Real gearing, const Real cap, const Real floor, const bool nakedOption,
89-
const Time t, const RandomVariable& x) const;
88+
/* Exact if no cap/floors are present and t <= first fixing date.
89+
Approximations are applied for t > first value date or when cap / floors are present. */
90+
RandomVariable subPeriodsRate(const boost::shared_ptr<InterestRateIndex>& index,
91+
const std::vector<Date>& fixingDates, const Real cap, const Real floor,
92+
const bool nakedOption, const Time t, const RandomVariable& x) const;
9093

9194
private:
9295
boost::shared_ptr<IrLgm1fParametrization> p_;

0 commit comments

Comments
 (0)