Classification by trend and volatility

Discussions about the testing and simulation of mechanical trading systems using historical data and other methods. Trading Blox Customers should post Trading Blox specific questions in the Customer Support forum.
Post Reply
Jokerman
Contributor
Contributor
Posts: 2
Joined: Wed Apr 30, 2008 10:52 pm

Classification by trend and volatility

Post by Jokerman »

Hi!

Different market conditions require different indicators. For example: trend-following indicators work well in trending times when volatility is low.

According to 'Way of the Turtle' it may be reasonable to classify a time series in two dimensions:
1. The strength of the trend
2. The volatility

This gives you four market scenarios which require different indicators.
1. WEAK trend and LOW volatility
2. WEAK trend and HIGH volatility
3. STRONG trend and LOW volatility
4. STRONG trend and HIGH volatility

I am trying to implement this in a system which automatically will classify the state of the time series.
The idea is to look at the last 20 days and measure trend and volatility during this period and from that classify the time series. The classification then determines which indicators to use.

Measure 1:
I measure the strength of the trend by taking the slope of the linear regression line. The regression line is modeled after the price values the last 20 days. After that I divide the slope value by the price of the first day of the period to get a percentual value of the trend. This also normalizes the data.

Measure 2:
I calculate the volatility for the past 20 days. Volatility is a already a normalized measure so I don't need to normalize the data.

Classification:
The equity current behaviour will be classified to either a LOW or HIGH volatility and to either a STRONG or a WEAK trend. Thus, the equity can be classified into four categories.


My question is if this is enough to be able to classify different equities from different markets?
Concerns:
* Indices or currencies will always be classified with a LOW volatility.
* Imagine a time series with high volatility and a strong trend. Now produce a new time series with the same characteristics but with only a quarter of daily price changes. That is, if the original time series increased with 2% a particualr day, the new time series will increase with 0.5%. This new time series will have the same predictive qualities as the first one, but will be classified with a low volatility and a weak trend.

Maybe I should classify by a relative volatility, that is measuring the relation between the short-time volatility and the long-time volatility?

Does anybody have any suggestions of a good way to measure trend and volatility which works across different markets?

With kind regards,
Jokerman
Asamat
Roundtable Knight
Roundtable Knight
Posts: 175
Joined: Fri Jun 03, 2005 7:50 am
Location: Walldorf, Germany

Post by Asamat »

Hi Jokerman,

your indication in the end about relative vola was what I thought during reading: I would normalize each market to itself before comparing across markets. For example, get the short term vola distribution for each day in the last n years, derive a standard deviation from that, and express your current short term vola in terms of the standard deviation. Now you have a measure which is market independent, and you will not have some markets with permanent low vola.

You could do the same thing for the slope to measure the strength of a trend. However, to my mind strength of a trend does not mean as steep as possible, rather as long and as smooth as possible. Therefore I would not work with the slope. Maybe here use RSI or some other common trend indicator, and then do the same thing: get the long term distribution, get a measure of the deviation of the mean, and express the current situation relative to the long term one. Depending on the form of the distribution the standard deviation might not be a good measure, but some quantile might work.

I'm interested in your experience, in case you made some progress in the mean-time.

Regards,
Asamat
Jokerman
Contributor
Contributor
Posts: 2
Joined: Wed Apr 30, 2008 10:52 pm

Post by Jokerman »

Yes I will post a reply here when I am done.

I am building my system on the assumption that no indicator is optimal to use in every situation. Thus it may be reasonable to classify the current price behaviour in several dimensions. The classification then determines which indicators to use. In my system the classification will be based on a huge empirical study with over 1.5 million results.

According to 'Way of the Turtle' it may be reasonable to classify a time series in two dimensions: the current trend strength and the current volatility. I have taken this a step further. The current price behaviour will be classified in terms of the current trend strength, the current short term volatility, the long term volatility and Hurst Exponent estimation. The best indicators and their settings are then selected for the current classification from a database with millions of results. The database contains real results for stocks, currencies, indices and funds back to the 1980s.

You will have to wait a few more weeks. My two quad-core systems are number-crunching 24h/day for a long period coming... :-)
Post Reply