Create core structure

This commit is contained in:
David Doebel
2026-03-03 23:33:32 +01:00
parent 183cab36bd
commit 15a20fc965
11 changed files with 156 additions and 1 deletions

21
src/payoff.hpp Normal file
View File

@@ -0,0 +1,21 @@
//
// Created by David Doebel on 03.03.2026.
//
#ifndef OPTION_PRICING_PAYOFF_HPP
#define OPTION_PRICING_PAYOFF_HPP
class Payoff {
public:
virtual double operator()(double ST) const = 0;
virtual ~Payoff() = default;
};
class CallPayoff : public Payoff {
public:
CallPayoff(double K) : K_(K) {}
double operator()(double ST) const override;
private:
double K_;
};
#endif //OPTION_PRICING_PAYOFF_HPP