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

Fix and Refine TradeTickDataWrangler.process_bar_data #1586

Merged
merged 2 commits into from
Apr 11, 2024

Conversation

rsmb7z
Copy link
Collaborator

@rsmb7z rsmb7z commented Apr 10, 2024

Pull Request

Followup on previous PR to fix call to _create_side_if_not_exist.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

@rsmb7z rsmb7z marked this pull request as draft April 11, 2024 08:24
@rsmb7z rsmb7z marked this pull request as ready for review April 11, 2024 10:28
@cjdsellers
Copy link
Member

cjdsellers commented Apr 11, 2024

Something we could consider is adding default_volume: float = 1_000_000.0 similar to the quote tick wrangler. Often trades can be for a small size which doesn't represent the liquidity which may be available nearly immediately after the effect of the trade.

Alternatively, we could improve the fill dynamics in the order book to slip to the next price level if top-of-book size is exceeded?

Having said that we do have this already for aggressive orders:
https://github.com/nautechsystems/nautilus_trader/blob/develop/nautilus_trader/backtest/matching_engine.pyx#L1705

@cjdsellers cjdsellers merged commit c267d30 into nautechsystems:develop Apr 11, 2024
9 checks passed
@rsmb7z
Copy link
Collaborator Author

rsmb7z commented Apr 11, 2024

Alternatively, we could improve the fill dynamics in the order book to slip to the next price level if top-of-book size is exceeded?

I think something using config flag etc for the MatchingEngine would be more appropriate to ignore or relax the liquidity conditions for backtesting purpose so this way original volume is not lost and still accessible within Strategy.
Someone still wanting to use custom volume can modify in the input dataframe for TradeTickDataWrangler. The case for QuoteTickDataWrangler is bit different because there volume is not always available.

@rsmb7z rsmb7z deleted the pr_240410 branch April 11, 2024 11:16
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

Successfully merging this pull request may close these issues.

2 participants