Closed ironhak closed 1 month ago
Solved like this:
class Test(Strategy):
equity_ = pd.DataFrame()
def init(self):
def next(self):
self.equity_.loc[len(self.data), 'Date'] = self.data.index[-1]
self.equity_.loc[len(self.data), 'Equity'] = self.equity
bt = Backtest(df,DonchainBreakout,cash=10_000)
stats = bt.run()
equity_df = bt._strategy.equity_
This only return a dataframe with the list of trades taken, I would like to have a dataframe with equity and balance for every point in time of my original time series data.
How can I do this???