Can you access equity mid-run/optimise and use it conditionally? #637
Answered
by
KitHaywood
KitHaywood
asked this question in
Q&A
-
I am building a custom Strategy and was wondering if it was possible to access current 'equity' of your position/portfolio mid backtest - so within a conditional statement during Can I access it like an array like you can with an indicator e.g.? Do I need to instantiate it in self._equity.loc[-1] Is a if ( ( self.broker._equity.loc[0] - self.broker._equity.loc[-1] ) / self.broker._equity.loc[0] ) > 0.05:
... What is the best way to go about finding your incremental % change in equity - so % change in equity on last? Thanks |
Beta Was this translation helpful? Give feedback.
Answered by
KitHaywood
May 5, 2022
Replies: 1 comment
-
Never mind - problem solved. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
KitHaywood
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Never mind - problem solved.