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

[WIP] Support multiple instruments(symbols) backtest #639

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

robert1003
Copy link

An incomplete attempt to add multiple-symbol backtest, which is mentioned in #20. Not sure if this fits the current structure.

Lots of necessary changes haven't been done yet, including docs and code related graphing part.

@robert1003
Copy link
Author

robert1003 commented May 9, 2022

How do you think @kernc? If you think it is inappropriate I will withdraw it, thanks.

@AgarwalPragy
Copy link

It looks like the current attempt is not backwards compatible. For example, the signature of Strategy.position has changed from Position to dict[str, Position]. 😞

Maybe we can include a flag which enables multi-symbol mode and return Union[Position, dict[str, Position]] based on whether the mode is enabled or not?

@AgarwalPragy
Copy link

There is also something wrong with Broker.last_price and other functions.

@AgarwalPragy
Copy link

I've made a parallel attempt here #641

@luketych
Copy link

luketych commented Aug 2, 2022

How is this coming along?

@kernc kernc force-pushed the master branch 9 times, most recently from 60eff81 to 109c352 Compare November 28, 2022 22:33
@PabloCanovas
Copy link

PabloCanovas commented Mar 24, 2024

Not related in anyway with him but @dodid did an awesome job extending this backtesting.py library to his minitrade package which enables multiasset backtesting, check it out: https://github.com/dodid/minitrade

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.

None yet

4 participants