Skip to main content

High Beta Stock Scanner for Amibroker (AFL)

Peeyush91084 about 7 years ago Amibroker (AFL)

  • Rating:
    5 / 5 (Votes 1)
  • Tags:
    amibroker, scanner

As mentioned in the title the purpose of this is to simply select high beta stocks. Try it out and do let me know about it.

A beta coefficient is a measure of the volatility, or systematic risk, of an individual stock in comparison to the unsystematic risk of the entire market.

In the parameters you need to select your index symbol for this formula to work.

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("High Beta Scanner");



ticker=ParamStr( "Ticker", "NIFTY" );

P=Foreign(ticker,"C",1);

Periods=Param("period",21,1,50,1);



Beta=(( Periods * Sum(ROC( C,1) * ROC(P,1),Periods )) - (Sum(ROC(C,1),Periods) *

Sum(ROC( P,1),Periods))) / ((Periods * Sum((ROC(P,1)^2 ),Periods)) -

(Sum(ROC(P,1 ),Periods)^2 ));



Plot(beta,"Beta",colorRed,styleLine);



Filter =beta>1.5;

AddColumn(beta,"BETA",1.2);



_SECTION_END();

2 comments

over 6 years ago

The Beta code formula can convert more simple way

ticker = ParamStr( "Ticker", "NIFTY" );
P = Foreign( ticker, "C", 1 );
Periods = Param( "period", 21, 1, 50, 1 );

RocX = ROC ( C, 1 );
RocY = ROC ( P, 1 );

Beta = Correlation( RocX, RocY, Periods ) * StDev( RocX, Periods ) / StDev( RocY, Periods );

Enjoy it.

2. niladri
about 5 years ago

Usage:

1)Save AFL in your Program Files→Amibroker→Formulas→Exploration Folder and Set the Benchmark Index in the AFL code line 3.
2)Open New Analysis → Settings → Choose Periodicity as Daily
3)Select All Symbols from the Apply To drop down menu
4)Select the range option to 1 Recent Day(s)
5)Press Explore Button
6)You are Done

Leave Comment

Please login here to leave a comment.