def drawdown(self): """Drawdown series.""" return self.wrap(self.to_2d_array() / nb.expanding_max_nb(self.to_2d_array()) - 1)
def drawdown(self): """Drawdown series.""" equity = self.equity.vbt.to_2d_array() return self.wrapper.wrap(equity / generic_nb.expanding_max_nb(equity) - 1)