I have a multi series Strategy that trades the 5 main equity e-mini equity indexes. Each have their own Data Series. I am trying to code a Risk Management implementation that requires to know the Unrealized PnL of all 5 collectively. I don’t care about the individual PnL of each series, I want to know the collective PnL of all 5.
I tried to call each Position's GetUnrealizedProfitLoss method in the same BarsInProgress but only one of the series had a valid PnL amount. I need to collectively gather this information to make Risk Management decisions for the Strategy as a whole.
- I need to access the collective PnL in my historical testing, since it is part of my Risk Management and this needs to be backtested.
- I need to manage the PnL as a whole during historical and real time in a single BarsInProgress.
Any best practice how to do this?
Comment