backtesting.py
backtesting.py copied to clipboard
:mag_right: :chart_with_upwards_trend: :snake: :moneybag: Backtest trading strategies in Python.
### Discussed in https://github.com/kernc/backtesting.py/discussions/486 Originally posted by **AetherTL** September 30, 2021  The entry size plot shows a short signal was received at around March 1987, but...
### 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...
### 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.
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.
### 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...
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...
### 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...