Playing with data stream to improve results of TradeStation strategies
Everyone looks at charts
No matter what kind of trader you are, it is almost certain that you are constantly looking at price charts. Charts are designed to show a complex system of individual trades in a simplified way. Traders using technical analysis use charts alone, but we can also say that traders using fundamental analysis simply can’t resist looking at them to see what’s going on with the market. Large price swings are best explained in relation to past price behavior – charts provide perspective.
In the beginning was the TICK
When we watch 1-minute, 1-hour, 1-day or even 1-month bars, we forget that all these are made by aggregating individual trades (ticks) into a time series. We all are used to time series. GDP, unemployment and other macro data are released at weekly, monthly or quarterly intervals. But with even picking a vacation, we might want to check the historical data (monthly time series) of temperature and precipitation at our destination to make sure we have a pleasant time.
Years ago, the shortest time bars on the charts were daily bars. PCs were scarce and costly. The first technical indicators were computed by hand and written on paper. Chart traders didn’t have a choice, but now the possibility of aggregating raw data is limited only by processing power, hard drive space and one’s imagination.
Driving force of volatility
Now is the time to introduce volatility. The importance of volatility was best put by Vladimir Ilyich Lenin, who famously once said, “There are decades in which nothing happens; and there are weeks in which decades happen.” The same thing is happening in the financial markets. If we recall the period of about four months between October 2017 and January 2018, the range of the daily bar of the S&P 500 index, as measured by the Average True Range (ATR) indicator, was only 0.5-0.6%. This ended with an incident called “Volmageddon,” which triggered a total crash of short sellers of volatility. And some ETFs too. Now compare that to March 2020, where some daily ranges were over 10% causing our metric (ATR) to climb to almost 3%. March 2020 was a remarkable period not only characterized by daily volatility, but also demonstrated how fast markets can move. If we study the 1-minute bars, we can find 2 instances when the range between bar high and bar low has exceeded 2%. The silly looking but reasonable questions that arise are how do I survive in such a hostile environment? Do I have to keep looking at the charts all the time? What if I sneeze and the market will move 1% versus my position throughout my 15-second sneezing session? Well, it’s not that bad, but a new mindset is required.
Forget the time bars
Until now, we have been measuring volatility in such a way that we computed the distance (or the span of a single bar) travelled by the price in a fixed period of time. Thus, the numerator changes (weak or strong price swings), but the denominator has remained constant (1-minute / 1-day / 1-month). What about flipping our fraction upside down…? Now we would measure volatility as the time (variable numerator) that it takes to move through a fixed price range (30 ticks or 1%). Going back to the fast price movements in March 2020, we would get multiple 1% bars that were built in 60 seconds, and in the autumn of 2017, it would have taken days to produce a single price bar with a 1% range. We approached the problem of making custom price bars from a somewhat different angle than most people do, but it is now crystal clear that a lot of fixed-size bars will occur during “weeks where decades happen“, as Lenin would have said, and they will take a very long time to build during “decades where nothing happens“.
We already know “what” we want to build, but we still don’t quite know how. The most precise result will be achieved by using the raw tick data. This is fine for less liquid instruments, but it becomes incredibly difficult for the most popular equities or futures, as the number of trades can surpass millions in a single trading day.
We need tools
Some charting and trading software do not have a feature that would let the user to load a chart with anything other than a time series. Some do have such a feature, but given the size of the tick data required, they limit the number of days that you can load to 10 days. TradeStation allows using a 6-month history, which in most situations is sufficient to see the difference and evaluate the performance of technical indicators or a trading strategy. TradeStation offers three types of “equal range” (user-set) bars, but does not offer the possibility to create “equal percentage bars.” You can choose between range, momentum and Kase bars. The first two kinds are not 100% accurate, but when the later one is being aggregated using tick data, it provides the most accurate picture of what truly happened to the price. Of course, we still need to keep in mind the fact that most bars will be built during periods of high volatility. Now it gets more interesting, but two more aspects need to be clarified before we start drawing conclusions.
First, in most trading platforms such as TradeStation, the indicators that are provided are the ones that were created years ago. Oscillators such as RSI or Stochastic, Bollinger Bands, moving averages or MACD are among the most popular and widely used by traders. When using them, most traders try to take benefit of perceived inefficiencies, i.e. the market being overbought or oversold. This happens when the price moves too fast and is based on the basis of a normal/lognormal distribution. We already know that, in the financial time series, these really strong moves do not follow normal distributions, which cripples the ability of technical indicators to work as intended.
The second aspect relates the most to futures that trade round the clock. Now imagine you’re watching a 15-minute chart of the S&P 500 E-mini future during an Asian session. Most of the time there is nothing happening, the price is hardly moving, your RSI or Stochastic is glued to the 50-point line. At some point, the real trading kicks in and the price starts to go up. The new RSI value is calculated in relation to the previous price movement, so it instantly jumps to the 70-point line, suggesting an overbought condition. Is this really a sell signal, or does it just mean that real trading has begun?
Advantages of fixed range bars…
What will happen if the chart is switched to Kase bars. First of all, all small night bars will be replaced by one (or more, depending on the chosen size) bar. Rather than tens of useless indicator readings (every 15 minutes), we will only see one, which will be computed in relation to actual price movements and will no longer be associated with market noise. Thus, a price movement triggered by an increase in trading activity will only barely move the RSI indicator from our example, since the movement needed to push it into overbought territory will have to be much, much stronger.
Let’s recap. Moving from time bars to fixed range bars has clear advantages. It will remove all of the unnecessary noise, make your old indicators work better and improve the results generated by Tradestation strategies. But it comes at a cost.
… and the price
The first cost that you have to accept that signals from your Tradestation strategies will only occur when the price is moving. In periods of low volatility, you won’t get any signals because it can take a long time to add another bar to your charts. However, in periods of high volatility you will be thriving.
Another thing is that from now on, you will have to deal with two types of volatility. The first type of volatility is the volatility of your range bars – due to weekend or overnight price gaps, your bars will not always be equal. This can also happen during short periods of low liquidity, when orders are taken out and the spread between bid and ask prices is larger than your predefined range. The second type of volatility is market volatility. Normally, it is calculated as price movement/specified time, but now it will have to be calculated as the time taken to create a new bar divided by the size of the bar. This will especially affect options traders, where time decay plays a key role in pricing.
And finally, if one needs more tick data than 6 months, the price paid for the transition may even take the form of real money. Buying tick data is not cheap. Storing it requires a lot of hard drive space, and processing requires more computing power than firing up an online chart.
Is it worth it?
Short answer – yes. Long answer – definitely yes! Why? Because the results of trading strategies are much better than the ones coming from time bars. An individual trader will never be smarter than a team of PHDs from a large investment bank, or have a quicker execution than a market maker. Retail trader has to be cleverer.