From 8c478e9511b8130aca6287609376f0c47852ca51 Mon Sep 17 00:00:00 2001 From: Peter Jung Date: Wed, 14 Feb 2024 08:51:29 +0100 Subject: [PATCH] update comments --- evo_researcher/benchmark/benchmark.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/evo_researcher/benchmark/benchmark.py b/evo_researcher/benchmark/benchmark.py index 6c07fb96..6e5b7b5c 100644 --- a/evo_researcher/benchmark/benchmark.py +++ b/evo_researcher/benchmark/benchmark.py @@ -313,10 +313,14 @@ def get_markets_summary(self) -> t.Dict[str, t.List[str | float]]: return markets_summary def calculate_expected_returns(self, prediction: Prediction, market: Market) -> float | None: + """ + The expected value if betting on a binary market in its initialized state of 50:50 'yes' and 'no' shares, with the assumption that the correct `p_yes` is that of the market. + """ if not prediction.is_answered: return None - # TODO: Add support for different bet sizes and calculate shares based on the market's odds. + # TODO: Add support for different bet sizes -- if we bet a low amount (such as <10 units), the real shares will be very close to that we calculate below (bet_units / share_price), + # but if one bets a lot, it will change the share price along the way, and so he/she receives less than `bet_units / share_price`, but it's more complicated to calculate. bet_units = 10 # Assuming the agent always bet 10 units per market. buy_yes_threshold = 0.5 # If the agent's prediction is > 50% it should buy "yes", otherwise "no".