What is Algorithmic Trading?

hft-robots630Algorithmic trading is here to stay. Watch CNBC, and see the empty floor of the once glorious Chicago Board of Trade. The noisy trading floor is forever gone, swiftly replaced by the quiet lethality of high speed electronic execution. Algorithmic trading is a process that uses computers to place trades quickly and efficiently. The key components are the computer, its embedded algorithm, and network latency connecting you to the exchange. If tasked properly, this cocktail can produce beautiful, repeatable results.
This method is often called algo trading. Other variations include automated trading, and gray-box/black-box trading. High-frequency trading or “HFT” is a specialized form of algorithmic trading. To give you a deeper picture of this breakdown, Professor Ben Van Vliet gives his take on the differences during our interview with him here: [https://professoralgo.com/ben-van-vliet-interview/]
Algo trading is fascinating and mysterious, but it simply means your trade ideas are executed with precision. The computer does all the work, after you input your criteria. When we develop an algorithm for trading, our goal is to write a program that follows our strategy 100% of the time. Plan the trade. Trade the plan. Remove Emotion.

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 to spot and trade opportunities, an ability previously only available to the big money institutions.

A simple algo strategy looks like this

A) Buy one contract when the last price trades above the previous day’s high. B) Sell the new position any time the price has a 3-tick 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 Futures markets are executed by computers. There has never been a better time to become an algo trader. 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.

How to Develop a Profitable Algorithmic Strategy

A winning algo edge means you have identified a moment in price/volume/time which occurs in a frequency and pattern which your skill and experience has observed. 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: 1, back-testing. 2, simulated trading.3, live trading.

Algo Trading Development: How to Validate Your Edge

PA-managementBack-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.

Algorithmic Testing applied to Liquidity and Volatility

Backtesting2While 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 adds or removes real contracts from a market, you will truly never know performance until you attempt trades that interact with available size in the market.
Liquidity identifies the ease with which you can execute a trade. There is actual volume quoted at the bid or ask for your algo to interact with, and a transaction takes place. You (and the market) will see this occur on the “tape.” As you develop and test your algorithmic strategy, you must factor in the contract 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 (ATR). ATR determines how far a commodity trades from high to low over a designated period of time. Trading the S&P 500 is very different from trading the Eurodollar. Liquidity and volatility are key elements to consider when validating your algo.

Algorithmic Trading Strategies

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 millisecond and require what is known as “co-located” servers near an exchange. The speed of the execution is crucial to success.
In 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 for Algo Trading

Picture for Discrete MinMax TimeSales
Visual programming languages allow 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 is Algo Design Lab (“ADL”) 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. 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.

Algo Trading Languages for Coders and Developers

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.
C++ is a 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.
ADL 101 training provides a comprehensive algorithmic trading education, which includes insights that only a former trader can provide. This creates the most complete algo trading experience you could ever hope for.