Alexandre Catarino, Please see the attached backtest. I just simplified this algo. Short 'SPY' for 5 days and no covering it, which means that we only see market value of our holding position and unrealized pnl. As you can see in the backtest, we see the ending value of equity, 103,937. I need to get this value from each stocks holding. However, if we use 'HoldingsValue' or 'AbsoluteHoldingsValue' as below, we cannot get the ending value of 103,937. Instead, we get -97,397.03 or 97,397.03.
2016-01-04 09:45:00 SPY_HoldVal : -99876.83
2016-01-04 09:45:00 SPY_AbsHoldVal : 99876.83
2016-01-04 09:45:00 SPY_pnl : -2.59
2016-01-05 09:45:00 SPY_HoldVal : -100826.75
2016-01-05 09:45:00 SPY_AbsHoldVal : 100826.75
2016-01-05 09:45:00 SPY_pnl : -952.51
2016-01-06 09:45:00 SPY_HoldVal : -99471.86
2016-01-06 09:45:00 SPY_AbsHoldVal : 99471.86
2016-01-06 09:45:00 SPY_pnl : 402.38
2016-01-07 09:45:00 SPY_HoldVal : -97974.48
2016-01-07 09:45:00 SPY_AbsHoldVal : 97974.48
2016-01-07 09:45:00 SPY_pnl : 1899.75
2016-01-08 09:45:00 SPY_HoldVal : -97397.03
2016-01-08 09:45:00 SPY_AbsHoldVal : 97397.03
2016-01-08 09:45:00 SPY_pnl : 2477.21
What I want is the rolling equity value of each stock in open position, which is just like the equity value of each bar in the backtest screen. Do I need some calculation method to get this value especially for shorted stocks (e.g. initial value + pnl1 + pnl2 + ...) ? Thanks :)