Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I have a full comprehension of how to perform this assignment without VBA, but I'm a little confused on how everything should be set up
I have a full comprehension of how to perform this assignment without VBA, but I'm a little confused on how everything should be set up in VBA. I have some of the code started, but I'm not sure if I'm on the right track. Would greatly appreciate any help offered.
Thanks,
Retrieve monthly returns for 10 securities: stocks, ETFs and/or ADRs from January 1, 2003 to December 31, 2014. Create macro / subroutine that takes the following as inputs a beginning date, ending date, a true/false parameter for leverage (max -50%) and the margin loan rate (monthly). Create the constrained optimized portfolio with no short sells. Display the following programmatically: security ID and weights, portfolio annualized return and standard deviation, and Sharpe ratio. Error checks: the begin date is before the end date and a minimum of 18 months; margin loan rate is positive. Each function or subroutine would ideally perform a single task. The top level subroutine error checks and controls (calls) the other routines. Use comments to describe routines; indent for block code construct (ie For . . . Next) and use adequate white space. If you need to use a worksheet for interim calculation, be sure that your code clears it once it is no longer needed. The more calculations performed without the use of a worksheet the better the grade. Teams of 2 are allowed. The margin loan is assumed to have a standard deviation of 0. For the levered parameter any value other 0 or false is assumed to mean true. For example, 3 securities out would be: Parameters Begin date End date Levered Margin loan 1/1/2005 12/31/2009 False 0 Security IBM AAPL Etc. Weight .15 .05 ... Portfolio Stats Return St Dev Sharpe Ratio 8.2% 12.5% .88Step 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