Click to go to TraderSmarts
  website


Pitbull image

SP500 heat map


Communities

Blog
  Directory for Stittsville, Ontario
Environmental Activism Blogs - Blog Catalog Blog
  Directory

« More Industry Group Tests | Main | Decisions, Decisions »
Sunday
Nov302008

Volatility-Based Threshold

In previous posts I found that each sector needed to be optimized for lookback period n and threshold X.  Today I am attempting to replace the threshold constant with a volatility level that is automatically adjusted for the industry.

Volatility based trading - Average True Range
(ATR)

The formula I have been playing around with up until now is as follows:

FMedian("Close(0)",#Industry) / FMedian("Close(n)",#Industry) > X

If you have not been following this blog you should read the last few posts to understand what n and X are.  I found that the optimum value of X varied from sector to sector.  This leads me to believe that a volatility-based threshold may work better than the arbitrarily assigned threshold I have been using.  For today's experiment I decided to use Average True Range for the volatility-based threshold.  Portfolio123 has formulae for ATR(bars,offset) and ATRN(bars,offset).  I decided to use ATRN which is ATR normalized by the last close price and then converted to a percentage value.  I modified my group  formula from above to the following:

FMedian("Close(0)",#Industry)/FMedian("Close(n)",#Industry) >
                    (1+X1*FMedian("ATRN(X2,0)",#Industry))

Now you are probably thinking "what the heck is this guy thinking".  He started with one variable X and now has two variables X1 and X2.   Well this is true but the idea is to do some testing to see if X1 and X2 are robust enough over a wide range of values so that they can be eliminated and replaced by constants.   I did many screener backtests while varying X1 and X2.  The screener setup is shown below:

Screen setup for volatility test

The screener backtest parameters used are shown below:

Screener backtest setup

The results of the backtests are summarized in the EXCEL graph below:

Stock screen backtest results

Just a reminder that the screener backtest starts with $100 dollars.  The graph plots the number of dollars at the end of the run for the period 03/01/2002 until 10/29/2008.  From the graph it appears that the results are quite robust and well in the black for all values of X1 and X2 that were tried.  I have decided that the longer the period for averaging ATR is best - should give the most robust results.  An X1 factor of 0.1 appears to suitable and I will work with this value in the future, at least until I repeat some individual sector tests.  So the formula looks like this now:

FMedian("Close(0)",#Industry)/FMedian("Close(n)",#Industry) >
                     (1+0.1*FMedian("ATRN(100,0)",#Industry))

All for now.

Reader Comments (1)

To be honest I am just a newbie in the stock market and these graphs and movie usually go over my head but the way you have simplifies and presented is really good…...

Mcx Zinc tips

December 14, 2010 | Unregistered Commentercommodity tips

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>