Sunday
Nov302008
Volatility-Based Threshold
Sunday, November 30, 2008 at 11:45PM 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.

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:
The screener backtest parameters used are shown below:

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

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))





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