This article is the second part of a two-part series on algorithmic (algo) trading. Algo trading is about using computer automation to move money to take advantage of the best opportunities. The growth of this strategy has been particularly rapid among large traders, who have had access to sophisticated algo solutions for some time now. Now, however, individual traders can employ these automated techniques and even use them to benefit from some of the market conditions resulting from algo trading on the institutional level.
This is a good time to explore this technique. In early July, the Dow Jones Industrial Average had technically entered a bear market. There is a saying that “in a bull stock market, anyone can make money.” The implication is that in a bear stock market, you need to trade better to survive and open yourself to new ways to trade. Algorithmic trading on a retail level is, for most traders, a new way to trade.
TRADE A BETTER GAME
At a conceptual level, algo trading is a way to move money, on any scale, into or out of or between markets automatically. An algorithm is a “procedure for solving a mathematical problem,” according to Merriam Webster’s Collegiate Dictionary, 10th Edition.
According to the market research and advisory services firm Tower Group, algorithmic trading is “placing a buy or sell order of a defined quantity into a quantitative model that automatically generates the timing of orders and the size of orders based on goals specified by the parameters and constraints of the algorithm.” Sounds fancy. Algo trading is fancy, but with the right perspective, it’s also quite approachable.
At a basic level, the process of trading is manual (at this point, analysis is outside of this discussion). When you see something you want to buy (go long) or sell (go short), you place a market order. When you want to exit, you place a market order. You are the loop. Your discipline (or lack of discipline) rules every trade you make.
Now, suppose you have been entering trades too soon or exiting profitable trades too early. You can take yourself a little out of the loop. Here is where limit orders come into play. With a limit order, you decide in advance where to enter a trade, and then tell your computer to execute the trade when your price is hit. Once you are in a position, you can use a limit order to decide in advance where to take a profit. You can use a stop loss order to decide in advance where to cut a loss. Your computer is a trading partner.
Now suppose you are better at choosing a trading approach than you are at executing one. How often have you said to yourself, “I knew the price would do that but I missed the move. My approach is better than I am!” With algo trading, you take yourself further out of the loop. You select the parameters of your trading approach then a software program does the rest. You take your emotions out of the equation.
Algo trading programs come in all shapes and sizes, including offerings for individual traders. Some offerings for individual traders are “black box” programs. You are not allowed to see or change the program’s inner workings. Others are “white box” programs. The program’s code is proprietary, but you have a degree of control over the inner workings.
As with all things trading, some offerings are confusing. If you don’t understand an offering, steer clear. Consider having a trading approach in mind before you decide on an automated solution — not necessarily the rules themselves, but the concept you’re interested in exploiting (momentum, trend following, countertrend, etc.)
NET FLOW STRATEGIES
Algo trading moves money from one opportunity to another. Net flow value is about tracking money flows. If someone buys something, the money came from somewhere. If someone sells something, the money goes somewhere.
Take two markets and consider whether the net flow between them is negative, zero or positive. Negative is money flowing out of the S&P 500 and regional U.S. banks. The two are in a direct relationship. The S&P 500 is confirming the weakness in the regional banks and vice versa. Zero is money flowing out of the S&P 500 and into bonds. The two are in an inverse relationship. The weakness in the S&P 500 is inversely confirming the strength in bonds and vice versa. Positive is when money is flowing into 30-year bonds and crude oil. The two are in a direct relationship. See “Mirror opposites” and “Peas in a pod”.
The S&P 500 is currently in a downtrend. Inversely, 30-year bonds are trending up. Look at the intraday 11-day charts in “Down is up” (above). More often than not, the S&P and bonds are matching each other inversely tick for tick. Now look at the three-day charts in “Algo surgeons” (above). These charts are a money machine for algo traders. The relationship between the S&P and bonds is not always inverse. You need to be alert to and take advantage of changes.
“Seesaw days” compares the S&P and bonds over 50 trading days. The table shows whether each closed high or low or mid-range on the day and adds the two values. Zero indicates days when one closed high and the other low or vice versa or both closed mid-range. Notice the percentage of 0 days.
Using one market to confirm a move, inversely or directly, in another is an algo concept. Automating buy and sell decisions to take advantage of a relationship is an algo concept. Doing so at high speed around the clock is an algo concept. The S&P-bond relationship is just one example, albeit one that is ripe for opportunity.
Here’s how a simple net flow value algorithm might work. Consider the S&P and bonds in a day-trading context. Assume a net flow value of 0 – weak equities, strong bonds. Conceptually, your code might read as follows:
• If the S&P 10-minute price bar sets a consecutive lower high and if the bond 10-minute price bar sets a consecutive higher low then short the S&P and/or long bonds.
• If the S&P high or bond low is broken, abandon the position(s). Re-enter on the next occurrence of the entry parameters.
The net flow value algorithm above could be expanded to fit a one-day price bar. Your algorithm would, for example, keep you on the short side of the S&P as long as the preceding one-day high is not broken, or keep you on the long side of bonds as long as the preceding one-day low is not broken. Start making a list of recurring market patterns that impress you, especially patterns involving multiple futures, ETFs and/or stocks. Replicate those patterns in code. Create a library of algorithms.
Even if you do not adopt algo trading as a trading approach, you would be doing yourself a disservice by not acknowledging it and its effects. Make a home on your trading screen for charts of the S&P and bonds. Appreciate the net flow between the two. This will open a window into appreciating a great many other relationships, and in turn will broaden and deepen your appreciation of algo trading and help you see the opportunities it reveals.
Richard L. Muehlberg uses linear regression channels and intermarket analysis to day trade his own account. He publishes a day trading diary on his Web site at www.DayTradingWithLinesInTheSky.com. E-mail him at email@example.com.