Answered step by step
Verified Expert Solution
Question
1 Approved Answer
A stock's beta coefficient can be calculated using the following equation: i=m2i,m a. Write a user-defined function that can calculate the beta coefficient. The arguments
A stock's beta coefficient can be calculated using the following equation: i=m2i,m 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: ETA(STReturns 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
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started