Skip to content

Understanding P&L and Risk

Let’s imagine you’re a commodities trader.

Every day you arrive at your desk and look at your Risk and P&L reports, telling you the value and risk of your trading positions.

Whenever something in those reports doesn’t look quite like what you were expecting you have to do some counterfactual exploration of all the various inputs to understand what’s happened.

For example, let’s assume that over the course of the day your colleagues have made the following trades:

2024-04-01
Run
Open in xt-fiddle

At the end of the day, the market closes with the following prices:

2024-04-01
Run
Open in xt-fiddle

Now we want to price our risk and P&L for the end of this week. Let’s extract the information we need to calculate our P&L:

Run
Open in xt-fiddle

For the purposes of this simple example, we’ll just use SQL to calculate the P&L. However, in the ‘real world’, we’d usually have much more complex objects (yield curves, etc.) and would use a quant pricing library.

Run
Open in xt-fiddle

So far so good.

On the Monday morning, after a pleasant weekend’s break, you come back into the trading floor.

2024-04-01
Run
Open in xt-fiddle

At the end of this Monday trading day, the market closes with the following prices:

2024-04-01
Run
Open in xt-fiddle

We now recalculate our new P&L:

Run
Open in xt-fiddle

Oh no!

What if we could ignore the today’s trades, and just see what our closing position on Friday would have looked like in the market at the end of today.

Open in xt-fiddle

We have now established that today’s trades must be causing the dramatic P&L change.