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.
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.
Chapter6: Risk And Return
Section: Chapter Questions
Problem 1Q
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
Recommended textbooks for you
Intermediate Financial Management (MindTap Course…
Finance
ISBN:
9781337395083
Author:
Eugene F. Brigham, Phillip R. Daves
Publisher:
Cengage Learning
Intermediate Financial Management (MindTap Course…
Finance
ISBN:
9781337395083
Author:
Eugene F. Brigham, Phillip R. Daves
Publisher:
Cengage Learning