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

Re: [amibroker] Programing help needed



PureBytes Links

Trading Reference Links

I believe this is off the AB website function list, but not sure...
 

function crBeta (Market,Stock, LB) {

MarketReturn = (Market-Ref(Market,-1)) / Ref(Market,-1);

StockReturn = (Stock-Ref(Stock,-1)) / Ref(Stock,-1);

MarketSquared = MarketReturn*MarketReturn;

StockSquared = StockReturn*StockReturn;

MS = MarketReturn * StockReturn;

AvgMarketDelta = Sum(MarketReturn,LB) / LB;

AvgStockDelta = Sum(StockReturn,LB) / LB;

SumOfMarketSquared = Sum(MarketSquared,LB);

SumofStockSquared = Sum(StockSquared,LB);

SumOfMS = Sum(MS,LB);

return (SumOfMS - (LB*AvgMarketDelta*AvgStockDelta)) /

SumOfMarketSquared - (LB*(AvgMarketDelta * AvgMarketDelta));

}

 

ForeignClose = Foreign("!SPX","Close",Fixup=1);

Beta = crBeta(ForeignClose,Close,256);

 

 

----- Original Message -----
From: ct1942
Sent: Monday, March 20, 2006 9:38 PM
Subject: [amibroker] Programing help needed

Does anybody have a scan for beta that they wouldn't mind sharing?

Thanks in advance.

Cordell





Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS