PureBytes Links
Trading Reference Links
|
I have
just uploaded a function to calculate beta. Here is the description that I
provided with that function:
<FONT face=Arial color=#0000ff
size=2>
This
function calculates beta for any stock against an index or another stock.
Caution... beta calculations typically have long lookback periods. This
could eat a lot of your data prior to generating any values. Most data
providers use a five year lookback (1225 days). I think you can have
meaningful beta figures using 125 to 250 days, particularly in the current
market conditions.
Beta
calculations usually take "risk-free returns" into consideration. This
function does not, as most AmiBroker users probably do not have access to the
relevant data. If there are enough people interested, I will release the
version that does use risk-free returns as part of the
formula.
The
following is an example of calculating beta against the S&P500 index for 125
days:
ForeignClose = Foreign(".SPX","Close",Fixup=1); Beta =
crBeta(ForeignClose,Close,125);
<FONT face=Arial color=#0000ff
size=2>
Yahoo! Groups Sponsor
ADVERTISEMENT
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|