Vectorised Backtesting is a compact, execution aware backtesting and portfolio optimisation toolkit for systematic strategies, spanning single asset positions, multi asset weights, trade and cash accounting, and constrained optimisation.
Core capabilities:
- single asset positions backtesting
- multi asset weights backtesting
- cash and share accounting backtesting
- optimiser tools
pip install -e .Requires numpy and pandas. Optional constrained optimisation:
pip install "vectorised-backtesting[optim]"from vectorised_backtesting import backtest_weightsresult = backtest_weights(prices, target_weights, lag=1)See DOCS.md for the full reference and design notes.
See examples/examples.ipynb for the examples notebook.
Run tests:
pytest