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

[amibroker] Re: Programing help needed



PureBytes Links

Trading Reference Links

Thanks for your help.

Cordell

--- In amibroker@xxxxxxxxxxxxxxx, "mric" <mric@xxx> wrote:
>
> 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 
>   To: amibroker@xxxxxxxxxxxxxxx 
>   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 
> 
>     a..  Visit your group "amibroker" on the web.
>       
>     b..  To unsubscribe from this group, send an email to:
>      amibroker-unsubscribe@xxxxxxxxxxxxxxx
>       
>     c..  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service. 
> 
> 
>
------------------------------------------------------------------------------
>






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

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

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