I’ve been on a bit of a economics kick lately, but it’s time to get back to the real purpose of this blog, which is teaching profitable trading. A big part of that is passing on “lessons learned” – mistakes which cost me money and which you hopefully can avoid thanks to me highlighting them. One of those mistakes resulted from what I’ve termed “phasing”.
Phasing is an issue that arises during trading system development and test. Many trading systems fundamentally consists of three rules:
- An entry rule of the form ‘when [some sequence of events] happens, I enter a [long|short] position by means of a [market|limit] order’
- A profit taking rule, often in the form of a limit order, a trailing stop, or a time based exit.
- A loss mitigation rule, often in the form of a stop loss order
Problems arise when the conditions which produce an entry signal occur wile a position is already on. This new entry signal could be in the same direction as the previous trade, or in the opposite direction. The question, then, is what to do with this extra signal. Do you ignore it? If it’s in the same direction as the existing position, do you double the size of your position? If so do you track one set of exit criteria or 2? If it’s in the opposite direction do you close your position or reverse it?
Regardless of which behavior you choose, something odd happens – the trades you end up taking are heavily dependent on when you start trading. For example, say you decide “once I’m in a position, I’ll ignore all additional entrance signals” as a policy. That seems sensible. Then you get the following signals:
- enter long at 1:00 PM
- <long position doesn’t exit>
- enter short at 1:23PM
Now, if you started trading before 1:00 you would end up being long. But if you started trading between 1:00 and 1:23 you would end up being short. Your eventual results would be totally dependent on when you started trading. This odd dependence on starting time and subsequent huge swings in results is the phenomenon I’ve termed “phasing”.
This may not seem like that big a deal, but in my experience it is for several reasons:
- Phasing, by virtue of changing the results of multiple trades, can have a huge effect on either test or real-world results. Frequently more than enough to change a winning strategy into a losing one or vice versa.
- Phasing is psychologically painful. When you loose money because of something so obscure, it’s unpleasant.
- Phasing has odd interactions with risk and margin. The rule with the least odd interactions is simply to take all signals, even if that means doubling (or more) your position. But this could easily violate account margin requirements, preventing you from implementing the policy at least in some cases.
- Phasing can get worse when trading multiple instruments. Having a position on in one instrument can create a situation where you don’t want to take a position in another instrument due to risk limits or margin requirements. These inter-instrument interactions are very difficult to capture in back-testing.
OK, so it’s a problem. How do you deal with it? Nothing you can do will eliminate phasing, but you can mitigate the problems. Here’s my checklist of things to do:
- When designing a trading strategy, determine how phasing will be dealt with as part of the strategy.
- This should include an explicit rule about when you will start (and stop) trading.
- If your strategy is going to be applied to multiple instruments, seriously consider allocating them separate capital instead of using one pool. This will help separate risk and margin issues.
- Be very suspicious of strategies that are sensitive to phasing rules – ie. ones that appear to be highly profitable with one set of rules, but unprofitable with another. That’s a good sign a strategy is not robust and could easily stop working on you.
- When testing a strategy, if it frequently encounters phasing I would double the sample size for the back and forward test. The reason is that trades “grouped” during phasing are frequently highly correlated in terms of outcome, and therefore don’t really count as independent samples for the purposes of achieving statistical confidence about your strategy.
Hope that helps you avoid some mistakes I made.