Create option pricing engine structure, test architecture.
Some checks failed
C++ CI / build (push) Has been cancelled
Some checks failed
C++ CI / build (push) Has been cancelled
This commit is contained in:
16
tests/stubs/FlatYieldCurve.hpp
Normal file
16
tests/stubs/FlatYieldCurve.hpp
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// Created by David Doebel on 07.03.2026.
|
||||
//
|
||||
#ifndef QUANTENGINE_FLATYIELDCURVE_HPP
|
||||
#define QUANTENGINE_FLATYIELDCURVE_HPP
|
||||
#include "YieldCurve.hpp"
|
||||
#include <cmath>
|
||||
|
||||
class FlatYieldCurve : public YieldCurve{
|
||||
|
||||
double discount(double t) override {return std::exp(-rate_ * t); };
|
||||
double zeroRate(double t) override {return rate_; }
|
||||
private:
|
||||
double rate_ = 0.01;
|
||||
};
|
||||
#endif
|
||||
Reference in New Issue
Block a user