Add a sports (live tennis) domain adapter + specialist, mirroring weather - #20
Open
bensynapse wants to merge 1 commit into
Open
Add a sports (live tennis) domain adapter + specialist, mirroring weather#20bensynapse wants to merge 1 commit into
bensynapse wants to merge 1 commit into
Conversation
Adds a `sports` domain sibling to finance/weather/politics, following the existing domain plugin pattern: - autopredict/ingestion/sports: normalize live tennis match state into the shared IngestionBatch shape, with a deterministic feature builder and a local break-point derivation (receiver at AD, or 40 vs server 0/15/30; never in a tiebreak). - autopredict/domains/sports: SportsDomainAdapter + TennisSpecialistStrategy, defaulting to the production-safe market-implied no-edge model so a packaged example never fabricates alpha. - Wire tennis_specialist into the router (domain/category "sports") and the default strategy registry. - Tests mirroring the weather ingestion/adapter/strategy tests. - docs/STRATEGIES.md + docs/DATASETS.md entries and an observe-only examples/custom_strategy/tennis_agent.py walkthrough. The match-state features are supplied by the Live Tennis API (https://livetennisapi.com), a live-tennis DATA provider — this is a data input to a strategy that trades tennis event markets on the existing venue clients, not a market or execution venue. Vendor-authored; judge accordingly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a
sportsdomain as a sibling tofinance/weather/politics, following the existing domain plugin pattern exactly:autopredict/ingestion/sports/— normalizes live tennis match state into the sharedIngestionBatchshape (normalize_match_states), with a deterministicbuild_sports_featuresand a localderive_break_point(receiver atAD, or40vs server0/15/30; never in a tiebreak; false when server/points are unknown).build_match_state_rowmaps a rawGET /matches?status=liveitem into the row shape.autopredict/domains/sports/—SportsDomainAdapter(mirrorsweather/adapter.py) +TennisSpecialistStrategy(mirrorsweather/strategy.py), defaulting toMarketImpliedNoEdgeModelviabuild_default_sports_model(mirrorsweather/model.py).tennis_specialistintodomains/router.py(domain/category==sports, andMarketCategory.SPORTSalready exists) and intocreate_default_registry().test_ingestion_weather.py/test_domain_adapters.py/test_domain_strategies.py(tests/test_ingestion_sports.py,tests/test_domain_sports.py, plussports_match_state_rowsintests/domain_rows.py).docs/STRATEGIES.md+docs/DATASETS.mdentries and an observe-onlyexamples/custom_strategy/tennis_agent.py(+run_tennis.py, README section).Why it respects the repo's philosophy
The default sports model is the market-implied no-edge model, exactly like the other specialists — so it returns the venue's own probability and HOLDs rather than inventing alpha. The example is observe-only: it prints the neutral forecast and a
HOLDand places no orders. This mirrors your "conservative by design / no synthetic alpha" default; a verified model is required to trade.Data source and disclosure
The match-state features come from the Live Tennis API (https://livetennisapi.com). I run the Live Tennis API, so this is vendor-authored — judge accordingly. It is a live-tennis data provider, not a market or execution venue: this contributes a data input for a strategy trading tennis event markets on your existing venue client, and it ships no proven fair-value model (hence the neutral default).
Endpoints used (all documented in
docs/DATASETS.md):GET /matches?status=live— FREE: live score, current server,status/event_status(retirement/walkover).GET /matches/{matchId}/score— FREE snapshot;win_probability_p1is ULTRA-only and staysNoneon lower tiers (never fabricated).Checks
pytest— 463 passed (8 new).black --check— clean on all touched files.mypy— the newautopredict/domains/sports+autopredict/ingestion/sportsare clean; the 14 pre-existing errors onmainare unchanged (the routerno-any-returnpattern already applies to every specialist branch).Vendor-authored, one-time contribution — no obligation to merge; feedback welcome.