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

Can backtesting.py be used to back test a long only strategy which switches between different equities #60

Closed
tridgeway176 opened this issue May 2, 2020 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@tridgeway176
Copy link

Expected Behavior

From a basket of equities the strategy buys the equity at 100% with best momentum.
If the equity with best momentum changes the previously equity is sold and fully invested in the equity with best momentum.

@kernc
Copy link
Owner

kernc commented May 2, 2020

No. Unfortunately, backtesting.py only supports testing on a single equity at a time. For your use case, maybe try bt and its bt.algos.SelectMomentum.

@kernc kernc added the question Not a bug, but a FAQ entry label May 2, 2020
@kernc
Copy link
Owner

kernc commented Jul 15, 2020

Duplicate of issue #20.

@kernc kernc closed this as completed Jul 15, 2020
@kernc kernc added the duplicate This issue or pull request already exists label Jul 15, 2020
@kernc kernc removed the question Not a bug, but a FAQ entry label Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants