Adapt Yield Curve and Volatility Surface and Market Data, to be better compatible with unit test.
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:
@@ -10,24 +10,24 @@
|
||||
|
||||
class MarketData {
|
||||
public:
|
||||
MarketData() = default;
|
||||
MarketData() = delete;
|
||||
|
||||
MarketData(double spot, std::unique_ptr<YieldCurve> yield_curve,
|
||||
std::unique_ptr<VolatilitySurface> volatility_surface)
|
||||
MarketData(double spot, std::shared_ptr<const YieldCurve> yield_curve,
|
||||
std::shared_ptr<const VolatilitySurface> volatility_surface)
|
||||
: spot_(spot),
|
||||
yield_curve_(std::move(yield_curve)),
|
||||
volatility_surface_(std::move(volatility_surface)) {
|
||||
}
|
||||
|
||||
double spot() const;
|
||||
YieldCurve& yield_curve();
|
||||
VolatilitySurface& volatility_surface();
|
||||
const YieldCurve& yield_curve() const;
|
||||
const VolatilitySurface& volatility_surface() const;
|
||||
|
||||
private:
|
||||
double spot_;
|
||||
std::unique_ptr<YieldCurve> yield_curve_;
|
||||
std::unique_ptr<VolatilitySurface> volatility_surface_;
|
||||
std::shared_ptr<const YieldCurve> yield_curve_;
|
||||
std::shared_ptr<const VolatilitySurface> volatility_surface_;
|
||||
};
|
||||
|
||||
|
||||
#endif //QUANTENGINE_MARKETDATA_HPP
|
||||
#endif //QUANTENGINE_MARKETDATA_HPP
|
||||
|
||||
Reference in New Issue
Block a user