kernc
kernc
Ah, pairs arbitrage. :sweat_smile: I don't know how multiple instruments fit into the existing API. I'd foremost like to keep it simple and straightforward for the 95% use case. If...
Not even decided. Its API implications not even discussed.
The commission is already accounted for with spread at trade entry. If we're just selling (buying) some units we already have (owe), we should not be checking available cash.
> I understand that there is a commission when we enter a trade (e.g. buy a stock), but we should also pay a commission when we are selling. At elast...
Can you maybe share the first 50 minutes of said data to investigate?
This looks like a duplicate/related to issue https://github.com/kernc/backtesting.py/issues/53. Can you give an example (code) of some decision/analysis done upon orders/trades with such an id? I'm definitely more for the arbitrarily-typed...
This was overhauled in #47 (released in 0.2.0), rendering this issue obsolete. The new way to access individual trades data is: ```py stats = bt.run() stats._equity_curve # equity/drawdown data stats._trades...
@bscully27 You could always continue to log orders yourself: :grin: ```py class MyStrategy(Strategy): def init(self): self.orders_log = [] ... def buy(self, *args, **kwargs): super().buy(*args, **kwargs) self.orders_log.append(self.orders[-1]) def next(self): ... self.buy(...)...
There's some new related discussion in https://github.com/kernc/backtesting.py/issues/197.
And simply looking at [`trade.pl`](https://kernc.github.io/backtesting.py/doc/backtesting/backtesting.html#backtesting.backtesting.Trade.pl) (or `stats['_trades']['PnL']`) is not an option since you're adjusting SL/TP levels mid-way?