24#ifndef quantlib_risky_notional_hpp
25#define quantlib_risky_notional_hpp
65 explicit NotionalRisk(ext::shared_ptr<EventPaymentOffset> paymentOffset)
69 virtual void updatePath(
const std::vector<std::pair<Date, Real> >& events,
82 void updatePath(
const std::vector<std::pair<Date, Real> >& events,
98 "exhaustion level needs to be greater than attachement");
101 void updatePath(
const std::vector<std::pair<Date, Real> >& events,
105 Real previousNotional = 1;
106 for (
const auto& event : events) {
107 losses +=
event.second;
DigitalNotionalRisk(const ext::shared_ptr< EventPaymentOffset > &paymentOffset, Real threshold)
void updatePath(const std::vector< std::pair< Date, Real > > &events, NotionalPath &path) const override
virtual ~EventPaymentOffset()=default
virtual Date paymentDate(const Date &eventDate)=0
Date paymentDate(const Date &eventDate) override
void addReduction(const Date &date, Rate newRate)
Rate notionalRate(const Date &date) const
std::vector< std::pair< Date, Real > > notionalRate_
ext::shared_ptr< EventPaymentOffset > paymentOffset_
virtual void updatePath(const std::vector< std::pair< Date, Real > > &events, NotionalPath &path) const =0
NotionalRisk(ext::shared_ptr< EventPaymentOffset > paymentOffset)
virtual ~NotionalRisk()=default
ProportionalNotionalRisk(const ext::shared_ptr< EventPaymentOffset > &paymentOffset, Real attachement, Real exhaustion)
void updatePath(const std::vector< std::pair< Date, Real > > &events, NotionalPath &path) const override
date- and time-related classes, typedefs and enumerations
Classes and functions for error handling.
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
Maps shared_ptr to either the boost or std implementation.