kernc / backtesting.py

:mag_right: :chart_with_upwards_trend: :snake: :moneybag: Backtest trading strategies in Python.
https://kernc.github.io/backtesting.py/
GNU Affero General Public License v3.0
5.6k stars 1.08k forks source link

Support for backtesting multi-assets strategy #1120

Open sgc109 opened 9 months ago

sgc109 commented 9 months ago

Expected Behavior

I want to backtest asset allocation strategies consisting of multiple assets such as HAA, VAA, BAA, ...

Actual Behavior

I seems like only supports backtesting individual asset at a time.

Steps to Reproduce

Additional info

BradKML commented 6 months ago

I wonder what kind of multi-asset strategies are out there? Other than that please also check https://github.com/kernc/backtesting.py/issues/1105

s-kust commented 3 months ago

You may want to take a look at https://github.com/s-kust/python-backtesting-template/

You can easily run backtests of your strategy for several (or several dozen) tickers simultaneously. The results of these backtests are combined and saved in the output.xlsx file.

BradKML commented 3 months ago

@s-kust what about asset pair juggling, are there ways around it?

s-kust commented 3 months ago

are there ways around it?

Not yet