-
Notifications
You must be signed in to change notification settings - Fork 1
/
Strategy.h
38 lines (27 loc) · 1.19 KB
/
Strategy.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef A800BA55_3190_4D63_84D0_527C5870F81F
#define A800BA55_3190_4D63_84D0_527C5870F81F
// #include "StockPriceModel.h"
#include "BlackScholesModel.h"
#include "ContinuousTimeOptionBase.h"
#include <memory>
class Strategy {
public:
virtual ~Strategy(){};
std::shared_ptr<BlackScholesModel> getPricingModel() {
return this->pricingModel;
}
void setPricingModel(std::shared_ptr<BlackScholesModel> model) {
// create a copy
this->pricingModel = model;
// pricingModel = std::make_shared<StockPriceModel>(*model);
}
virtual double chooseCharge(double assetPrice, std::shared_ptr<ContinuousTimeOptionBase> option);
virtual Matrix selectStockQuantity(double date, Matrix assetPrices)=0;
virtual double selectStockQuantity(double date, double assetPrice)=0;
private:
std::shared_ptr<BlackScholesModel> pricingModel;
/* How much should we charge the customer */
// double chooseCharge(double assetPrice, std::shared_ptr<ContinuousTimeOptionBase> option);
/* How much stock/bond should we hold */
};
#endif /* A800BA55_3190_4D63_84D0_527C5870F81F */