Industry Benchmark Performance
Hedge funds are doing surprisingly well in an uncertain market. Those that allows short sales did better in August, given the sell-off in AI and tech stocks. Futures remain marginal but profitable. Most futures funds favor interest rates, so performance will vary with the consistency of the interest rate trends.
Source: BarclayHedge Indices.
Kaufman’sMost Popular Books (available on Amazon)
Trading Systems and Methods, 6th Edition. The complete guide to trading systems, with more than 250 programs and spreadsheets. The most important book for a system developer.
Kaufman Constructs Trading Systems. A step-by-step manual on how to develop, test, and trade an algorithmic system.
Learn To Trade. Written for both serious beginners and practiced traders, this book includes chart formations, trends, indicators, trading rules, risk, and portfolio management. You can find it in color on Amazon.
You can also find these books on our website, www.kaufmansignals.com.
Blogs and Recent Publications
Find Mr. Kaufman’s other recent publications and seminars at the end of this report. We post new interviews, seminars, and reference new articles by Mr. Kaufman each month.
August Performance in Brief
Small gains and losses reflect the uncertainty of the market. Artificial intelligence (AI) stocks, that were leading the market for more than a year, are now flopping around – up one day and down two days. One would think that interest rates would start to fall, but not knowing whether the Fed will lower rates by 25 or 50 basis points seems to be the question. I’m guessing 25. Once the Fed starts lowering rates, we should get some anticipation of further cuts – and maybe a trend.
Below is a chart of the past four years of what I’ll call the “high-cap movers.” NVDA has a scale of its own on the right and shows extreme volatility. In my estimation, that usually means it’s overbought, a situation that makes it difficult to keep the risk under control.
Major Equity ETFs
While Nasdaq (QQQ) has recovered most of its losses, the S&P (SPY) is near highs again. I can only assume that the market is expecting better earnings with lower rates. While there is a lot of talk about the small caps (IWM) having their “moment,” it is difficult to see it on the chart. For now, the broader exposure that the S&P offers has more potential to reflect a better economy, and less risk than Nasdaq.
Insert Major Index
CLOSE-UP: How To Use a Stop-Loss
I don’t use stop-losses often because I prefer to let the system rules exit the trade (for example a trend change), but I believe there is a right way and a wrong way to use stops. I’m sure that many traders have used intraday stops and found that they got the worse price of the day. I used to be one of them. But some of my memory predates electronic exchanges.
With that in mind, I tested the use of intraday stops versus executing on the close after a “virtual” stop is hit. If the market is noisy (usually the S&P), then waiting for the close can give a better fill than an intraday order. If the market trending (most often the interest rates), then the sooner you’re out, the better.
The Markets
I can’t test everything, so I’ll limit this to data from 2010 and apply it to the S&P and Nasdaq ETFs, SPY and QQQ. Also to Apple (AAPL), Nvidia (NVDA), Bank of America (BAC), and Lilly (LLY). Finally to the U.S. 10-year Note futures (TY).
The System
In order to get enough trades to test the two types of stops, I’ve created a simple trending system with the following rules:
- A moving average, where a buy signal occurs when the moving average turns up and sell signal when the moving average turns down.
- A stop-loss using an N-day average true range subtracted from the highest price of a long trade and added to the lowest price of a short sale.
- A long reentry when a new high occurs, and short reenter when a new low occurs.
- The stocks will only take long positions. I tested both long and short sales, but short sales were consistently bad. I will look at longs and shorts for the 10-Year Note.
I’m fixing the moving average at 80 days, typical of a macrotrend system. The ATR for the stop should be in the range of 3 to 5, and the reentry will be on a new 20-day high or low.
I realize that you may want to test this on other parameters, so I’m including the program at the end of this report. It allows you to change moving average, how the signal occurs (using the moving average trend or a price penetration of the trendline), the period of the ATR and the period of the following breakout. You might decide that it is a good basis for an interesting system. I won’t guarantee that every feature has been debugged, so check your work.
SPY
Starting with SPY, which I see as a noisy market. I tested the 80-day moving average and varied the ATR calculation period and the ATR factor, that gives me the stop-loss price. I’m just going to show the TradeStation results for the optimal parameters.
SPY gives us our first look at the results, shown in Figure 1.
Figure 1. Comparison of SPY intraday vs close-only stops.
The profits are nearly identical. The only difference is the number of trades. Why? An intraday stop will be executed more often at an extreme. Having reached that extreme, the price then rebounds. In this system the rebound caused the close-only stop to be missed, even though the final results were similar. In this example there were 55 cases where the intraday stop was hit but price then rallied so the close was above (or below) the stop level.
On the other hand, having fewer closing stops did not improve the percentage of profitable trades. It may, however, have improved real-life performance because there could be large slippage executing intraday stops (not that you always get the best price on the close). Fewer trades means less slippage.
QQQ
The Nasdaq ETF, QQQ, is known to be more volatile than SPY. That allows an 80-day moving average to have greater profits and a higher profit factor. As with SPY, the closing stop has fewer trades and a slightly better percentage of profitable trades. Otherwise, the returns and drawdowns are remarkably similar, much like SPY (see Figure 2).
Figure 2. Comparison of QQQ intraday vs close-only stops.
Apple (AAPL)
There is a big difference between an index and a stock. Stocks have more volatility and surprise moves. An index is the average of a large number of stocks; therefore, its moves are dampened. I find it interesting that the best parameters for AAPL are nearly the same for QQQ (see Figure 3). But perhaps AAPL is one of the main drivers in the performance of QQQ. It also shows bigger profits and a higher profit factor – not a bad system!
Figure 3. Comparison of AAPL intraday vs close-only stops.
In this comparison, the close-only stop is slightly better in all statistics than the intraday stop. Still, it is a small improvement. In trying to draw a conclusion, the intraday ATR tends uses 5 days, while the close-only stop need a longer 20-day period.
Nvidia (NVDA)
All eyes are on NVDA, and for good reason. This simple system captured the largest gains with the highest profit factor. The close-only stop performed better in all statistics than the intraday stop, and better than in the AAPL test above.
Figure 4. Comparison of NVDA intraday vs close-only stops.
Lilly (LLY) and Bank of America (BAC)
For those taders not looking for the excitement of NVDA, we’ll look at Lilly (LLY) and Bank of America (BAC). In LLY (Figure 5), profits are more realistic and the profit-factor is still good. The interesting change is that the ATR days reversed. Intraday now has the larger calculation period. You’ll need to decide if that is a pattern. If you optimize, you may find that there were a large number of values that were all good. We also see a slight improvement using close-only stops.
Figure 5. Comparison of LLY intraday vs close-only stops.
Bank of America (BAC) is another “normal” stock, having a history of ups and downs. This system still did well, even if not nearly as good as AAPL or NVDA. Here we see the ATR N-day parameters as back to the values where the intraday is faster than the close-only. The statistics vary in Figure 5, sometimes favoring the intraday stop and sometimes the close-only stop. Both are quite close.
Figure 6. Comparison of BAC intraday vs close-only stops.
U.S. 10-Year Note Futures
One of the best trending sectors are the interest rates futures. In the history of price moves, interest rates have probably declined 90% of the time, so most gains are made by being long futures. Even at very low interest rates, each time a futures contract rolls, the new prices are lower (yields increase as the days of the new maturity is increased). That allows you to keep making money on the longs side, even though it might be small. Some traders and funds are good with that.
When yields are low, it takes a large number of contracts to reach “volatility parity” with other markets, namely the index sector. We have seen periods where the number of contracts (long) are so large that a small, unexpected change in rates could cause large risk.
There are months when rising yields could have produced big gains on the short side, but subsequent price action normally takes those away. Our recent move in rates is likely to be another one of those cases. In the example below, the profits from short sales are good, but taking additional shorts as the Fed reduces rates are likely to lead to losses. Be careful!
Having said that, Figures 7 and 8 show the stops applied to close-only and intraday orders. Figure 7 is long-only and Figure 8 is both long and short. Taking short sales doubles the profits and increases the profit factor. If we can only predict when we should stop being short, trading would be easier.
Figure 7. Comparison of 10-Year Note futures (TY) intraday vs close-only stops. Long only.
Figure 8. Comparison of 10-Year Note futures (TY) intraday vs close-only stops. Long and short sales.
For long-only, we see the close-only with far fewer trades, a higher profit-factor and a lower draw-down. That seems to imply more erratic volatility, bouncing back after hitting the intraday stop-loss. That’s not as clear with the long-short results (Figure 8), although both results are very similar. And while the parameters for the close-only are similar for long and long-short results, the parameters for the intraday stops are very different. I don’t find that as comforting as similar parameters.
Conclusion
Some traders would argue that an intraday stop gets you out sooner, which would be safer if the market continued to reverse. On the other hand, my bias is to use close-only stops. Even when the market is volatile, I find that waiting for the close tends to give a better fill with less slippage than an intraday stop. And, there are times when volatility is high and the price moves rapidly through your stop and the fill is far off. Overall, my bias is to fill on the close.
There are always exceptions. The most trending markets are the 3-month interest rates: SR3, short sterling, and Euribor. You will want to test those to see if intraday stops work best. The noisiest markets are index equities. They are good candidates for the close-only stops.
I’m attaching the program used for testing. You should test any market before deciding what to do. I used data from 2010, but you may have other ideas, perhaps that last five years? There are a lot of variables when making a decision, so treat it with respect.
PROGRAM TO TEST INTRADAY AND CLOSE-ONLY STOPS
The following code is the main program for testing stops (please excuse the spacing — just copy the code into EasyLanguage — it will come out correctly):
// PJK Trend wMA Stop and Reset
// Copyright 2024, P J Kaufman. All rights reserved.
{ period = length of calculaton
crossoption = 0, then use MA
= 1, then price crosses MA
longonly true then only long positions
Rules:
MA trend
Stop using atrange
Stop option: (1) exit intraday or (2) exit on Close
Reset on new high/low
}
input: period(80), crossoption(0), stopATR(20), stopfactor(2.0), stopoption(1),
BOper(20), longonly(true), usestocks(true),usefutures(false), printfiles(false);
vars: signal(0), size(1),ATRper(20), stoploss(0), highprice(0), lowprice(0),
ATR(0), MA(0 ), psignal(0), futuresinvestment(25000), stockinvestment(10000);
MA = average(close,period);
if crossoption = 0 then begin
if MA > MA[1] then signal = 1
else if MA < MA[1] then signal = -1;
end;
if crossoption = 1 then begin
if close >= MA then signal = 1
else if close < MA then signal = -1;
end;
// ATR for stop
ATR = avgtruerange(stopATR);
// Position size
if usestocks then
size = stockinvestment/close
else if usefutures Then
size = futuresinvestment/(ATR*bigpointvalue);
// New trend signal
if signal <> signal[1] then begin
if signal > 0 then begin
buy (“NewB”) size contracts next bar on open;
end
else if signal < 0 then begin
sell all contracts next bar on open;
if longonly = false then begin
sell short (“NewS”) size contracts next bar on open;
end;
end;
end;
if marketposition <> psignal then begin
if marketposition > 0 then begin
highprice = close;
lowprice = 0;
end
else if marketposition < 0 then begin
lowprice = close;
highprice = 0;
end;
end;
// Reset high and low trade prices
if marketposition > 0 then begin
highprice = maxlist(highprice,high);
lowprice = 0;
end
else if marketposition < 0 then begin
lowprice = minlist(lowprice,low);
highprice = 0;
end;
// Reentry
if signal > 0 and signal[1] > 0 and marketposition < 1 then begin
if high > highest(high[1],BOper) then begin
signal = 1;
buy (“BuyReset”) size contracts next bar on open;
highprice = close;
end
else if low < lowest(low[1],BOper) then begin
signal= -1;
sell all contracts next bar on open;
if longonly = false then
sell short (“SellReset”) size contracts next bar on open;
lowprice = close;
end;
end;
// place stop intraday
if stopoption = 1 then begin
if marketposition > 0 then begin
stoploss = highprice – stopfactor*ATR;
sell (“SellStop”) all contracts next bar at stoploss stop;
end
else if marketposition < 0 then begin
stoploss = lowprice + stopfactor*ATR;
buy to cover (“BuyStop”) all contracts next bar at stoploss stop;
end;
end;
// stop exit on close
if stopoption = 2 then Begin
if marketposition > 0 then begin
stoploss = highprice – stopfactor*ATR;
if close <= stoploss then
sell (“SstopC”) all contracts this bar on Close;
end
else if marketposition < 0 then Begin
stoploss = lowprice + stopfactor*ATR;
if close >= stoploss then
buy to cover (“BstopC”) all contracts this bar on close;
end;
end;
if lastbaronchart then begin
if marketposition > 0 then sell all contracts this bar on close
else if marketposition < 0 then buy to cover all contracts this bar on close;
end;
psignal = marketposition;
Linear Regression Functions
{ TSMLRintercept : Linear regression intercept
Copyright 1994-1999, 2021 P J Kaufman. All rights reserved.
Method of least squares to calculate slope }
{ price = input series
period = length of calculation }
inputs: price(numericseries), period(numericsimple);
vars: sumx(0), sumx2(0), sumy(0), sumxy(0), n(0), k(0), top(0), bot(0),
slope(0), yint(0);
{ time = x, the independent variable, e.g., 1, 2, 3, …
price = y, the dependent variable }
{ standard sum of integer series }
sumx = period*(period + 1) / 2;
sumx2 = period*(period + 1)*(2*period + 1) / 6;
sumy = summation(price,period);
sumxy = 0;
n = period;
for k = 0 to period-1 begin
sumxy = sumxy + n*price[k];
n = n – 1;
end;
top = period*sumxy – sumx*sumy;
bot = period*sumx2 – sumx*sumx;
if bot <> 0 then
slope = top / bot
else
slope = 0;
TSMLRintercept = (sumy – slope*sumx) / period;
{ TSMLRslope : Linear regression slope
Copyright 1994-1999, P J Kaufman. All rights reserved.
Method of least squares to calculate slope }
{ price = input series
period = length of calculation }
inputs: price(numericseries), period(numericsimple);
vars: sumx(0), sumx2(0), sumy(0), sumxy(0), n(0), k(0), top(0), bot(0),
slope(0), yint(0);
{ time = x, the independent variable, e.g., 1, 2, 3, …
price = y, the dependent variable }
{ standard sum of integer series }
sumx = period*(period + 1) / 2;
sumx2 = period*(period + 1)*(2*period + 1) / 6;
sumy = @summation(price,period);
sumxy = 0;
n = period;
for k = 0 to period-1 begin
sumxy = sumxy + n*price[k];
n = n – 1;
end;
top = period*sumxy – sumx*sumy;
bot = period*sumx2 – sumx*sumx;
if bot <> 0 then
slope = top / bot
else
slope = 0;
{ yint = (sumy – slope*sumx) / period; }
TSMLRslope = slope;
A Standing Note on Short Sales
Note that the “All Signals” reports show short sales in stocks and ETFs, even though short positions are not executed in the equity portfolios. Our work over the years shows that downturns in the stock market are most often short-lived and it is difficult to capture with a longer-term trend. The upwards bias also works against shorter-term systems unless using futures, which allows leverage. Our decision has been to take only long positions in equities and control the risk by exiting many of the portfolios when there is extreme volatility and/or an indication of a severe downturn.
PORTFOLIO METHODOLOGY IN BRIEF
Both equity and futures programs use the same basic portfolio technology. They all exploit the persistence of performance, that is, they seek those markets with good long-term and short-term returns on the specific system, rank them, then choose the best, subject to liquidity, an existing current signal, with limitations on how many can be chosen from each sector. If there are not enough stocks or futures markets that satisfy all the conditions, then the portfolio holds fewer assets. In general, these portfolios are high beta, showing higher returns and higher risk, but have had a history of consistently outperforming the broad market index in all traditional measures.
PERFORMANCE BY GROUP
NOTE that the charts show below represent performance “tracking,” that is, the oldest results since are simulated but the returns from 2013 are the systematic daily performance added day by day. Any changes to the strategies do not affect the past performance, unless noted. The system assumes 100% investment and stocks are executed on the open, futures on the close of the trading day following the signals. From time to time we make logic changes to the strategies and show how the new model performs.
Groups DE1 and WE1: Daily and Weekly Trend Program for Stocks, including Income Focus, DowHedge, Sector Rotation, and the New High-Risk Portfolio
The Trend program seeks long-term directional changes in markets and the portfolios choose stocks that have realized profitable performance over many years combined with good short-term returns. It will hold fewer stocks when they do not meet our condition and exit the entire portfolio when there is extreme risk or a significant downturn.
Equity Trend
Fractional losses in the Daily Trend program allows it to hold onto good gains for the year, if not as much as the S&P. The Weekly program is lagging with small gains and losses for August, and net returns above 4% and 7%. Once we see a trend in interest rates, the Weekly should gain against the Daily program.
Income Focus and Sector Rotation
Another small gain in both programs pushes results into the positive for the year. While the Weekly program has a good deal to make up, the Daily program is near highs. This program is waiting for an trend in lower rates.
Sector Rotation
Although higher by nearly 6% in August and up by 23% for 2024, this program switched out of Staples and into Real Estate, only to switch back to Staples within a week. It continues to hold Financials and Utilities. It shows what we don’t know.
DowHedge Programs
Another program doing well in August is the DowHedge. Both Daily and Weekly portfolios gained about 3% and year-to-date are both higher by more than 11%. Risk has been reasonably low and no hedges have been need to quite a while. This is a case where the Weekly program benefits from not jumping in and out.
High-Risk Portfolios
Offsetting losses of 3% in the Daily Portfolio and gains of 3+% in the Weekly Portfolio shows how the semi market has been flopping around. Holding a position after it has declined results in a recovery. It’s a risky market. We won’t know if AI has seen its top until this program switches out of AI stocks and perhaps back to healthcare or biotech.
Group DE2: Divergence Program for Stocks
The Divergence program looks for patterns where price and momentum diverge, then takes a position in anticipation of the pattern resolving itself in a predictable direction, often the way prices had moved before the period of uncertainty.
A better month for the Divergence Program, with gains of more than 1% for the 10-stock and 3% for the 30-stock. Despite the lack of trend, this program is holding its own this year with gains well above 10% in both portfolios.
Group DE3: Timing Program for Stocks
The Timing program is a relative-value arbitrage, taking advantage of undervalued stocks relative to its index. It first finds the index that correlates best with a stock, then waits for an oversold indicator within an upwards trend. It exits when the stock price normalizes relative to the index, or the trend turns down. These portfolios are long-only because the upwards bias in stocks and that they are most often used in retirement accounts.
Mixed results for August in the Timing Program but disappointment in its ability to capture the bottom of a pullback. Those bottoms need to be in an uptrending market, which isn’t happening. The recent drop in AI stocks caused the trends to turn down, removing them as candidate for new position. This program is looking for a new group of markets to exploit.
Futures Programs
Groups DF1 and WF1: Daily and Weekly Trend Programs for Futures
Futures allow both high leverage and true diversification. The larger portfolios, such as $1million, are diversified into both commodities and world index and interest rate markets, in addition to foreign exchange. Its performance is not expected to track the U.S. stock market and is a hedge in every sense because it is uncorrelated. As the portfolio becomes more diversified its returns are more stable.
The leverage available in futures markets allows us to manage the risk in the portfolio, something not possible to the same degree with stocks. This portfolio targets 14% volatility. Investors interested in lower leverage can simply scale down all positions equally in proportion to their volatility preference. Note that these portfolios do not trade Asian futures, which we believe are more difficult for U.S. investors to execute. The “US 250K” portfolio trades only U.S. futures.
Interest Rate Comparison
Before reviewing futures, a short note on interest rates. History shows that most money in futures comes from interest rates. They tend to be very trending and generally rise (rising prices are lower rates), as can be seen in the chart below. The eurobund can be seen to be even smoother than the U.S. 30-year bond, although with a very similar pattern.
Higher rates have been in effect for the past two years, but our program will only go long futures. Again as you can see from the chart, shorts are short-lived and do not produce profits. Even the recent declines will eventually be offset by losses in future short positions. I hope this helps to explain why we have not gain from higher rates, but hope to be on the right side of lower rates.
Modest losses in all portfolios leave us slightly ahead for the year. Most futures programs count on interest rates to produce the bulk of the profits (see the comment above). A situation that has not happened so far this year. Programs are hanging up at the top of the chart waiting for rates to trend!
Group DF2: Divergence Portfolio for Futures
Mixed results for the Divergence program, with the $250 gaining and ahead for the year, while the other portfolios lost over 3% and are down for 2024. This program is still waiting for a trend to develop, a program that keeps persisting.
Blogs and Recent Publications
Perry’s books are all available on Amazon or through our website, www.kaufmansignals.com.
August 2024
“Theory Versus Reality” was published in the August issue of Technical Analysis of Stocks & Commodities. It discusses price shocks, diversification, predicting performance, and more.
July 2024
Perry posted a new article on Seeking Alpha, “Capturing Fund Flows.” It a good strategy for someone that wants to add some diversification. It only trades 3 days each month!
June 2024
Perry was interviewed on June 27th by Simon Mansell and Richard Brennan at QuantiveAlpha (Queensland, Australia), a website heavy into technical trading. It should be posted in a week or so.
“Trading Extreme Gaps and Extreme Closes” looks at daily patterns in stocks, published in the June edition of Technical Analysis.
May 2024
In the April edition of Technical Analysis, Perry again deals with risk in “How Professional Assign Risk.” It is another chapter in how to protect yourself.
April 2024
Another article in the April edition of Technical Analysis, “Determining Risk Before It Happens.” Perry thinks this is an article everyone should read.
March 2024
In the 2024 Bonus Issue of Technical Analysis, Perry has an article, “Pros and Cons of Daily Versus Weekly Trend Following.” There is also a quote by him in the “Retrospective: Interviews” going back to April 1988.
Perry also posted an article on Seeking Alpha, “How To Exit a Trade.” A good reminder of the choices.
February 2024
Perry published an article on using the backwardation and contango in crude oil in “The Delta-Delta Strategy.” If not crude, the you might think of this for any commodity, including interest rates, that have a consistent term structure.
January 2024
A new article in February edition of Technical Analysis of Stocks & Commodities, “Crossover Trading: Arbitrating the Physical with the Stock.” A chance at diversification!
Perry posted 3 new articles on Seeking Alpha in December, “Where Do You Take Profits?”, “Is There a Better Day to Enter the Market,” and “Watching January Returns.”
Another article in Technical Analysis of Stocks & Commodities, “Gap Momentum,” another interesting way to identify the trend.
December 2023
Perry posted 3 new articles on Seeking Alpha, “Where Do You Take Profits?”, “Is There a Better Day to Enter the Market,” and “Watching January Returns.”
This month Technical Analysis of Stocks & Commodities published “A Strategy For Trading Seasonal and Non-Seasonal Market.” Turns out that most markets are non-seasonal!
November 2023
Perry posted two articles on Seeking Alpha, “Compression Breakout: Giving a Boost to Your Entries,” and “Volatility: The Second Most Important Indicator.” In addition, he interview Herb Friedman in Technical Analysis of Stocks & Commodities. Herb is a interest rate specialist focusing on low risk investments.
October 2023
In this month’s Technical Analysis of Stocks & Commodities Perry shows how Merger Arb works and how an investor can participate in it. Merger Arb has been the realm of Institutions, but there are opportunities for everyone.
Older Items of Interest
On April 18th, 2023 Perry gave a webinar to the Society of Technical Analysts (London) on how to develop and test a successful trading system. Check their website for more details, https://www.technicalanalysts.com..
Perry’s webinar on risk, given to the U.K. Society of Technical Analysts, can be seen using the following link: https://vimeo.com/708691362/04c8fb70ea
For older articles please scan the websites for Technical Analysis of Stocks & Commodities, Modern Trader, Seeking Alpha, ProActive Advisor Magazine, and Forbes. You will also find recorded presentations given by Mr. Kaufman at BetterSystemTrader.com, TalkingTrading.com, FXCM.com, systemtrade.pl, the website for Alex Gerchik, Michael Covel’s website, TrendFollowing.com, and Talking Trading.com.
You will also find up to six months of back copies of our “Close-Up” reports on our website, www.kaufmansignals.com. You can address any questions to perry@kaufmansignalsdaily.com.
© August 2024, Etna Publishing, LLC. All Rights Reserved.