Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

Beta Explorer & Indicator for stocks for Amibroker (AFL)
nimchand
almost 10 years ago
Amibroker (AFL)

Rating:
4 / 5 (Votes 6)
Tags:
BETA, amibroker, exploration

This is a simple explorer & Indicator which fetches the value of beta, which can be used for their own interpretation for risk management. Can modify the periods in the code according to their convenience.

Indicator / Formula

Copy & Paste Friendly
function Beta( BaseSymbol, N )
{
    Chg = ROC( C, 1 );
    ChgBase = ROC( Foreign( BaseSymbol, "C" ), 1 );

    return ( N * Sum( Chg * ChgBase , N ) - Sum( Chg, N ) * Sum( ChgBase, N ) ) / ( N * Sum( ChgBase ^ 2 , N ) - Sum( ChgBase, N ) ^ 2 );
}

symbol = ParamStr( "Symbol", "70001247" );

Plot( Beta( symbol, Param( "Periods", 21, 2, 100 ) ), _DEFAULT_NAME(), ParamColor( "Color", ColorCycle ) );

Filter = 1;

AddTextColumn( FullName(), "FullName" );
AddColumn( Close, "Close", 1.2 );
AddColumn( Beta( "70001247", 50 ), "Beta", 1.2 ); //Replace 70001247 with your Nifty Symbol here

2 comments

1. Masud

How can I use it?

2. nimchand

Its just an explorer, change your nifty(or any comparable index) symbol in the code & execute

Leave Comment

Please login here to leave a comment.

Back