#777 Add event_type_ids market filter for simulation - #857
Open
niallsemple wants to merge 1 commit into
Open
Conversation
HistoricListener now accepts event_type_ids (e.g. ["7"] for horse racing) and FlumineMarketStream excludes non-matching markets from processing entirely, the simulation equivalent of the live streaming market_filter. Exclusions are remembered so subsequent updates without a marketDefinition stay filtered. Includes 5 new tests and docs.
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.
Closes #777
What
Adds
event_type_idssupport to simulation vialistener_kwargs, the equivalent of the live streamingmarket_filter:Markets whose
marketDefinition.eventTypeIddoes not match are excluded from processing entirely — no cache creation, no strategy calls, faster simulations when working with multi-sport event files.How
HistoricListeneraccepts a new optionalevent_type_idskwarg (list of ids, ints or strings)FlumineMarketStreamnormalises ids to strings (Betfair definitions use strings) and skips non-matching markets on first sight of theirmarketDefinitionmarketDefinitionstay filteredisinstancecheck so the filter only activates when a real list is passed — zero impact on existing behaviour when unsetVerification
PRO-1.170258213historical file:["7"]→ 1 market processed,["1"]→ 0 markets, no filter → 1 marketdocs/quickstart.md(listener kwargs section)