2026-04-02 16:30:33 +02:00
|
|
|
/**
|
|
|
|
|
* @file YieldCurve.hpp
|
|
|
|
|
* @brief Abstract yield curve: discount factors and zero rates.
|
|
|
|
|
*/
|
2026-03-08 10:15:23 +01:00
|
|
|
|
|
|
|
|
#ifndef QUANTENGINE_YIELDCURVE_HPP
|
|
|
|
|
#define QUANTENGINE_YIELDCURVE_HPP
|
|
|
|
|
|
2026-04-02 16:30:33 +02:00
|
|
|
/**
|
|
|
|
|
* @brief Risk-free rate term structure for discounting and risk-neutral drift.
|
|
|
|
|
*/
|
2026-03-08 10:15:23 +01:00
|
|
|
class YieldCurve {
|
|
|
|
|
public:
|
|
|
|
|
YieldCurve() = default;
|
|
|
|
|
|
|
|
|
|
YieldCurve(const YieldCurve &other) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
YieldCurve(YieldCurve &&other) noexcept {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
YieldCurve & operator=(const YieldCurve &other) {
|
|
|
|
|
if (this == &other)
|
|
|
|
|
return *this;
|
|
|
|
|
return *this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
YieldCurve & operator=(YieldCurve &&other) noexcept {
|
|
|
|
|
if (this == &other)
|
|
|
|
|
return *this;
|
|
|
|
|
return *this;
|
|
|
|
|
}
|
|
|
|
|
virtual ~YieldCurve() = default;
|
2026-03-12 12:10:13 +01:00
|
|
|
virtual double discount(double t) const = 0;
|
|
|
|
|
virtual double zeroRate(double t) const = 0;
|
2026-03-08 10:15:23 +01:00
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2026-03-12 12:10:13 +01:00
|
|
|
#endif //QUANTENGINE_YIELDCURVE_HPP
|