backtesting.py icon indicating copy to clipboard operation
backtesting.py copied to clipboard

:mag_right: :chart_with_upwards_trend: :snake: :moneybag: Backtest trading strategies in Python.

Results 231 backtesting.py issues
Sort by recently updated
recently updated
newest added

> FutureWarning: Passing method to Int64Index.getloc > Use index.get_indexer([item], method=...) instead. fix #706

### Expected Behavior able to turn off progress bar in optimization, or only display the current bar with an option similar to tqdm disable ### Actual Behavior progress bar appear...

Hi, I need to backtest 5minute dataset for intraday strategy, but library holding the trade, till exit order signal, but i need to exit within a day if any order...

Anyone know if its possible to make this backtesting.py work with Crypto contract prices, and then somehow incorporate leverage/margin, and even liquidation price. Thanks

### Expected Behavior I'm backtesting something that optimizes EMA for x period, then applies that optimal EMA as the strategy for the next x period. Somehow, this creates mathematically inconsistent...

why Sharpe ratio is zero in case of negative return?

bug

Sorry if I missed it in the documentation, but how one plots the trade events (long or short)? It's hard to understand from the candlestick chart when exactly the position...

Added option to leave trades open at the end of a backtest. Allows users to check if they have open trades at the end of a backtest as an easy...

As long as I set a lot of data, it will take a long time to execute the program, but I see that the system resources are not occupied to...

It is possible to split the run() function into two distinct functions, allowing for a single-step iteration on the ticks: - initialize(): Saves the data and the strategy into a...