heggalompen
New Member
- Joined
- Nov 29, 2017
- Messages
- 1
Hi all,I am trying to program something in VBA. The inputs are matrices which varies on the amount of stocks, which is unfortunately not the same all the time.I already managed to get VBA to calculate 4 constants (A, B, C, D) with the matrices as input, there will always be only 4 constants, but they depend on the input of course. These 4 constants are calculated with the function letters (see attachment). The next thing is that I want to calculate minimum variance portfolio weights, which could be done with the following excel formula: MMULT(inverse covariance matrix, 1-vector) / C. I tried to program this into VBA with the help of google but it is not really working. I hope the problem is a bit clear by my text and the attachted excel file including the vba code letters and my attempts for the portfolio weights (minvar and minvar2).
Link to excel/vba-file:
https://files.fm/u/6djneetk#_All tips are more than welcome!Thanks in advance,
- Thomas
Link to excel/vba-file:
https://files.fm/u/6djneetk#_All tips are more than welcome!Thanks in advance,
- Thomas