Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conflate calls to process_market_book when backtesting #508

Open
jsphon opened this issue Oct 4, 2021 · 1 comment
Open

conflate calls to process_market_book when backtesting #508

jsphon opened this issue Oct 4, 2021 · 1 comment

Comments

@jsphon
Copy link
Contributor

jsphon commented Oct 4, 2021

Suppose I am running a backtest using my own recorded data. If I only want to allow it to call process_market_book once a second, how could we refactor Flumine to allow this?

This might not be so straightforward if we need to conflate multiple streaming updates into one.

@liampauling
Copy link
Member

I imagine it would work like this:

strategy = LowestLayer(
    market_filter={"markets": markets, "listener_kwargs": {"inplay": True, "conflate": 1000}},
)

We would need to process everything other than the actual strategy.check_market and strategy.process_market_book so that the middleware / order placement can be processed. So maybe add some extra logic to strategy.check_market, would just need to get the conflate value in there and a quick check on last 'processing'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants