Skip to content

Commit 9d2c74f

Browse files
committed
Rename Black Scholes model
1 parent 1285a36 commit 9d2c74f

File tree

3 files changed

+334
-334
lines changed

3 files changed

+334
-334
lines changed
Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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
33

44
#include <thales/strategies/strategy_base.h>
55
#include <thales/models/black_scholes.h>
@@ -11,25 +11,25 @@ namespace thales {
1111
namespace strategies {
1212

1313
/**
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.
1616
*
1717
* This strategy compares market prices of options with their theoretical prices
1818
* calculated using the Black-Scholes model. If the market price is significantly
1919
* different from the theoretical price, it generates a trading signal.
2020
*/
21-
class BlackScholesArbitrage : public StrategyBase {
21+
class BlackScholes : public StrategyBase {
2222
public:
2323
/**
2424
* @brief Constructor
2525
* @param config The configuration for the strategy
2626
*/
27-
explicit BlackScholesArbitrage(const utils::Config& config);
27+
explicit BlackScholes(const utils::Config& config);
2828

2929
/**
3030
* @brief Destructor
3131
*/
32-
~BlackScholesArbitrage() override = default;
32+
~BlackScholes() override = default;
3333

3434
/**
3535
* @brief Initialize the strategy
@@ -39,44 +39,44 @@ class BlackScholesArbitrage : public StrategyBase {
3939

4040
/**
4141
* @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
4343
* @param portfolio The current portfolio
4444
* @return A vector of signals generated by the strategy
4545
*/
4646
std::vector<Signal> execute(
47-
const std::vector<data::MarketData>& marketData,
47+
const std::vector<data::MarketData>& market_data,
4848
const core::Portfolio& portfolio
4949
) override;
5050

5151
/**
5252
* @brief Get the symbols that the strategy is interested in
5353
* @return A vector of symbols
5454
*/
55-
std::vector<std::string> getSymbols() const override;
55+
std::vector<std::string> get_symbols() const override;
5656

5757
private:
5858
// 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_;
6464

6565
// Symbols to trade
6666
std::vector<std::string> symbols_;
6767

6868
// Historical volatility cache
69-
std::unordered_map<std::string, double> historicalVolatility_;
69+
std::unordered_map<std::string, double> historical_volatility_;
7070

7171
// 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);
7777
};
7878

7979
} // namespace strategies
8080
} // namespace thales
8181

82-
#endif // THALES_STRATEGIES_BLACK_SCHOLES_ARBITRAGE_H
82+
#endif // THALES_STRATEGIES_BLACK_SCHOLES_H

0 commit comments

Comments
 (0)