Question: (a) Develop a user defined function MyVar that calculates a variance by using the following equation: MyVar = 5 17 (3x7 Avg) 2n-1 where

(a) Develop a user defined function "MyVar" that calculates a variance by using the following equation: MyVar = 5 17 (3x7 Avg) 2n-1 where Avg represents the average of variable X,. Use the values given on the sheet "P3a" to test the function. Remember that this function must have three arguments (X, Avg, and n). (b) Develop a user defined function "MySummer" that calculate the weighted average with the equation, MySummer (log(5x1) + xi (log (5x) +2x) . Use the values given on the sheet "P3a" to test the function. Reminder: this function must have two arguments, X, and n. (c) Write a macro function to estimate the Macaulay duration. Use the values given on sheet "P3a" to test your function. (d) Suppose Hollande Company uses debt, preferred stock and common stock to finance its capital budget and uses CAPM to compute its cost of equity. The capital structure is 25% debt, 32% preferred stock and 43% common stock. Before tax cost of debt is 4.35% and tax rate is 21%. The cost of preferred stock is 11.25%. The Risk free rate = 2.25% and market risk premium = 9.57%. Hollande Company has a beta of 1.51. Write a user defined function to compute the WACC. Hint the WACC is given by: WACC = Wd*Rd*(1-t) + Wps*Rps + Wcs*Rcs
Step by Step Solution
There are 3 Steps involved in it
a Here is the user defined function to calculate variance Function MyVarX Avg n Dim sum ... View full answer
Get step-by-step solutions from verified subject matter experts
