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

Is there a volume filling limit feature #463

Open
vabhykg opened this issue Dec 7, 2024 · 0 comments
Open

Is there a volume filling limit feature #463

vabhykg opened this issue Dec 7, 2024 · 0 comments

Comments

@vabhykg
Copy link

vabhykg commented Dec 7, 2024

Suppose we plan to buy a small cap stock and our order size is pretty large, we can only buy up to 10% of the daily trading volume of that stock in order to reduce the impact cost, i.e. the maximum percent of historical volume that can fill in each daily bar is 10%.

For example, if one day we place an order to buy 200 shares of stock A, and the total trading volume of this stock is only 1000 shares on that day, we can only buy 100 shares on that day, resulting in 100 shares not being bought yet.

This feature has been implemented in Zipline and Backtrader, but it seems that there is no similar feature in bt yet.

In Zipline
https://zipline.ml4trading.io/_modules/zipline/finance/slippage.html#VolumeShareSlippage
In Backtrader
https://www.backtrader.com/blog/posts/2016-07-14-volume-filling/volume-filling/

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

1 participant