[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [amibroker] StoRSI... was Re: Robustness



PureBytes Links

Trading Reference Links

I prefer a simpler volatility measure, looking longer term than one day
trades
Here is what I use. I have a leaning towards oil/gas stocks. The liquididty
is prob much smaller than most would be used to using, but if I went for
large liquidities I would prob only get a few stocks that would not have the
volatility

//EXPLORATION FOR DAILY WATCHLIST
//SCAN ON QT WATCHLIST
//13 OCT 2003

//LIMITS
Period = IIf( SectorID()==1, 120, 240 );
MeanHigh = IIf( SectorID()==1, 2, 1 );
MeanLow = IIf( SectorID()==1, 0.05, 0.1 );
VolatLow = IIf( SectorID()==1, 30, 30 );
LiqLow = IIf( SectorID()==1, 10, 200 );
CloseHigh = IIf( SectorID()==1, 20, 1 );
CloseLow = IIf( SectorID()==1, 0, 0.2 );
LifeLow = BarCount >= IIf( SectorID()==1, 0, 2 )*Period;
ActivePerDays = IIf( SectorID()==1, 5, 120 );

//Base number of trading days during period
Vbase1 = Foreign( "CBA", "V" );
VCount1 = Sum( Vbase1 != 0, period );
Vbase2 = Foreign( "NCP", "V" );
VCount2 = Sum( Vbase2 != 0, period );
Vcount = Max( Vcount1, Vcount2 );

ActiveLow = (1-(period/ActivePerDays)/Vcount)*100 ;

//Ticker activity
Count = Sum(V!=0,period);
Active = Count/VCount*100;

//Liquidity
Price = Sum(C,period)/Vcount;
Trade = Sum(V,period)/Vcount;
Liquidity = price*trade/1000; //$'000

//Volatility
Range = HHV(C,period) - LLV(C,period);
Mean = (HHV(C,period)+LLV(C,period))*0.5;
Volat = Range/mean *100;

Requirements = Liquidity>=LiqLow AND Active>=ActiveLow AND Volat>VolatLow
AND Mean<MeanHigh AND Mean>MeanLow AND C>CloseLow AND C<CloseHigh AND
LifeLow;// AND SectorID()!=1 ;

Filter = Requirements;
SetOption("NoDefaultColumns",1);
AddTextColumn(Name(),"");
AddTextColumn(SectorID(1),"sector");
AddColumn(InWatchList(2),"wl",1);
 

Cheers,
Graham
http://groups.msn.com/ASXShareTrading
http://groups.msn.com/FMSAustralia 

-----Original Message-----
From: Phsst [mailto:phsst@xxxxxxxxx] 
Sent: Wednesday, 26 November 2003 2:35 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] StoRSI... was Re: Robustness


> That is simple, I think :)
> Liquidity and volatility are the major requirements
> 
> Cheers,
> Graham

Graham & others,

Graham's comment inspired the following Explore for Liquidity and
Volatility. Click on Volatility columns for sorted order of volatility.
Notes follow:

//-----------------------------------------------
// Liquidity & Volatility
DailyDollarVolume = V * ( (O + H + L + C) / 4);
AvgDollarVolume = MA(DailyDollarVolume, 30);
topLiquid = IIf(LastValue(AvgDollarVolume > 100000000),1,0);

// The above $100,000,000 figure is for U.S. Mkts which selects about 160 of
the most active issues... modify for your own Mkts.

// Next four (4) from Chuck
//Method A (written for understanding, NOT saving space in the
window):    
    myAverage = MA(Close,10);
    NonStdDev = HHV(abs(Close-myAverage),10);
    APercentVolatility = NonStdDev / Close * 100;
 
//Method B:
    BPercentVolatility = StDev(Close,10) / Close * 100;
 
//Method C:
    CPercentVolatility = ATR(10) / Close * 100;
 
//Here is another one:
   A1PercentVolatility = StDev(C,10) / MA(C,10) * 100;

// From Gosub
GM_Vol = (MA(ATR(14),5) / MA(((H+L)/2),14))*100;

// Hist Volatility from Pal
HistVolatility = 100 *StDev(log(C/Ref(C,-1)), 90) * sqrt(365);

/*
InstHldgs = GetExtraData("InstHolds");
Beta = GetExtraData("Beta");
PEG = GetExtraData("PEG");
QRS = GetExtraData("QRS");
IssueType = GetExtraData("IssueType");
*/
Filter = TopLiquid AND Status("LastBarinrange"); AddColumn(Close,"Close",
6.2); AddColumn(AvgDollarVolume,"AvgDollarVolume",10.0);
AddColumn(APercentVolatility,"A%V",1.2);
AddColumn(BPercentVolatility,"B%V",1.2);
AddColumn(CPercentVolatility,"C%V",1.2);
AddColumn(A1PercentVolatility,"A1%V",1.2);
AddColumn(GM_Vol,"GM_Vol",1.2); AddColumn(HistVolatility,"HistVol",1.2);
// ----------------------------------------

The above Explore includes six (6) different measurements of volatility as
posted by a few members of our group. My notes from their posts follow:

From:   "Chuck Rademacher" <chuck_rademacher@xxxx>
Date:  Tue Apr 15, 2003  5:51 am
Subject:  RE: [amibroker] Average price volatility in percent

Several ways come to mind.  Examples based on ten-day volatility:
 
Method A (written for understanding, not saving space in the window):    
 
    myAverage = MA(Close,10);
    NonStdDev = HHV(abs(close-myAverage),10);
    PercentVolatility = NonStdDev / Close * 100;
 
Method B:
 
    PercentVolatility = StDev(Close,10) / Close * 100;
 
Method C:
 
    PercentVolatility = ATR(10) / Close * 100;
 
Here is another one:

PercentVolatility = StDev(C,10) / MA(C,10) * 100;
-------------------------------------------------------
From: "gosub283" <gosub283@xxxxxxxxx>
Subject: Re: Average price volatility in percent

Hi UM,

Here's a volatility indicator I posted a few
weeks ago which plots the volatility
as a percentage of the close price over the
same period.
I also threw in a trigger line.
Hope this helps...

Gosub283

Description:
 The standard Average True Range (ATR) indicator
 is only usefull as a reference over the period
 which it is set. As the stock price climbs or
 drops significantly, previous ATR value are useless
 when compared to current values. This makes it
 impossible to set ATR thresholds in software systems.
 The GM Volatility indicator divides the ATR value
 by the average close price over the same period,
 thereby showing range volatility as a percentage
 of the average price regardless of time or $ value.
 Values less than 3 are normal while value greater
 than 4 indicate high daily volatility.
 The GM_Volatility indic. is usefull at all times
 and floats between 0 and approx.+10% regardless
 of price change over time.

 EG: A value of 2% means that the daily Low-to-High
    fluctuates 2% of the average close price
    over the last 14 days. (lower volatility)

    A value of 7% means that the daily 'Low-to-High'
    fluctuates 7% of the average close price
    over the last 14 days. (Higher volatility)
*****************************************************/                
       

GM_Vol = (MA(ATR(14),5) / MA(((H+L)/2),14))*100;
Graph0 = GM_Vol;
Graph1 = MA(GM_Vol,10);

-------------------------------------


And finally from Pal's post today:

HistVolatility = 100 *StdDev(log(C/Ref(C,-1)), Period) * SquareRoot
(365)

-------------------------------------

As you can see, I was a little bored tonight.

Regards,

Phsst



------------------------ Yahoo! Groups Sponsor ---------------------~--> Buy
Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark Printer
at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/