The Equation Of An AlgoGuest Post
Trade idea testing + trade order execution + trade size generation = algo??? That’s one way to look at it, and indeed we have a whole in-house team dedicated to building algos to do some of these pieces every day with our RCM-X team.
While the difference between an alpha generating algo and an execution algo which through costs savings adds alpha may be a bit nuanced to some, its not to everyone. So, what does each part of the “algo equation” mean, and how does it all work together to produce the algos that we all know (and some love)?
We get into all of that in more in our recent whitepaper: Decoding the World of Quants, Algorithms, and AI, excerpts from which are below:
Algorithms (or Algos for short) are the tools quants develop to make the lives of traders easier. You can’t get very far in one without the other. Quantitative strategies are those employed in a scientific and mathematical way. Like this: when x happens, do y. Algorithms, usually expressed using computer code, define those instructions, essentially doing everything from taking the effort of making the trade off a trader’s plate to allowing for the testing of hundreds of years of data. Trading Algos cover a few steps, from the strategy creation, moving into the strategy generation (both order creation and size), then the actual trade execution, and finishing out with position management.
Trading Idea Testing
This is the “creation mode”, where quants can test what happens when we implement different algos on different pieces of historical data. What if I bought Google the Wednesday before each of its earnings releases? What if I sold Corn futures every time it’s 200-day rate of change was a negative number? What if I put bracketed orders 1.5 standard deviations above and below the past 30 days of 30 yr bond futures prices 2 minutes 36 seconds before the monthly employment number. Quants code up these ideas into an algorithm and test how they have performed over time.
Trading Signal Generation
Once quants are comfortable with that testing and have decided on the specific type of trading idea they want their algorithm to implement in the market, the next step is running that algorithm on live market data to generate real trading signals. The algorithm will ingest as much price data as you instruct it to, crunch the numbers for your calculating average prices, volume profiles, stochastics, and on and on, and spit out a signal, looking something like ‘Buy at a price of 242, with a stop at 236, and profit target of 254’ in an overly simplistic example.
Trading Size Generation
Next, is taking the fact that we want to buy at a specific price and calculating how many we’re going to buy. That’s where the order size comes in. Trade size generation is done by the algo to let you know how many of each variable to execute on. It looks something like: on this order, buy an amount equal to 0.30% of my trailing 60-day average account equity, divided by the dollar value of the distance between the current price and two standard deviations below the current price. Oh, and by the way, do that for 23 different accounts of 23 different sizes, and then calculate the order size for each account and sum the rounded value to give the total order size.
Automated order execution algorithms
Which brings us to where most of the quant efforts and modern skills are applied these days…. Automated trade execution algorithms. Not only are there algorithms built around when to enter and exit trades, there are algos built around executing those trades. Called automated execution algorithms, these bits of computer code manage trade execution based upon pre-defined inputs. These inputs come in all shapes and sizes, with things like historical information relating to price, volume, and volatility, for example:
These automated counter-parties (read: computers) can process more data and react more quickly than a human trader placing manual orders. While a manual trader attempts to work an order after receiving a signal to trade, automated order placing systems are rapidly calculating things such as implied and hidden liquidity, comparing the day’s volume and price patterns to historic norms, and placing orders which may learn from and react to the patterns of simpler order flow. With futures markets becoming dominated by automated trading, the other side of your trades are increasingly taken by someone bigger, faster, and smarter. Execution algorithms can help reduce the amount being given up to the market makers, short-term opportunists, and high-frequency traders utilizing these automated order placement methods.
That just scratches the surface of how these execution algos work, with individual algos like TWAP, POV, or synthetic iceberg just some of the many algos designed for how each trader wants to manage their execution. Take the newly revised and enhanced iceberg-like algo, PROWLER, by the quants at RCM-X. With several adjustable parameters, PROWLER is an execution algorithm that submerges the iceberg, hiding it from contra-trading participants while allowing you to capture as much alpha as possible. PROWLER includes all of the basics when it comes to iceberg orders, such as Min & Max show for order sizes and IOC orders to take the liquidity in the book. But PROWLER goes far beyond the limits of your typical iceberg, by randomizing the order size, delaying the placing of child orders, and providing sniping, designed to avoid detection.
And if you’re looking to learn even more about algos, plus some Artificial Intelligence and quants along the way, read our newest research piece Decoding the World of Quants, Algorithms, AI.
Article by RCM Alternatives