Files
pricing/cpp/PricingEngine.hpp
David Doebel 087a2f0d74 Restructure C++ core into cpp module and package bindings.
Move the pricing engine sources out of src/ into cpp/, add the closed-form engine and pybind wiring, and align tests/build targets with the new project layout.

Made-with: Cursor
2026-04-02 16:30:33 +02:00

30 lines
721 B
C++

/**
* @file PricingEngine.hpp
* @brief Abstract pricer for @ref Instrument given a stochastic model.
*/
#ifndef QUANTENGINE_PRICINGENGINE_HPP
#define QUANTENGINE_PRICINGENGINE_HPP
#include <memory>
#include "StochasticProcess.hpp"
class Instrument;
/**
* @brief Computes model price of an instrument (e.g. Monte Carlo, PDE, closed form).
*/
class PricingEngine {
public:
PricingEngine() = default;
PricingEngine(std::unique_ptr<StochasticProcess> process) : process_(std::move(process)){}
virtual ~PricingEngine() = default;
virtual double calculate(const Instrument& instrument) const = 0;
protected:
std::unique_ptr<StochasticProcess> process_;
};
#endif //QUANTENGINE_PRICINGENGINE_HPP