Perry Kaufman: Interview with an Industry Leader and Expert Algorithmic Trader
Perry J. Kaufman is a financial engineer, well-known for developing algorithmic strategies for the global equity and futures markets. Beginning as a “rocket scientist” in the Aerospace Industry, where he worked on the navigation and control systems for Gemini, Mr. Kaufman has applied his broad knowledge and experience in computers and technology to trading methods and risk analysis for institutional and commercial applications.
His expertise includes a wide range of applications, including short-term trading in cash and futures markets, market neutral strategies in equities and futures, Forex carry, portfolio risk management, leverage overlays, and mutual fund timing. In addition to the development of unique price theories, the research process itself has resulted in closing the gap between theoretical and actual results, a necessary step in yielding robust trading models.
Perry discussed a variety of topics with us including how to account for price shocks in your backtests, the truth about diversification, advice for algorithmic traders, and much more. Be sure to check out some of his bestselling books A Guide to Creating a Successful Algorithmic Trading Strategy, and Trading Systems and Methods, 5th Edition. You can also find more information on Perry at his popular Algorithmic Investment Strategies website: http://kaufmansignals.com/.
Kurt: Take us back to the beginning and what your first experience in trading was like.
Perry: My first experience in trading was interesting. It was quite a while ago, probably before you were born. At the very beginning, say 1971, I started programming trading systems. Our first client was interested in technical analysis and he paid for the development of the system. The deal was that he would pay 50% of the profits that we made above what he made in his own trading.
By way of background, we used exponential moving averages because I came out of aerospace and that’s what we used to determine the trajectory of missiles. When we had nothing important to do, we would also use them on stock prices. And they worked very well in the 70s, but the market is a lot noisier now. In the 70’s you could use a 10-day moving average and make a lot of money.
We developed this generalized futures system but, of course, in 1970 there were no financial markets, there was no gold – it was all agriculture – but we did very well. The problem was that the investor that we were competing against had exactly the same returns, so we didn’t get the bonus we were hoping for. What we did then was to take that system and start managing money. That turned out to be the silver lining. It was a good system, even though by today’s standards it would be an ordinary trend-following method. So that was my first experience. I’m a mathematician, so everything I do is algorithmic except for a little day trading that I do in stocks here and there. But all the systems that we publish and use for clients are fully algorithmic.
Kurt: Did you start with the systematic approach or did you start with discretionary trading?
Perry: I’ve tried discretionary trading from time to time, mostly day trading. I find it very tiring. You do well for a while and you’re on the right side of the market and all of a sudden nothing seems to go right. So I moved to fully systematic trading a long time ago and I haven’t been disappointed. There are so many different ways you can trade and so many different strategies — patterns and trends and counter trends and arbitrage that I never get tired of creating a new approach to the market and using those to diversify.
I never get tired of creating a new approach to the market and using those to diversify.
Kurt: I know you referenced before that one approach to diversification would be to diversify across strategies. Can you go a little bit deeper into that for us?
Perry: Let me just back up on that a bit. I’d like to discuss both diversification and over-diversification. So let’s do your question first. One of the problems that we all faced in 2008 was that no matter what you were holding everything reversed. So, if you applied your system to a wide range of both stocks and futures markets you found that it was the money that drove the market. Nothing you held offset the risk of something else. It turns out that in times of crisis there is really no benefit from market diversification.
That’s not so if you diversify your strategies, providing those strategies are conceptually different. You should also consider strategies that are not in the market all the time. Everybody knows that price shocks are unpredictable, but if your system is only in the market 20% of the time then the price shock is more likely to hit when you’re not in the market. A system that has less exposure is going to have that odd chance of not being hurt in an extreme market, a situation that I find is often ignored. The other thing I wanted to say about diversification is that most of the big advisors have so much capital they feel that they need to find more markets to trade in order to justify managing that much equity. The fact is that by adding markets that are not the best, these marginal performers tend to have more risk than reward. The net effect is that they deteriorate performance. I would suggest, instead, whether you’re trading stocks or futures, that you look to see which markets are performing well on your system. Keep track of the performance of the last 60 days, one year and two years. Then rank the stocks and the futures markets and trade only the top 10 or 20 and ignore the rest. Of course that means you’re not using all your capital, but using it badly isn’t a solution.
It turns out that in times of crisis there is really no benefit from market diversification.
Kurt: I know you mentioned that the U.S. markets have become much noisier over time. What have been some of the biggest changes in the market since you started?
Perry: This increase in noise is all because data is available instantly to everyone. It has really fostered various types of high speed trading and there seems to be more of a tendency for people to trade short term. This increase in noise interferes a little bit with the long-term trend followers because price noise in the short term causes trend followers to take a little longer to identify when a new trend is starting and when it’s ending. That means they get in later and out later. So while long-term trend following is still profitable, it’s not as profitable as it was say, in the 90s.
I find that there seem to be more people in the market with different strategies even though there’s still a large underlying long-term trend following group that must represent at least 50% of the institutional trading. I can’t tell that any of this competition has affected trend following more than just the price noise. There always seems to be a place for a new system. Even high-frequency trading doesn’t seem to interfere with the people that are doing two and three day trades. From my view, it seems to have added liquidity to the market, which makes it easier to get a good fill.
Kurt: I can certainly see how that plays a factor and makes it a bit more difficult. What markets do you believe to be the least noisy?
Perry: In stocks, I would say that Amazon tops the list. But there are lots of stocks that keep going up without much of a pullback. Some of the stocks that have just run away are incredible. It’s hard to justify trading them if you’re a value trader, but if you’re a trend follower you close your eyes and buy.
Futures are actually more interesting. Interest rates are always the markets with the least noise. The Eurodollar, short sterling, and other short term rates have the least noise because they are tied closely to the Central Bank and monetary policy in every country. If you get a little further out on the yield curve they become noisier but they also give you higher returns.
The markets with a bit more noise are the FX markets because interest rate policy, whether it’s raising or lowering rates, affects FX markets directly. Money flows to those countries that have the highest interest rate net of inflation and net of political instability. Because of that flow, currencies will have pretty good trends – not quite as long as interest rates – but very decent for trend following. Recently, of course, we’ve seen some fairly good moves in the dollar against the euro, and against the other dollar-denominated currencies.
The equity index markets also benefit from interest rates, but it’s not as direct, and it’s usually somewhat of a J curve, so it’s a bit slower to react. There are other factors, such as politics, that can confuse investors, so you can’t always count on a clear trend in the equity market. As a trend follower, you want to focus on interest rates and FX.
Kurt: When you’re looking at these markets that are a little less noisy, what criteria do you use to determine if you’re going to trade them?
Perry: I do have an underlying measure of noise in all the markets, so I’m more inclined to trade the equity index markets using mean reversion than I am trends. The S&P and the Dow and the NASDAQ make some money in the long term using a long-term trend. They make a lot more money using mean reversion. People can be fooled because this period of a bull market from 2008 to now makes it look as though the market trends. Even during this bull market there’s a lot of noise in the index markets. You really should expect that because the S&P is an average of a lot of markets that don’t relate to one another — a lot of businesses that are doing different things and have earnings and various factors that affect them differently. Therefore, the index price is going to go up and down more than it’s going to continue in one direction. If you look at the prices in the short term, they are good candidates for mean reversion. If you insist on using trend following with index markets, you’ll find that only slow trends work, and they also carry more risk.
If you look at the prices in the short term, they are good candidates for mean reversion.
Kurt: Let’s say we’re in a period of lower than average volatility. Are there certain strategies that you focus on during that period?
Perry: And that is a good question and it brings me to a different issue. Low volatility is generally the period in which most trend following profits are made. One of the problems with that is most investors don’t leverage up their investment during periods of low volatility times. It’s all about watching your risk, and most individual investors don’t do that properly. The professional managers have what’s called a “target risk,” and that target risk for a CTA or a manager is often around 12%. That represents one standard deviation of the daily returns. It means you have a 16% chance of losing 12% over the period of the returns used in the calculation.
The problem comes when the market gets quiet. You’ve targeted 12% volatility (that’s the same as risk) because you’re comfortable accepting that risk but the low volatility shows that you now have only 6% risk. You need to double your position or double your leverage. Otherwise you’re going to find that your trading is great but you’re going to make half what you wanted to make. At the end of the year you’ll find that your system did absolutely great but you were under leveraged and you only made half of what the system made.
It’s really important to manage your volatility to make sure your risk stays at the same level all the time. Now, when the market gets really volatile there’s a different scenario. Say you’re targeting 12% and volatility goes to 18%. You need to scale your leverage back down by cutting your position size. Some people think that when the market gets volatile we’re going to make a lot of money, but really what happens is you make a little bit of money and your risk goes up tremendously. So you hurt your long term performance profile by increasing your risk while reducing your returns. Remember, when I’m talking about the volatility, I mean your daily portfolio returns, not the price volatility of the market. So when your daily returns become too volatile you scale down by reducing your position size. When the volatility of your portfolio becomes too low, you raise it by adding contracts in futures or leverage in stocks. This process is called volatility stabilization.
Kurt: Definitely good insight for the traders out there struggling with volatility. Are there certain systems that you’re currently focusing on in terms of strategies, markets, time frames?
Perry: Most of our money is usually in trend following. And for us trend following means multiple trend parameters, a way of operating which may be interesting to some people. For example, many beginning traders will try to find one trend that works for the most part in either one market or a sector or the entire portfolio. If I were only using one trend speed I would try to use it for the whole portfolio. That generalization usually serves you well. A typical macrotrend trader will settle on somewhere between a 60 and a 100-day trend.
Now this may be a bit complicated to get into, but where I’m going with this is if you use only one calculation period you could do very well or you could do very badly. You’re really putting your entire investment on one system and one specific combination of parameters. I find that trend following works over a wide range of calculation periods, say from 60 days to 150 days, and it works on virtually every market — but I don’t know which one period within that range is going to be the one that works best next year. Instead of trying to pick one trend speed, I pick multiple parameters. I would suggest that an investor start with 60, 90, 120 days as their three time frames. Normally you want these choices to increase by the same percentage, which would be for example 30, 60, 120.
I actually use many speeds not just three. In one system I did for a large financial institution I used 121 different calculation periods along with multiple parameters for other rules. I do this because I’m happy to get an average result of trend following as opposed to putting all my money on one item. The average result is always smoother than selecting a single calculation period. You implement it by dividing your investment into equal parts and trading each parameter set as though it was a separate system. You end up netting the positions, so it appears as though you are scaling in and scaling out of a trend. I encourage anybody that is systematic to use multiple parameters for whatever system you’re using.
Kurt: Taking it back, when you first got started with systematic trading, what were some of the hurdles that you faced and how did you overcome them?
Perry: The biggest hurdle of course is programming the system. I’m a programmer so that wasn’t such a big hurdle. Traders that want to program now have a choice of a lot of platforms that are not so difficult and are generally user friendly. I do suggest that people do it themselves. If they don’t do it themselves, they need to have the code explained to them to be sure that what they wanted is what they’re getting. Then they need to check the calculations to be sure that the program is doing the right thing. After all, it’s our money, not the programmer’s.
When I first started, I was always careful to find errors when my system tests lost money. I wasn’t as careful when the system showed a good profit. I’ve changed. A good test can be just as wrong as a bad test, so I check everything.
The next hurdle is getting enough money to trade. I suggest that people do not borrow money to trade – it’s not a good idea. In the 1990s I knew people that wanted to day trade because NASDAQ was going straight up. They borrowed money on their house to put into their trading account and it was an ugly scenario. It seems that Bitcoin is that latest version of that problem. It’s all about risk. For people that are interested in managing money, it’s going to be a long haul and it’s harder now than it used to be. Investors are not going to give anyone money to manage unless they have a three year real track record. That means three years of good returns and low risk. Remember the “low risk” part. I would suggest traders start very small, develop your own system or find something that you believe is good. Trade as small an investment as possible in order to get used to the idea of trading and see what the risk and reward of that system is because you don’t really know until you actually trade it. Concentrate on the risk.
Grace: Earlier you mentioned multiple parameters on your trend following strategy. What methods do you use for optimizing?
Perry: That’s the point – I’m not really optimizing. I take a trend system and run through the range of parameters I think should work on the system. I mentioned before that for a trend system, 60 to 150 days should work for most markets. I believe that more than 70% of the combinations will be profitable. So now I have a whole bunch of combinations of parameters — any one of which could make money. If you’ve tested 20 trend speeds, 5 profit-taking factors, and 5 stop-loss factors, you have to pick one combination out of 250 tests. Think of the result as a 3-dimensional table (it’s actually 4-dimensional but that’s hard to picture). If you pick the one combination that made the most money you’ve made a mistake because it clearly benefited from exceptional timing. That’s overfitting because it happened to hone in on just the right pattern at the right time, or managed to avoid a nasty price shock. That pattern is not going to happen again.
What I suggested earlier is that an investor should pick at least three combinations from different places on that matrix that offer diversification. If you took the average of every combination that you tested, that average is your best expectation of future results. The profit that you’re looking for and the risk you’re looking for in the future is not the result of the best test combination. It’s the average of all of the tests you made to find out whether the system was good. Because the expectation is the average, I select a number of parameter sets scattered around the table that will come out to be that average.
That’s the point – I’m not really optimizing.
Grace: Are there any other ways that you were to advise that help with avoiding overfitting?
Perry: Yes, you keep the rules as simple as possible. Although results don’t look as good as when you only have one or two parameters they will work better. There is an adage, “loose pants fit everyone.” If you only use one parameter such as an 80-day moving average, it’ll look good on some items and not as good on others. But the average of all those will be realistic. If you try to fine tune your system, and pick a 30-day average for crude oil and a 150-day average for bonds, you’re going to be terribly disappointed because the market doesn’t respect fine tuning. It just believes in flopping around and looking to stop you out. And, after you get stopped-out it will reverse and take off. It’s constantly frustrating and the way you avoid that is to accept the fact that the market is not as orderly as you’d like.
A simple solution that makes money in the long term is going to be more realistic than trying to control everything. There’s no way to eliminate risk. You can make up new rules, you can look where the risk was the last time and try to figure out how you can avoid that, but you’re never going to succeed. If you avoid one situation it’ll show up somewhere else. There’s just no such thing as getting a higher return without higher risk. If the risk has not shown up on your system when you’re developing it, then you’ve made a terrible mistake because it will show up when you trade. So the problem with overfitting is that it gives you an unrealistic expectation of low risk. You may still make the same returns, but the real problem is not understanding the risk. So you overleverage based on your test results and, all of a sudden the risk hits you. You take a very large loss that wasn’t expected because you’ve overcommitted yourself. It’s the way most traders fail. You have to be particularly cautious of systems that don’t have realistic risk.
…the market doesn’t respect fine tuning.
Kurt: When you introduce a new rule to your system how do you determine if it’s robust?
Perry: Now that’s a really intelligent question (not that the others weren’t good). A new rule should not target an event, a new rule should be conceptual. For example, you want to get out when the volatility of your system performance, or the volatility of the particular market, goes above some critical level representing too much risk. For me that’s an annualized volatility of 60%. When you add that rule it should raise the average of all the tests using the same combination of parameters in your original optimization. When you study the results of the new test, you’re only interested in whether the average return improved or the average risk declined. You’re not interested in whether it improves two or three cases. Your new rule is robust when it improves the average of all your tests. I don’t even look at specific tests when I’m doing these things, I look only at the averages.
Kurt: That’s definitely a good way to look at that. Earlier you mentioned price shocks. So how do you account for these price shocks in your backtests?
Perry: The problem is that, again, if you pick the best solution from a set of tests you’re going to get the one that avoided the most price shocks and that’s an unrealistic expectation for the future. That’s the point of using multiple parameters and averages because you’re not honing in and you’re not being distorted by one combination of parameters having benefited from a price shock. After you’ve picked your system, if you’re determined to use one set of parameters, you should have a list of price shocks that occurred in the last ten or fifteen years. Or, you can find price shocks by scanning the data and measuring the ranges of the day. When you see a giant jump in the range or a big gap at the opening, that’s a price shock day. It should be at least three times the average trading range. Then see how your system traded on those days. Let’s say there were 20 big price shocks that were five times the normal volatility. If you go back through your trades and you made money on 15 of them, you can be pretty sure you’ve overfit that system. The most you would ever get would be half, that’s 10, and if you’re a trend follower price shocks are usually in the opposite direction of the trend. The reason the price shock occurs is that everyone tries to get out of their position at the same time, and those positions are usually in the trend direction. If you benefited from 40% percent of the price shocks you may be okay. Personally, I would be surprised if you could make money in one third of the price shocks, so if you’ve made money in more than 50% of the price shocks you’ve overfit your system.
…if you’ve made money in more than 50% of the price shocks, you’ve overfit your system.
Kurt: Very interesting. Wrapping it up here, I know you’ve written quite a few fantastic books on algorithmic trading. Can you tell us more about that? And what books and resources inspire you that you would recommend to other traders?
Perry: Well, I read everything and so it’s difficult, but my favorite is The Logic of Failure by Dietrich Dörner. It’s not about trading, it’s about problem solving. It’s a lesson in how to be successful. Many of the readers will already know Trading Systems and Methods, now in its 5th edition. Recently, I decided to write about what seemed most important to traders when I gave seminars. I collected their questions, then included them in new little book called A Guide to Creating a Successful Algorithmic Trading Strategy. It’s only 175 pages, which might please a lot of people. One part of the book describes where to get the ideas for trading systems. It’s important to read books and articles, listen to webinars and jot down whatever sounds interesting. I find that a webinar triggers some thoughts that were stirring around in my head. So I end up developing a system that had no relationship to the webinar.
Kurt: What do you think systematic traders are struggling with the most?
Perry: They are always struggling with noise. Noise interferes with everybody’s system. When you’re looking for a short-term pattern you could be fooled by noise. Remember Taleb’s book, Fooled by Randomness. Because of noise you’re going to get patterns that look just like the patterns you’re looking for, but were just random price moves. You’re going to have to separate the noise from your true pattern, and normally you do that by making the conditions more demanding. In other words, you can’t look for very small moves that make up a pattern, you have to look for bigger moves. As the moves get bigger, the likelihood of them being random goes down. So, if your idea didn’t work with small moves, try bigger ones.
Kurt: Is there any other advice that you would like to pass along to the traders out there?
Perry: Both trading and system development are not easy. You need to be tenacious. One thing that needs repeating is to start small but really trade. Paper trading and testing only goes so far. You learn the most by putting a small amount of money into trading your system, then questioning every trade and watching what happens. You learn 100 times faster by taking a loss than you do by looking over numbers on a sheet of paper. You also need to see how you personally react to risk. The reality of trading is very important.
Automate your trading idea using Perry Kaufman’s tips!
Get your free token to connect to the REST API and start trading. To generate your token:
Risk Warning: The FXCM Group does not guarantee accuracy and will not accept liability for any loss or damage which arise directly or indirectly from use of or reliance on information contained within the webinars. The FXCM Group may provide general commentary which is not intended as investment advice and must not be construed as such. FX/CFD trading carries a risk of losses in excess of your deposited funds and may not be suitable for all investors. Please ensure that you fully understand the risks involved.