Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kongzii committed Feb 14, 2024
1 parent 9ce72b0 commit 8c478e9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion evo_researcher/benchmark/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -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".

Expand Down

0 comments on commit 8c478e9

Please sign in to comment.