|
Anthony's VBA Forum Where the knowledge is shared |
|
|
View previous topic :: View next topic |
Author |
Message |
Jay
Joined: 03 Oct 2008 Posts: 1
|
Posted: Fri Oct 03, 2008 12:08 pm Post subject: Error @ Variance |
|
|
Hi,
Firstly, thank you for posting VBA tutorials and code online. I think this site is a wonderful resource and I hope to learn a lot from it.
I created my own portfolio optimisation spreadsheet, but I did it the hard way - i.e. mostly using formulae in cells - so the VBA version intrigues me. (Also, my macros have an annoying tendency to crash the system!)
The issue I have with the code on this site is very minor and infuriating; namely, I don't know what values (data) to enter in the "Input" sheet.
I have access to all the stock data in the world, and my own spreadsheet calculates projected volatility using the equation:
SQRT [ Sigma {Weight.n^2 * Standard Deviation.n^2} + 2 * Weight.a * Weight.b * Cov(a,b) + 2 * Weight.a * Weight.c * Cov(a,c) ... ]
Etc.
I can't quite follow the code - although I've not yet really dug into it - but I don't know what to enter as 'Variance'.
I have calculated the standard deviation for stocks over 15 years (in most cases), and the variance and the covariance between stocks a and b (say), but I can't see how the former would apply in this instance and I get nonsensical results when I use each of the latter!
Any ideas?
Thanks,
Jay[/b] |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2002 phpBB Group
|