From 17772f86a304563320e7b77319d54860d3a9033b Mon Sep 17 00:00:00 2001 From: Steven Ewald Date: Sun, 6 Oct 2024 12:32:21 -0500 Subject: [PATCH] Removed unnecessary poisson distribution call --- exchange/src/exchange/bots/bot_types/market_maker.hpp | 2 +- exchange/src/exchange/bots/bot_types/retail.cpp | 2 -- exchange/src/exchange/bots/bot_types/retail.hpp | 5 ++--- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/exchange/src/exchange/bots/bot_types/market_maker.hpp b/exchange/src/exchange/bots/bot_types/market_maker.hpp index 6857ab42..2fc57f6e 100644 --- a/exchange/src/exchange/bots/bot_types/market_maker.hpp +++ b/exchange/src/exchange/bots/bot_types/market_maker.hpp @@ -32,7 +32,7 @@ class MarketMakerBot : public BotTrader { BotTrader(ticker, interest_limit) {} - void take_action(const shared_bot_state& state) override; + void take_action(const shared_bot_state& state) final; const std::string& get_type() const final diff --git a/exchange/src/exchange/bots/bot_types/retail.cpp b/exchange/src/exchange/bots/bot_types/retail.cpp index 43f6d6b0..c92402ff 100644 --- a/exchange/src/exchange/bots/bot_types/retail.cpp +++ b/exchange/src/exchange/bots/bot_types/retail.cpp @@ -22,8 +22,6 @@ RetailBot::take_action(const shared_bot_state& state) if (noise_factor >= p_trade * signal_strength) return; - if (poisson_dist_(gen_) <= 0) - return; common::decimal_price noised_theo = state.THEO + generate_gaussian_noise(0, .1); common::decimal_quantity quantity{ diff --git a/exchange/src/exchange/bots/bot_types/retail.hpp b/exchange/src/exchange/bots/bot_types/retail.hpp index 15794031..47c37a32 100644 --- a/exchange/src/exchange/bots/bot_types/retail.hpp +++ b/exchange/src/exchange/bots/bot_types/retail.hpp @@ -10,12 +10,11 @@ namespace nutc::exchange { class RetailBot : public BotTrader { std::mt19937 gen_{}; // NOLINT - std::poisson_distribution<> poisson_dist_{}; common::decimal_price generate_aggresiveness_() { - static std::normal_distribution<> dist{1000, 2000}; + static std::normal_distribution<> dist{700, 1400}; return dist(gen_); } @@ -24,7 +23,7 @@ class RetailBot : public BotTrader { BotTrader(ticker, interest_limit), AGGRESSIVENESS(generate_aggresiveness_()) {} - void take_action(const shared_bot_state& state) override; + void take_action(const shared_bot_state& state) final; const std::string& get_type() const final