Você está na página 1de 9

Date: 06/09/2014

Financial Modelling In Excel


Final Project Report- Calculation of Beta

Abstract
Beta () of an investment is a measure of the risk arising from exposure to
general market movements. It is a measure of the volatility, or systematic
risk, of a security or a portfolio in comparison to the market as a whole.
Beta is used in the capital asset pricing model (CAPM), a model that
calculates the expected return of an asset based on its beta and expected
market returns.
We will use monthly stock return data, for some of the Indian companies,
for the past few years, in India to find their betas. Betas will be calculated
using linear regression. Calculation of betas will help us in analysing the
risk and return of companies, thereby enabling us to manage a portfolio
well.
Details about project
This application uses monthly stock return data for many of the largest
companies in the India to find their "betas". The stock return data are in a
separate file called Market Data and this should be in the same directory
as the current workbook. The "beta of the stock can estimated for any of
the companies in the Market Beta file, and it is based on period ranging

from 1/4/2004 to 1/9/2014. There are four possible optimization criteria:


(1) sum of squared errors (2) weighted sum of squared errors (3) sum of
absolute errors and (4) minimax (minimize the maximum absolute error).
Solver performs the appropriate optimization, based on the criterion
specified. The Market Data file is set up so that each company has its own
data sheet, with monthly closing from April 2004 to September 2014, and
corresponding percentage change. Similar sheets for other companies can
be added by the user. Any additional sheet should be named with the
company's ticker symbol, and the name of the company should be
entered in cell A1 of its sheet. There is also market data for the same time
period in the sensex sheet of the Market Data file.

The CAPM Model


The capital asset pricing model(CAPM) is a model that gives you an
appropriate expected rate of return (cost of capital) for each project if you
give it the projects relevant risk characteristics. The model states that an
investments cost of capital is lower when it offers better diversification
benefits for an investor who holds the overall market portfolioless
required reward for less risk contribution. Market beta is its measure of
risk contribution. Projects contributing more risk (market beta) require a
higher expected rate of return for you to want them; projects contributing
less risk require a lower expected rate of return for you to want them. This
is the precise relationship that the CAPM gives you.
To estimate the expected rate of return for a project or a firm i.e. the cost
of capital, you need three inputs according to the CAPM Model:
1. The risk-free rate of return, Rf
2. The expected rate of return on the overall market, E(Rm)
3. A firms or projects beta with respect to the overall market, i
The CAPM formula is
E(Ri) = Rf + [E(Rm)-Rf].i
Where i is the name of your project and E(Ri) is your projects expected
rate of return.
Use of Beta in CAPM
In a world where non-linearity and randomness are the norm, the capital
asset pricing model (CAPM) is widely accepted despite it being a linear
model, and this is probably due to the simplicity of the model. A well
recognized and utilized metric in finance is beta (), which is the slope in
the linear CAPM. To derive one simply plots the returns (capital gains
plus dividend yields) of an individual stock (y-axis) against the returns of a
well diversified portfolio of stocks (x-axis), with the resulting slope being

called . Thus represents the risk associated with an individual stock, as


it is compared to a well diversified portfolio, and since the market portfolio
theoretically only contains market risk, a above (below) one reflects the
degree of company-specific risk of the individual stock that should be
diversified away as it is added to the market portfolio.
In finance, the beta () of an investment is a measure of the risk arising
from exposure to general market movements as opposed to idiosyncratic
factors. The market portfolio of all investable assets has a beta of exactly
1. A beta below 1 can indicate either an investment with lower volatility
than the market, or a volatile investment whose price movements are not
highly correlated with the market. An example of the first is a treasury bill:
the price does not go up or down a lot, so it has a low beta. An example of
the second is gold. The price of gold does go up and down a lot, but not in
the same direction or at the same time as the market.
A beta above one generally means that the asset both is volatile and
tends to move up and down with the market. An example is a stock in a
big technology company. Negative betas are possible for investments that
tend to go down when the market goes up, and vice versa. There are few
fundamental investments with consistent and significant negative betas,
but some derivatives like equity put options can have large negative
betas.
Beta is important because it measures the risk of an investment that
cannot be diversified away. It does not measure the risk of an investment
held on a stand-alone basis, but the amount of risk the investment adds to
an already-diversified portfolio. In the capital asset pricing model, beta
risk is the only kind of risk for which investors should receive an expected
return higher than the risk-free rate of interest.
The definition above covers only theoretical beta. The term is used in
many related ways in finance. For example, the betas commonly quoted in
mutual fund analyses generally measure the risk of the fund arising from
exposure to a benchmark for the fund, rather than from exposure to the
entire market portfolio. Thus they measure the amount of risk the fund
adds to a diversified portfolio of funds of the same type, rather than to a
portfolio diversified among all fund types.

Walk through of application

Step 1: Open the file Market Beta.xlsm. The following excel sheet
opens. It explains the objective of the application. It has a Click Me
button which takes user to the next step of the program.

Step 2: On clicking the Click me option the following user form comes
which allows user to select the company from the list of companies
provided.

Step 3: Select a company from the list and select Calculate

Sub RunModel()

Dim message As String


Dim beta As Double
With Worksheets("MODULE")
.Visible = True
.Activate
End With

Application.ScreenUpdating = False
Application.DisplayAlerts = False
Call CreateCompanyList
frmCompany.Show
Call CopyData

Range("B11").Select
Step
4: On clicking calculate, the underlying program calculate beta value
Selection.End(xlDown)).Name
= "Market"
for Range(Selection,
the company selected
and displays the result
in the form of message

boxRange("C11").Select
as shown below:
Range(Selection, Selection.End(xlDown)).Name = "Stock"

Range("B2").Formula = "=Covariance.P(Market,Stock)"
Range("B3").Formula = "=Var.P(Market)"
Range("B4").Formula = "=B2/B3"
beta = Range("B4").Value
message = "The BETA for " & company & " is " & Format(beta, "0.000") & "."
With Worksheets("BETA CALCULATION")
.Visible = True

Code for the application


.Activate
End With
Option Explicit
With Worksheets("MODULE")
.Visible = False
Public ticker As String, company As String
End With
Public dataFile As Workbook
MsgBox message, vbInformation, "BETA"
End Sub

Sub CreateCompanyList()

Dim ws As Worksheet
Dim i As Integer

Range("Companies").ClearContents

On Error GoTo MissingFile


Set dataFile = Workbooks.Open(ThisWorkbook.Path & "\Market Data.xlsx")
ThisWorkbook.Activate

i=0
With Worksheets("MODULE").Range("Z1")
For Each ws In dataFile.Worksheets
If ws.Name <> "SENSEX" Then
i=i+1
.Offset(i, 0).Value = ws.Name
.Offset(i, 1).Value = ws.Range("A1").Value
End If
Next
Range(.Offset(1, 0), .Offset(i, 1)).Name = "Companies"

End With
Exit Sub

MissingFile:
MsgBox "There is no Stock Data.xlsx file in the same folder as this " _
& "workbook, so the application cannot continue.", _
vbExclamation, "Missing file"
End
End Sub

Sub CopyData()

With Range("A10")
Range(.Offset(1, 0), .End(xlDown).End(xlToRight)).ClearContents
End With

With dataFile.Worksheets("SENSEX").Range("A3")
Range(.Offset(0, 0), .End(xlDown)).Copy
Range("A11").PasteSpecial xlPasteValues
Range(.Offset(0, 2), .Offset(128, 2)).Copy
Range("B11").PasteSpecial xlPasteValues

End With

With dataFile.Worksheets(ticker).Range("A3")
Range(.Offset(0, 2), .Offset(128, 2)).Copy
Range("C11").PasteSpecial xlPasteValues

End With

dataFile.Close

End Sub

Using the above financial model in MS Excel one can easily calculate the Beta
value of any stock. For this we just need to add historic data of the firm to Excel
sheet Market Data. This would help the investors to analyse the degree of risk
while investing in a particular stock.

References:
http://www.investopedia.com
http://thismatter.com
http://chandoo.org

Você também pode gostar