For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See:

Help with value (daily pnl), shortcash parameter and negative prices (spreads)

  • Hi,

    I am calculating the daily pnl (I understand this may be unrealised) based on the difference of value. In general this was working fine independent of whether setting shortcash to true or not. However, when started using spreads that can have negative value, it seems this works correctly only when setting shortcash to true. Is there some reason for this or should I calculate daily pnl in a different way?

    I am using version in case that is relevant.

    Many thanks

  • administrators

    You have diagnosed it down to the negative prices. Use positive prices (there is for sure some strange market where the spread can be negative ... but not here)

Log in to reply