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:
33
src/Option.hpp
Normal file
33
src/Option.hpp
Normal file
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// Created by David Doebel on 05.03.2026.
|
||||
//
|
||||
|
||||
#ifndef QUANTENGINE_OPTION_HPP
|
||||
#define QUANTENGINE_OPTION_HPP
|
||||
#include "Instrument.hpp"
|
||||
#include "Exercise.hpp"
|
||||
|
||||
class Option : public Instrument{
|
||||
public:
|
||||
Option() = default;
|
||||
virtual ~Option() = default;
|
||||
Option(double maturity, std::unique_ptr<Exercise> exercise,
|
||||
std::unique_ptr<Payoff> payoff, std::unique_ptr<PricingEngine> engine);
|
||||
[[nodiscard]] Exercise& exercise() const {
|
||||
return *exercise_;
|
||||
}
|
||||
|
||||
protected:
|
||||
std::unique_ptr<Exercise> exercise_;
|
||||
};
|
||||
|
||||
class VanillaOption : public Option {
|
||||
public:
|
||||
using Option::Option;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif //QUANTENGINE_OPTION_HPP
|
||||
Reference in New Issue
Block a user