A stock's beta coefficient can be calculated using the following equation: B₁ = Oi, m σε m a. Write a user-defined function that can calculate the beta coefficient. The argu- ments to the function should be the covariance between the stock and market returns, and the variance of the market's returns. For example, BETA (COVAR AS SINGLE, MARKET VAR AS SINGLE). b. Rewrite your function so that it accepts ranges of returns and then calcu- lates the beta directly from the returns. It should be defined as: BETA(STOCK- RETURNS AS RANGE, MARKETRETURNS AS RANGE). Your function should make use of Application. WorksheetFunction to calculate the covariance and variance (use Excel's COVAR.S and VAR.S functions). In the code, be sure to check to see if the number of stock returns is equal to the number of market returns. The function should return an error if the count of returns is not equal.

Essentials Of Investments
11th Edition
ISBN:9781260013924
Author:Bodie, Zvi, Kane, Alex, MARCUS, Alan J.
Publisher:Bodie, Zvi, Kane, Alex, MARCUS, Alan J.
Chapter1: Investments: Background And Issues
Section: Chapter Questions
Problem 1PS
icon
Related questions
Question
A stock's beta coefficient can be calculated using the following equation:
B₁
=
Oi, m
σε
m
a. Write a user-defined function that can calculate the beta coefficient. The argu-
ments to the function should be the covariance between the stock and market
returns, and the variance of the market's returns. For example, BETA (COVAR AS
SINGLE, MARKET VAR AS SINGLE).
b. Rewrite your function so that it accepts ranges of returns and then calcu-
lates the beta directly from the returns. It should be defined as: BETA(STOCK-
RETURNS AS RANGE, MARKETRETURNS AS RANGE). Your function should make use
of Application. WorksheetFunction to calculate the covariance and variance
(use Excel's COVAR.S and VAR.S functions). In the code, be sure to check to
see if the number of stock returns is equal to the number of market returns.
The function should return an error if the count of returns is not equal.
Transcribed Image Text:A stock's beta coefficient can be calculated using the following equation: B₁ = Oi, m σε m a. Write a user-defined function that can calculate the beta coefficient. The argu- ments to the function should be the covariance between the stock and market returns, and the variance of the market's returns. For example, BETA (COVAR AS SINGLE, MARKET VAR AS SINGLE). b. Rewrite your function so that it accepts ranges of returns and then calcu- lates the beta directly from the returns. It should be defined as: BETA(STOCK- RETURNS AS RANGE, MARKETRETURNS AS RANGE). Your function should make use of Application. WorksheetFunction to calculate the covariance and variance (use Excel's COVAR.S and VAR.S functions). In the code, be sure to check to see if the number of stock returns is equal to the number of market returns. The function should return an error if the count of returns is not equal.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Essentials Of Investments
Essentials Of Investments
Finance
ISBN:
9781260013924
Author:
Bodie, Zvi, Kane, Alex, MARCUS, Alan J.
Publisher:
Mcgraw-hill Education,
FUNDAMENTALS OF CORPORATE FINANCE
FUNDAMENTALS OF CORPORATE FINANCE
Finance
ISBN:
9781260013962
Author:
BREALEY
Publisher:
RENT MCG
Financial Management: Theory & Practice
Financial Management: Theory & Practice
Finance
ISBN:
9781337909730
Author:
Brigham
Publisher:
Cengage
Foundations Of Finance
Foundations Of Finance
Finance
ISBN:
9780134897264
Author:
KEOWN, Arthur J., Martin, John D., PETTY, J. William
Publisher:
Pearson,
Fundamentals of Financial Management (MindTap Cou…
Fundamentals of Financial Management (MindTap Cou…
Finance
ISBN:
9781337395250
Author:
Eugene F. Brigham, Joel F. Houston
Publisher:
Cengage Learning
Corporate Finance (The Mcgraw-hill/Irwin Series i…
Corporate Finance (The Mcgraw-hill/Irwin Series i…
Finance
ISBN:
9780077861759
Author:
Stephen A. Ross Franco Modigliani Professor of Financial Economics Professor, Randolph W Westerfield Robert R. Dockson Deans Chair in Bus. Admin., Jeffrey Jaffe, Bradford D Jordan Professor
Publisher:
McGraw-Hill Education