gnosis / prediction-market-agent-tooling

Tools to benchmark, deploy and monitor prediction market agents.
GNU Lesser General Public License v3.0
18 stars 4 forks source link

Make `market_picking` decision modular #411

Open gabrielfior opened 1 month ago

gabrielfior commented 1 month ago

Similar structure to BettingStrategy.

@ABC
class MarketPickingStrategy:
    def sort_markets(markets: list[AgentMarket]) -> list[AgentMarket]

With this, we could have following strategies:

  1. (Standard) Pick markets closing soonest (and some other criteria from verify_market)
  2. Pick markets that have little volume (to increase Omen's market coverage) - use cheaper models like gpt3.5 ...

Also, strategy 2 above should be deployed as a new agent.

evangriffiths commented 1 month ago

@kongzii says "Some long-range markets are being created, but not getting betted on at all by our agents, until they are near closing"

evangriffiths commented 2 weeks ago

In https://github.com/gnosis/prediction-market-agent-tooling/pull/533 I've just exposed the get_markets args as class variables, which means the behaviour is now configurable per agent.

So now we have 3 variables:

    n_markets_to_fetch: int = MAX_AVAILABLE_MARKETS
    trade_on_markets_created_after: DatetimeUTC | None = None
    get_markets_sort_by: SortBy = SortBy.CLOSING_SOONEST

@gabrielfior if we add many more, then refactoring to encapsulate some of these in classes (e.g. MarketPickingStrategy) makes more sense.