Algorithmic trading is here to stay. Watch CNBC, and see the empty floor of the once glorious New York Stock Exchange.
Billions of shares still trade on the floor each day, but the majority of those buy and sell orders are done by computers. Gone are the days of the specialist, market-maker or floor trader…
Let’s discover what trading algorithms can do, and how you can become an algo trader or developer.
Algorithmic trading is a process that uses computers, to place trades perfectly. The key benefit is the computer and the algorithm, never breaks your rules.
This method is often called algo trading. Other variations include automated trading, and black-box trading. High-frequency trading or “HFT” is a specialized form of algorithmic trading. To give you a complete picture, we should also mention gray-box trading.
A black-box allows the computer to make 100% of the decisions. A gray-box allows for discretionary decisions by the trader.
Algo trading is fascinating and mysterious, but it simply means your trade ideas, are executed flawlessly. The computer does all the work, after you input your criteria.
Notice I said “places trades perfectly,” and “executed flawlessly.” When we develop an algorithm for trading, our goal is to write a program, that follows our strategy, 100% of the time.
The algo, is a set of specific criteria, that:
1: Finds trades that match our edge.
2: Identifies the predefined entry criteria.
3: Place the trade entry.
4: Analyzes and tracks price movement, bids, offers and transactions.
5: Identifies the predefined exit criteria.
6: Places the exit orders to complete the trade.
Step #1 is crucial to the process. A well defined edge, identifies the opportunity. Today’s powerful computers allow traders like us, to spot and trade opportunities, previously only available to the big money institutions.
A) Buy one contract (or 100 shares, if stock trading) when the last price, trades above the previous day’s high.
B) Sell the new position, any time the price has a .35 decline.
This algorithm is pure. There are no qualifiers to fine-tune the edge. Qualifiers could be:
*The last price must be above today’s open price.
*The last price must be above the previous day’s high, for at least 30 minutes.
*The last price must be higher than the open price, on the first day of the month.
*The SPY ETF must be net positive for the day.
Developing an edge, and converting it into programming code, is where the money is earned in algorithmic trading. Qualifiers force price action and volume, to unfold according to our plan, or we do not enter a new trade.
Algorithmic strategy development, is growing faster than personal computers in the early 1980’s. Today it is estimated that up to 70% of all trades in the US Equity markets are executed by computers.. There has never been a better time to become an algo trader or developer.
To put the growth in perspective, a Google search on “algo trading” returns 1.2 million results. A search using Google Trends, for the word “algo” and “HFT” have more than doubled the last 5 years.
A winning algo edge, means you have identified a moment in price, volume and time, that occurs more often than not.
The trading term for this is trade expectation.
You are seeking a reason to allocate capital, because you believe the potential profit, is worth the potential risk. Algorithmic trading strategies and programs, scan all available data, and execute trades when your edge is valid.
Identifying an edge is rather simple. Choosing the best qualifiers that match your goals, resources, and capital is where your algo becomes special.
There are essentially three best-practices to validate your algo strategy: back-testing | simulated trading | live trading
Back-testing an algo strategy involves simulating the performance of a trading strategy using historical data. This means you test a strategy, using price action that has already occurred.This form of validation, gives you an opportunity to estimate the effectiveness of your edge.
Back-testing your algo is a starting point.
It should not be used as final validation, but works well to determine if your edge is worth pursuing. One caveat to consider with back-testing, and then analyzing your results, is the trap of optimization.
It’s tempting to tweak your algo to match the previous data, so it generates impressive results. This is a vicious trap of perfection. Once you have preliminary validation, move onto simulated trading.
Simulated trading, tracks your algo strategy against live market data. You get results and feedback without the benefit of knowing the outcome of price action. In essence, you cannot choose the perfect day to validate your edge.
This process is obviously slower, because you can only test one day at a time. The benefit is you cannot make tweaks in hindsight. You let your algo strategy run the entire day and then review the data for any possible changes.
Live trading to validate your algo strategy is by far the most effective method for a true validation. You get feedback that shows actual executions, and how your trading program performed within the two critical market conditions of, liquidity and volatility.
While valuable, back-testing and simulated trading provide feedback for trades that never occur. This can give false hope.
Because back-testing and simulated trading never add or removes shares from a market, you will truly never know performance until you attempt trades that interact with available shares in the market.
Liquidity identifies the ease with which you can execute a trade, because there are shares quoted at the bid or ask, and your algo, and a transaction took place. You will see this occur on the “tape.”
As you develop and test your algorithmic strategy, you must factor in the contract size (or share size) you plan to trade, and the ease with which you can reasonably execute that trade.
The less liquidity, your trading strategy will need to consider “slippage” into performance.
Slippage means you anticipate not receiving the perfect fill price that you received while back-testing or simulated trading. Large orders, without liquidity, can be a slippage disaster.
Volatility represents, how fast and how far, a security moves, within a designated period of time. In trading lingo, many who use technical analysis determine volatility, by using the Average True Range indicator. Or “ATR”
ATR determines how far a security trades from high, to low over a designated period of time. For example; the ATR of BOA, Bank of America is .58 for the last 14 days. The ATR for AMZN, Amazon.com is $27.52.
This means if you are trading AMZN, the swings are much wider and share size must match your risk tolerance.
The same applies to futures contracts. Trading the S&P 500 is very different from trading the Eurodollar. Liquidity and volatility are key elements to consider when validating your algo.
There are literally thousands of potential algorithmic trading strategies, here are few of the most common to jump start your journey:
Trend Following Algos: Your edge is determined by identifying an obvious direction to order flow. This edge could be over months, or over minutes. The key to success with this strategy is defining the time frame to operate.
The objective is to pick a side, then pick a spot to enter. The shorter the time frame, the more frequently you will trade because the trend will change quicker and you will receive more signals.
Momentum-Based Algo Strategies: Momentum algos look for the futures contract to move quickly in one direction on high volume.
This edge seeks to quickly enter on a pause, ride the momentum, and then exit on the next pause. This algo does not ride big winners. The plus side is it should not have big losers either. Momentum strategies in the direction of the order flow, are generally regarded as smart trading.
Counter-Trend Algo Strategies: This strategy typically identifies a saturation point in momentum, and “fades” the move, instead of trading with the momentum. counter-trend trading is a specialized form of allocating capital and not for the faint-of-heart.
This last statement is especially true because of algorithms! There was a period in time, when price action had a nice fluid back-and-forth rhythm. If you were in a losing trade, there was a good chance you could, “trade out of a losing position.”
Algos have changes that dramatically. Today’s algo driven world will see multiple algorithmic programs trigger at the same time, and price explodes or implodes in one direction. Leaving no reprieve for the counter-trend neophyte.
Reversion to the Mean Algo Strategies: Imagine a rubber band that typically expands to “10.” When it gets that far, it pulls back, or reverts to it’s normal distance. This is reversion to the mean algo trading. Your algo dissects data and places orders when a futures contract expands beyond it’s mean.
The goal of this trade, is to time the entry, at an extreme price point, anticipating a profitable reversal.
Scalping Algo Strategies: Certain markets, offer opportunities to track large buyers and sellers. The strategy here, is to “capture the spread.” This means buying on the bid, and then selling on the offer, for a profit of a few ticks.
This algo strategy was the bread-and-butter for many day traders/floor traders over the years. Tighter spreads and faster computers, have made this challenging for the manual trader. One door closes and one door opens, scalping opportunities have opened for smart algo developers and traders.
HFT | High Frequency Trading Algos: This is the algo that gets all the publicity. The perceived money-machine for the privileged quant-wizards. HFT programs execute within a mili second and require what is known as “co-located” servers near an exchange.
The speed of the execution is crucial to success.
Algo Strategy Summary:
The ever expanding industry of computerized trading, is a changing landscape that appears to have no bounds, save imagination, and computing speed.
The bottom line, there are a million ways to describe algorithmic trading, and it can appear intimidating, but the “little guy” can and should, seek to compete. Access to programmers, consultants, high-speed access and powerful server computers, are within your reach.
For all the fancy trader lingo, this is simply automated trading. It’s just a matter of your time frame.
Visual programming language, allows futures and options traders to design, create and deploy automated high frequency trading algorithms without having to write a single line of code.
With an easy-to-use, drag-and-drop interface, users apply building blocks to construct circuit-like designs on their computer screens.
The language and program, offers the flexibility to design your own strategy, and the opportunity to study and implement, pre-made strategies.
The preferred visual programming language for Professor Algo consultantsand certified partners is Algo Design Lab by TT.
When an “ADL” strategy is deployed to the trade server, the strategy is compiled and run as if it were a traditional computer program. ADL makes algorithm design accessible to anyone, not just advanced programmers.
ADL provides safety measures (at design time and at run time) that are not available in traditional programming context, thereby reducing risk and the time required to design, create and test programs while providing a safer trading environment.
What once took days or weeks, now takes minutes.
In addition, by handling code-writing “behind the scenes” for the user, ADL lowers risks for traders, trading firms, and exchanges – especially for high-frequency automated trading.
**Professor Algo Note: Visual Programming Language is the focus of our ADL Certification Program. Watch the Quick-Start Video Below to Learn More.
Java is popular and with good reason. This sophisticated language is built around a key benefit, code a program once, and you can integrate seamlessly across platforms.
Another advantage, fueling Java’s ascent is the language is easy to implement (for coders) and is reliable. It can be debugged, which places an emphasis on checking for errors. Issues that wouldn’t appear until execution time when using other languages are found quickly with Java.
Python is known as, an object-oriented language. The programming language is interactive, and portable, which makes it easy to work with (for professional coders).
Its programming structure is well organized, which means that longtime-coders can quickly adapt, and begin producing programs with Python.
This general-purpose language is typically used in systems programming, and is quite popular. C++ is an advanced language that is not for newbies.
It was designed with a bias toward system programming and embedded, resource-constrained and large systems, with performance, efficiency and flexibility of use as its design highlights.