07 Jun Quantifying market inefficiency or behaviour beyond randomness
Outline which we follow when developing our algorithmic trading systems.
- Algorithmic trading system is a set of rules which seek to best model repeatable non-random behaviour in markets.
- Define the behaviour, determine the conditions the behaviour persists and then data mine and create code that best fits this non-random behaviour.
1. What is an algorithmic trading strategy?
When we are day trading we have 3 things to every positions; entry price, stop price and target price. What determines each of these factors is a human decision based on an estimation that our entry will make a profit. Some traders have a set plan, other trade from there gut, but regardless of trading style each entry either consciously or subconsciously is based on definite rules. We are aiming to model this market behaviour and quantify it into a series of rules. Whether you are working on technical analysis, fundamental news or price action we aim to breakdown your entries into a series of rules which can then be tested against past data or data on various markets.
2. Process of creating our algorithmic trading system
For all our algorithmic trading systems we follow this basic approach:
- All futures algorithmic trading systems are based on finding and pulling a fundamental truth about the market. Define what fundamental truth you’ll be going after. All markets have a tendency to trend beyond random. “There’s more than one way to skin a cat”, this means there is no right or wrong method, as long as you are trying to expose a market inefficiency which shows some repeatable behaviour.
- Determine the conditions under which the defined truth tends to occur. For example let’s take trend following truth: Following this approach we will ask how do I measure a trend? Since most trends occur randomly we need a trend that is beyond a confidence level of randomness. So does this trending tendency beyond random exhibit the same degree of persistence beyond one year? Two years? Five years? If not, is there some point at which the persistence beyond random occurs every year? If so, does it also persist at the same frequency for 5, 10, 50 different markets? If so, you’ve discovered a fundamental truth/market inefficacy which we can exploit.
Mine the data and create your code
- The next stage we write code necessary to fit create rules to model this behaviour. Once our basic coded rules are in process we then determine how well it maps against the behaviour. After you’re satisfied you’ve developed a satisfactory method for mining the behaviour, you can do an edge test to see if it happens beyond random. If not, use Monte Carlo sims to determine confidence levels for trading the method. Determine at what confidence level you’ll stop trading. Examine the drawdown versus the profit. Is it worth risking any money on this? If so, allocate money using a money management scheme
Creating our algorithmic trading system – Coding our rules
Some details regarding creating our algorithmic trading rules. There are three parts to our trade: entry, stop and target. When we develop an algorithmic trading system we look for an edge. An edge is a statistical estimation that our trade will be profitable over 1000 trades. It is the same as how a casino operates in blackjack. A casino works on an edge basis and know that over 1000 hands of blackjack they have the probability of winning in their favour – this is a mathematical and statistical absolute.
- Entry: for a winning system we want our entry to have a statistical edge, when we enter a trade we expect that our entry has some predictive power in our favour.
- Stop: when we create a stop for our entry we expect it to have some predictive power that the odds of our success for our trade has diminished and we either trail stop to lock in gains or stop out to ensure we don’t lose any more capital.
- Target: this has some predicative ability to determine the market is most likely to either stall or reverse at this point. We expect our target to accurately predict based on the market action has given us a sign or quantitative data to tell us to exit at this point.
When we create an algorithmic trading system we don’t want our entry, stop or target to be static. This means we can’t just choose a stop based on our account size as this has zero predictive power over current market conditions. Static stops and targets means our system is not accurately assessing the current market and quantitative data.