Basic information on financial databases: cook books, tips and tricks & economic news

This blog contains schematic easy to grasp - hands on - help in performing searches in economic databases, making work sets and making them inter-exchangeable between the databases.

* Disclaimer. I am not a finance professional. Most posts are the result of personal findings.

Note:
All presented images are scaled and can be enlarged to original size (click the picture).

Search This Blog

Showing posts with label BETA. Show all posts
Showing posts with label BETA. Show all posts

9/30/2014

WRDS CRSP Betas

Until today I didn't know you can download betas from WRDS > be it limited, it is possible
(only US and only AMEX or NASDAQ)
I'll show you how.

Note: it is helpful to be familar with Compustat, Compustat - CRSP merged and how they relate.
CRSP - Compustat

Open up the CRSP database.
Select " Stock / Portfolio Assignments"
Select Betas deciles
From WRDS database:  Each portfolio time series is based on a portfolio type defined by CRSP and contains a history of statistics and portfolio assignments for a security. The portfolio time series can be linked to CRSP index returns data to calculate excess returns of a security against its assigned index portfolio at any time during its history.













What you can do, is retrieve a work set from another database or index constituent.

Looking up a single security: Microsoft
(unfortunately WRDS CRSP doesn't say on  which Index the security is noted)


















The following is very important and determines whether you get output or not.
The safest bet is, when you draw a work set from either NYSE/ AMEX or NASDAQ, to stick with that index.

Example. From CRSP / COMPUSTAT merged.


Set Time period to investigate.
Search entire database.
Be certain to download Stock Exchange Code, as you have filter you output on that very code. 
Stock exchange code, e.g. Nasdaq (see also over view codes in Compustat manual or internet or here
Stock Exchange code for NYSE / AMEX is 11
NASDAQ is 14 

Note: this can result in very large output set of which you'll have to dismiss the majority of data since you are only interested in securities from NASDAQ or NYSE/ AMEX
Example exchange codes in output


















As for output size: this output set contained 13.000 plus rows
After using auto filter (data, use funnel symbol) filtering on exchange code 11 and removing duplicates (use company identifiers like CUSIP, CIK GVKEY or PERMNO, PERMCO)
10.000 plus unique securities remain.
Large output sets!
In this example I made a single file of the Permno and uploaded them into
Stock / Portfolio Assignments > Beta deciles
Output example (download as TAB delimited TXT and open with wizard int Excel)












Note: after downloading and opening a match has to be made between initial download of the filtered set and this output.

Another method is to download the Index constituent form either these indexes.
In Compustat North America the number of downloadable index constituents is imited.
i.e. NASDAQ 100
Look here
! NYSE AMEX not among them !



Be sure to download PERMNO and / or PERMCO








I tried both and came up with either  no results or regular output.















Some helpful links
Adjusting company identifiers


Finabase: Finding historical beta in Datasream
 Financial databases and research blog

9/16/2014

Datastream: create list from range and find the historical beta

How to find betas and how to download them?
Not many databases offer this possibility, but Datastream does.

Without getting into the finer details of programming and constructing beta's it is possible to perform downloads with pre-made betas.
This post will show you how.
(assuming you are familiar with the basic functions of Datastream)

Uploading a list of companies
(e.g. from Stoxx 50)


















Press option Create from range. Next either store locally (the very computer you are working on) or upload to remote server (enabling to work with any computer with Datastream in the world)
Uploading will result in the following pop up








memorize the list code L#H23098 (in this case)

Go to Time series menu.
Either use button for locally stored list

or use the rule to write down the memorized list name







Next: finding the Beta
The BETA is defined as the measure of an asset's risk in relation to the market (often an index). 
The higher the beta, the better, as a rule as it shows the times return on an investment (simplified)

Use the button right under the orange datatypes button

















I have searched for beta. For a DataStream calculated historical beta take the second one.
Take note of the expression behind the name and code.
REGB#(LN#(Li)/LAG##(x(Li),1M)),LN#(X/LAG#(X,1M)),60M)
Select desired beta











Result. Historical betas.



















To those interested: this post goes deeper into the matter (Blog Mark Bruyneel)

9/01/2009

BETAs in Datastream

Beta's are used to measure the volatility of a share.

Static search is pretty easy, as the pic illustrates

Datastream:




























Only the the latest calculated BETA can be retrieved from Datastream as a number for active equities.
Static Request is needed.





But what is a beta?





Betas compare the movement of a stock against the market. Over a period it expresses the relative movement of the price against the market.

Calculation method:


The beta factor is derived by performing a least squares regression between adjusted prices of the stock and the corresponding Datastream market index.
The Datastream beta factor is calculated using stock prices and market indices as the only variables.
Calculation is explained here (click link)
Calculations in Excel:


  

The following site explains how to calculate your own Betas
http://financetrain.com/how-to-calculate-stock-beta-in-excel/

First step is : downloading prices for stock (P) and benchmark index (Pi) (the index it is traded)

2nd step: Calculate % returns: =((Cell2-Cell1)/(Cell1)*100
(see image above)

Step 3, Beta:
(1 option) Beta = Covar(rs - rm)/ var(rm)
rs = return stock and rm is return market


(2 option) (excel’s slope function) Beta = SLOPE(range of % change of equity, range of % change of index)   (see image above for equity)


Historic BETAs can be calculated through the following formula:

REGB#(LN#(X/LAG#(X,1M)),LN#(Y/LAG#(Y,1M)),60M)
X = market index (e.g. TOTMKUK or FTALLSH) Y = equity (e.g. MKS)

Condition for your research is that the BETAs you calculated are from equities that are part of the same market Index, or else they can't be compared.

























Or you can use the menu (ready made formula's) here