Hi Jenny,
To add additional data to the equity value, so we can plot the equity after the 2/20 fees are applied, or to create a separate chart altogether, I suggest trying out our Plotting mechanism (to plot on the Equity chart itself, use self.Plot(‘series name’, value), and for a separate chart, use self.Plot(‘chart name’, ‘series name’, value) ). However, in the code of the attached backtest, the 2/20 fees will be baked into the main Equity curve itself.
I am unsure about how you would like to calculate the 2/20 fees, but two values that I think that may be useful are self.Portfolio.TotalProfit and self.Portfolio.TotalHoldingsValue. To see more values related to the portfolio, see our documentation here. Nonetheless, I will show one way to compute the 2/20 fees in the attached backtest, and I'll also set the trading fees to 0.
Addressing how to do this computation yearly on the other post, we can use Scheduled Events. We can keep track of the number of months have passed, and execute our function every 12 months, or alternatively, check if the current month is December, and this can also be seen in the attached backtest.
Best,
Shile Wen