Closed evangriffiths closed 3 weeks ago
The changes in this pull request involve significant updates to the prediction_market_agent_tooling
codebase, particularly in handling market trading intervals. A new module trade_interval.py
is introduced, which defines an abstract class TradeInterval
and its implementations, FixedInterval
and MarketLifetimeProportionalInterval
. The agent.py
file is modified to replace the same_market_bet_interval
variable with same_market_trade_interval
, which now utilizes the new interval classes. Additionally, unit tests for the new interval classes are added in test_trade_interval.py
.
File | Change Summary |
---|---|
prediction_market_agent_tooling/deploy/agent.py |
- Replaced same_market_bet_interval with same_market_trade_interval of type TradeInterval . - Updated verify_market method to use the new interval. - Made same_market_trade_interval a public class attribute. |
prediction_market_agent_tooling/deploy/trade_interval.py |
- Added classes: TradeInterval , FixedInterval , MarketLifetimeProportionalInterval . - Implemented get method in each class for calculating trade intervals. |
prediction_market_agent_tooling/markets/agent_market.py |
- Added import statement for timedelta from datetime . No other changes made. |
tests/test_trade_interval.py |
- Introduced unit tests for FixedInterval and MarketLifetimeProportionalInterval . - Added fixture mock_market and two test functions. |
verify_market
method in the DeployableTraderAgent
class, related to market verification logic.process_market
method in the DeployableTraderAgent
, relevant to market verification logic.DeployableTraderAgent
, related to trade intervals and market verification.Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
DeployablePredictionAgent.same_market_trade_interval
is now an instance of a subclass ofTradeInterval
. Can define fixed intervals (default behaviour unchanged from before), or dynamic intervals based on market length.This is another feature that is required for us to be able to scale the number of markets an agent can look at in a single run - in this case so that it doesn't bet too frequently on long-running markets.