Difference between P&L on Console and in Trading Report
Good morning.
I'm getting different values for the Total MTM PL reported on the console at the end of running the script, and the same value reported in the downloaded Trading Report. The figure is usually lower in the Trading Report.
Should these numbers be different, and if so, which is the most reliable?
Thanks,
Antony
Tagged:
Comments
Good evening (from Czechia), Antony!
What is your
self.useTradeFileForPnL
setting?Is it
self.useTradeFileForPnL = kwargs.get('useTradeFileForPnL',False)
, orself.useTradeFileForPnL = kwargs.get('useTradeFileForPnL', True)
?Thanks! I've hunted high and low, and I just can't find this referenced anywhere. Could you point me to where it is in the documentation, please?
Many thanks,
Antony
I have not found it in the documentation. Based on what you write, you've not played with the code, so your setting should be the default
self.useTradeFileForPnL = kwargs.get('useTradeFileForPnL',False)
.To shed some light on this code snippet: this line defines how your P/L is calculated→ it is just a part of source code which tells the computer how to generate your reports; the full code can be found in your zipped file:
your directory/Report - name.zip/name/python_notebooks
, as well as in report's HTML file by clicking Click here to toggle on/off the raw code.Now the way in which the Total Profit is calculated, is defined by this method ↓
, which callsMaybe KTG's CIO will know more about it, if he finds the time to answer @shayne
Thanks. Very useful to learn how to use that tool.