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

### Discussed in https://github.com/kernc/backtesting.py/discussions/486 Originally posted by **AetherTL** September 30, 2021 ![截屏2021-09-30 上午10 17 05](https://user-images.githubusercontent.com/23423871/135375065-9a751eec-5a42-4bd7-afba-72391b28b05e.png) The entry size plot shows a short signal was received at around March 1987, but...

bug

### Expected Behavior Start with $1000 Buy $100 of stock self._broker._cash should be $900. Sell $150 of stock self._broker._cash should be $1050 ### Actual Behavior Start with $1000 Buy $100...

enhancement

### Expected Behavior Optimizing and adding new indicators Is hard and dosnt sense! For example whats that "I": ``` Self.I(...) ``` Why we need it I want to use ta-lib...

Hey, I feel this might not be a bug but rather a lack of knowledge of usage. Maybe I miss some point. Now, I already saw a quite few times...

Is it possible to back test stock options? I have some simple strategies based on the underlying stock price that I'd like to back test. Thanks.

enhancement
API

So currently the Library can only support a single instrument. I would like to extend it for pairs Trading (Two instruments) Buying one selling other. Any advice will be helpful.

enhancement
question

### Expected Behavior I passed 3 buy orders and the result shows only NAN ``` ``` ``` Start 2021-07-27 00:00:00 End 2021-07-28 08:25:00 Duration 1 days 08:25:00 Exposure Time [%]...

Im trying to backtest a pairs trading strategy but i don't know how to add multiple data frames to the backtester in order to add positions to each instruments according...

enhancement
API

Currently position is long and there's buy trade in queue: ``` ``` Now a sell signal is triggerred, and a sell order is placed, however, the order is removed/cancelled in...

bug

### Expected Behavior We should have a flag for the `bt.plot()` function which would show the cash amount at our broker. E.g.: `bt.plot(plot_broker_cash=True)` Also, given this feature it would be...

enhancement