Hi, folks,
I've been trying to write my first VBA code (or more appropriately, to modify a given code) and it has been, unsurprisingly, a failHere's what I have to achieve:
I have set up a portfolio, which is in the worksheet "Task". Basically, it is affected by 6 factors: the volatilities of Google, Amazon and Apple and the prices of Google, Amazon and Apple. I want to generate the following simulation: I want to replace cells C20 to C25 with randomly chosen values from the array I4:N729 (this is historical data of factor changes). I want to draw values from column I of the array to replace cell C20, values from column J to replace cell C21 and so on. I want to draw 50 values from the array (50 different numbers for each cell C20, C21, C22, C23,C24 and C25), keep the 50 portfolio value changes (cell E38) and calculate a percentile from these values. I want to do that 10 different times. However, it seems that something with my code is not working. Any help will be appreciated. Thank you!
Bookmarks