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

[amibroker] Alpha/Beta for Daily and Monthly Data


  • To: <amibroker@xxxxxxxxxxxxxxx>
  • Subject: [amibroker] Alpha/Beta for Daily and Monthly Data
  • From: "Ken Close" <ken45140@xxxxxxxxx>
  • Date: Mon, 11 Aug 2008 10:41:12 -0400
  • Authentication-results: gwout1 smtp.user=ksclose; auth=pass (LOGIN)

PureBytes Links

Trading Reference Links

Can someone help on this question:
 
I need to calculate Alpha and Beta for two sets of symbols for equity, one having daily data, and another set having monthly data.
 
1.  I am using these formulas for Alpha and Beta, yet the units for Alpha do not match those I can find on various web sites.
 
Formulas:
 

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

(Sum(ROC(C,1),Periods) * Sum(ROC( Mkt,1),Periods))) /

((Periods * Sum((ROC(Mkt,1)^2 ),Periods)) - (Sum(ROC(Mkt,1 ),Periods)^2 ));

Alpha = (Sum(ROC( C,1) ,Periods) - ( Beta ) * Sum( ROC( Mkt,1) ,Periods ) ) / Periods;
 
One article states that Alphas, according to Morningstar, range from -11 to 45 with an average of all funds around 2.  One such fund is listed having an Alpha of 11.5, and my calculation is 0.36.
 
So, do the formulas look right and does anyone have a representative measure of Alpha?
 
2.  I am having fits making the formulas calculate daily vs monthly data.  My attempts to use inMonthly timeframes does not work (values either blank or incorrect when compared to other sources.  Thus, I would like to have a single formula run and then manually select Monthly or Daily periodicity in the Settings box.  Is there a Status command that tells the code whether the periodicity is set on Monthly or Daily? 
 
3.  Further, I would like the "Periods" in the above formula to be determined from the date range, and I can calculate a "Periods" value when I am in Daily periodicity.  But, try as I might, I get Periods equal to zero unless I put in a manual setting for periods, say Periods = 12;.
This works for Daily, what would I use for a Periodicity of Monthly?

Index1 = ValueWhen( DateNum()== StartDate ,BarIndex(), 1);

Index2 = ValueWhen( DateNum()== EndDate ,BarIndex(), 1);

Enddate = ValueWhen(DateNum()==Enddate,DateTime(),1);

Periods = LastValue(Index2 - Index1);

 
Thanks for any suggestions,
Ken
 
 
 
 
 
 
 
 
 
__._,_.___

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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___