Question: A stock's beta coefficient can be calculated using the following equation: B- = ^2 Vi, a. Write a user-defined function that can calculate the beta

A stock's beta coefficient can be calculated using the following equation:
B- = ^2
Vi,
a. Write a user-defined function that can calculate the beta coefficient. The arguments 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, MARKETVAR AS SINGLE).
b. Rewrite your function so that it accepts ranges of returns and then calculates the beta directly from the returns. It should be defined as: BETA (STOCKRETURNS AS RANGE, MARKETRETURNS AS RANGE). Your function should make use of Application. Work sheet Function to calculate the covariance and variance (use Excel's COVARS and VARS 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.

Step by Step Solution

3.50 Rating (170 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

tr msoheightsourceauto col msowidthsourceauto br msodataplacementsamecell style16 msonumberformat 000 000 00220022 msostylenameComma msostyleid3 style0 msonumberformatGeneral textaligngeneral vertical... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (1 attachment)

Excel file Icon

624-B-A-F-A (2220).xlsx

300 KBs Excel File

Students Have Also Explored These Related Accounting Questions!