Professional Documents
Culture Documents
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
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.
Sub RunModel()
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
Sub CreateCompanyList()
Dim ws As Worksheet
Dim i As Integer
Range("Companies").ClearContents
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