Anthony's VBA Forum Index Anthony's VBA Forum
Where the knowledge is shared
 Anthony's VBA Forum IndexHome Page
 Anthony's VBA Forum IndexForum Index
Log in to check your private messagesMessages
Log inLogin/Out

Quick Search

Advanced Search


Who's Online
[ Administrator ]
[ Moderator ]

Error @ Variance

Post new topic   Reply to topic     Anthony's VBA Forum Index -> Portfoilio Optimization
View previous topic :: View next topic  
Author Message

Joined: 03 Oct 2008
Posts: 1

PostPosted: Fri Oct 03, 2008 12:08 pm    Post subject: Error @ Variance Reply with quote


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) ... ]


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?


Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Anthony's VBA Forum Index -> Portfoilio Optimization All times are GMT - 4 Hours
Page 1 of 1

Jump to:  
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