Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

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

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

Conversation

Copy link

@robert1003 robert1003 commented May 8, 2022
edited by kernc
Loading

Fixes #20

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.

Copy link
Author

robert1003 commented May 9, 2022
edited
Loading

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

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?

Copy link

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

Copy link

I've made a parallel attempt here #641

Copy link

luketych commented Aug 2, 2022

How is this coming along?

i3130002 reacted with thumbs up emoji

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

PabloCanovas commented Mar 24, 2024
edited
Loading

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
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Backtest multiple instruments at once

AltStyle によって変換されたページ (->オリジナル) /