I have to loop through the following code several hundred times, so I am trying to determine if there is a faster way to code what i have already written. I do not believe there is another way to execute what i have sritten without using the multiple for loops that I have, but if anyone has any ideas I would love to hear them.
Thanks!
Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
Please Login or Register to view this content.
I have attached the workbook that I am using that may make it more clear what the code is doing. It is calculating the hurst exponent, a statistic that measures persistence or anti-persistence of time series data. In order to calculate this, the macro needs to calculate statistics such as standard deviation of the data up until each point before the end date. I am looking to see if there is a way to do this other than using a for loop. It is the second for loop that is slowing the program down I believe, but any suggestions as to how to improve the program would be appreciated.
Note: The code as it is now will take about 8ish seconds to run, but I am looking to run this over hundreds of time periods at least and those seconds add up
I realize the code is rather complicated. If anyone would even have another method that I could look into in order to make it run quicker I would appreciate that as well, I do not necessarily need any rewritten code.
Thanks!
Bookmarks