How to improve your trading through P&L analysis

We learn from our mistakes. Or in many cases, we just keep on repeating them, by having a selective memory. Or we might remember our mistakes, and just blame someone or something else, when perhaps we are the ones most to blame. Obviously, in a scenario like we’re currently living in, it’s one of those occasions where it really is an external shock. People have lost their jobs because of no fault of their own. The same cannot be said on a governments, where different responses have resulted in very different outcomes in different countries when it comes to the coronavirus.

 

If we think about financial markets, and at traders, it can be tempting to repeat the same mistake. In other words, for a trader to attribute success to themselves, and failures to the market. This is another example of selective memory! We can actually learn a lot if we study our trading history carefully. Pretty much throughout my whole clear I’ve been focused on systematic trading. Whenever I’ve traded my own money (or the bank’s capital has been used), I’ve traded systematic models or been a very passive long only investor. It isn’t necessary easier, but systematic trading suits me better, and I can also draw on my experience.

 

However, I’ve always liked to follow the market mainly to get ideas for systematic trading rules but also to come up with my own discretionary views. In practice, though I haven’t traded real money on a discretionary basis often, given I think I can do better doing it systematically.

 

In recent weeks, I’ve been doing some paper discretionary trading (yes, I know no skin in the game, which would have probably impacted my thought process). At the same time, I’ve also tried to analyse my performance. OK, it’s a just a small sample, but still, the performance hasn’t been great, and I’d have done a lot better trading some of my systematic strategies! However, I’ve learnt a lot from the exercise and realised that a lot of the ways I might approach systematic trading can be incredibly useful for discretionary trading too. Here are some of the things I’ve learnt below from the exercise. If you do the same exercise on your trades, I’m sure you’ll likely learn something different.

 

Have a plan
The whole point of systematic trading is that it gives you a plan for what to do when you receive new data (whether that market data or anything else). It can help remove the emotion from decision making (we can’t totally remove this, given we can always choose to turn off the model). When it comes to discretionary trading we can still have a plan for what we’ll do. We might have certain technical levels, that we’re watching or formulate certain fundamental views beforehand (and it helps to write all these down, maybe in a trading diary, perhaps in spreadsheet).

 

Essentially, we are creating a checklist to be satisfied for putting on a trade, which needs to be satisfied to strip out as much emotion as we can from a decision. It will also help to keep a brief note of your thought process behind every trade in the spreadsheet, eg. is this a day trade or is it a longer term structural view.

 

P&L trade analysis
If you’re trading systematically, you have a backtest and hence the historical performance of your strategy. You can look at the distribution of that versus your live performance to understand if something doesn’t look right and I’ve found this useful in the past.

 

However, if we are discretionary traders, we can also look at our historical P&L in a systematic way to work out what has worked and what hasn’t worked, to learn from our mistakes (and what went right):

 

  • Calculate metrics like average return per trade, hit ratio, by asset etc.
  • Find the price of an asset before we entered a trade in the days before (were we fading the price or going with the trend?)
  • Find the price of an asset after we exited a trade in the days after (did the price continue to go in the right or wrong direction after exited?)
  • We can breakdown our analysis, dependent on variable like
    • the direction of the P&L of the trade (was it profitable or loss making)
    • were we fading the price beforehand or going with the trend?
    • the asset being traded
    • what was the motivation for the trade

 

This can help us answer questions like…

 

  • Which of your trades are more profitable, ones with fade price action or those that go with it? (admittedly this is regime dependent, so ideally, you want a long sample of historical trades)
  • Are your stops in the right place (and what happens after we hit them)?
  • Were you in the wrong side to begin with?
  • And much more!
  • Obviously, if we have a very small trade history it makes it difficult to subdivide the trade data or do much with the data at all

 

What I found with my paper trades?
Some observations I found looking at my paper trades were pretty common, but you might well find very different observations when you look at your trades:

 

  • Most of trades were fading price action, with a smaller number going with the trend
  • When I started to have a plan for trades, eg. watching specific levels and sticking to them, P&L improved and the direction was generally right. It would have been even better if I was more disciplined and had alerts on Bloomberg to send pop-ups when those levels were hit!
  • When I entered trades without a prior plan, with what I would call “gut” overreaction to price action, they were mostly loss making. Indeed, fading these trades would have been profitable. The P&L was skewed to large losses and small gains, which is a pretty typical mistake, letting losses run and taking profit too quickly
  • Generally speaking the stops were way too far away and would have benefited from being closer, as the price generally continued to go in the wrong direction (or maybe I could have used the stops as a way of flipping the trade direction??)

 

Transaction cost analysis and its relationship with P&L trade analysis
I’ve spent several years developing tcapy, a transaction cost analysis Python library (free download from GitHub). TCA is basically about understanding the costs of your execution (not about whether you made the correct underlying trading signal).

 

In practice, we can do a lot of P&L trade analysis using a tool like tcapy and the metrics it uses such as market impact. The key difference however is the time horizon of P&L trade analysis might be a lot longer than purely TCA for execution purposes. We can easily change these parameters in tcapy, to do P&L trade analysis, as opposed to short term analysis of our execution. It also does nice plots for us to aggregate any results.

 

Conclusion
Will I suddenly become a discretionary trader, and ditch systematic trading strategies after all these years? I doubt it, as I enjoy developing systematic trading models, and I’ve now got a lot of experience in the area. I also like all the statistics and coding in Python which are involved in developing  systematic strategies. It also personally suits me (this doesn’t mean it’ll suit everyone!) and importantly I’ve generally been profitable trading systematically. Indeed, it’s been helpful whenever I’ve run systematic strategies to have the P&L of a long backtest.

 

However, I do think been it’s nevertheless been a worthwhile exercise to do discretionary trading on paper, and in particular to do P&L trade analysis in a relatively systematic way. Whichever method you use to trade, taking a look at your historical P&L is a good idea, to convert a bunch of trades into a way to learn from your mistakes.