1
- #ifndef THALES_STRATEGIES_BLACK_SCHOLES_ARBITRAGE_H
2
- #define THALES_STRATEGIES_BLACK_SCHOLES_ARBITRAGE_H
1
+ #ifndef THALES_STRATEGIES_BLACK_SCHOLES_H
2
+ #define THALES_STRATEGIES_BLACK_SCHOLES_H
3
3
4
4
#include < thales/strategies/strategy_base.h>
5
5
#include < thales/models/black_scholes.h>
@@ -11,25 +11,25 @@ namespace thales {
11
11
namespace strategies {
12
12
13
13
/* *
14
- * @class BlackScholesArbitrage
15
- * @brief Strategy that looks for arbitrage opportunities based on Black-Scholes pricing.
14
+ * @class BlackScholes
15
+ * @brief Strategy based on Black-Scholes pricing model .
16
16
*
17
17
* This strategy compares market prices of options with their theoretical prices
18
18
* calculated using the Black-Scholes model. If the market price is significantly
19
19
* different from the theoretical price, it generates a trading signal.
20
20
*/
21
- class BlackScholesArbitrage : public StrategyBase {
21
+ class BlackScholes : public StrategyBase {
22
22
public:
23
23
/* *
24
24
* @brief Constructor
25
25
* @param config The configuration for the strategy
26
26
*/
27
- explicit BlackScholesArbitrage (const utils::Config& config);
27
+ explicit BlackScholes (const utils::Config& config);
28
28
29
29
/* *
30
30
* @brief Destructor
31
31
*/
32
- ~BlackScholesArbitrage () override = default ;
32
+ ~BlackScholes () override = default ;
33
33
34
34
/* *
35
35
* @brief Initialize the strategy
@@ -39,44 +39,44 @@ class BlackScholesArbitrage : public StrategyBase {
39
39
40
40
/* *
41
41
* @brief Execute the strategy
42
- * @param marketData The market data to use for execution
42
+ * @param market_data The market data to use for execution
43
43
* @param portfolio The current portfolio
44
44
* @return A vector of signals generated by the strategy
45
45
*/
46
46
std::vector<Signal> execute (
47
- const std::vector<data::MarketData>& marketData ,
47
+ const std::vector<data::MarketData>& market_data ,
48
48
const core::Portfolio& portfolio
49
49
) override ;
50
50
51
51
/* *
52
52
* @brief Get the symbols that the strategy is interested in
53
53
* @return A vector of symbols
54
54
*/
55
- std::vector<std::string> getSymbols () const override ;
55
+ std::vector<std::string> get_symbols () const override ;
56
56
57
57
private:
58
58
// Strategy parameters
59
- double minPriceDiscrepancy_ ;
60
- double minVolatility_ ;
61
- double maxVolatility_ ;
62
- int minDaysToExpiration_ ;
63
- int maxDaysToExpiration_ ;
59
+ double min_price_discrepancy_ ;
60
+ double min_volatility_ ;
61
+ double max_volatility_ ;
62
+ int min_days_to_expiration_ ;
63
+ int max_days_to_expiration_ ;
64
64
65
65
// Symbols to trade
66
66
std::vector<std::string> symbols_;
67
67
68
68
// Historical volatility cache
69
- std::unordered_map<std::string, double > historicalVolatility_ ;
69
+ std::unordered_map<std::string, double > historical_volatility_ ;
70
70
71
71
// Private methods
72
- double calculateHistoricalVolatility (const std::vector<data::MarketData>& marketData , const std::string& symbol);
73
- double calculateRiskFreeRate () const ;
74
- double calculateTimeToExpiration (const std::string& expirationDate ) const ;
75
- bool isOptionEligible (const data::OptionData& option) const ;
76
- Signal generateSignal (const data::OptionData& option, double theoreticalPrice );
72
+ double calculate_historical_volatility (const std::vector<data::MarketData>& market_data , const std::string& symbol);
73
+ double calculate_risk_free_rate () const ;
74
+ double calculate_time_to_expiration (const std::string& expiration_date ) const ;
75
+ bool is_option_eligible (const data::OptionData& option) const ;
76
+ Signal generate_signal (const data::OptionData& option, double theoretical_price );
77
77
};
78
78
79
79
} // namespace strategies
80
80
} // namespace thales
81
81
82
- #endif // THALES_STRATEGIES_BLACK_SCHOLES_ARBITRAGE_H
82
+ #endif // THALES_STRATEGIES_BLACK_SCHOLES_H
0 commit comments