# Drawdown formula

• I think I have run into excel limitations at last. My 32-core PC is finding it hard to calculate the running sum on a 250000 row column and I need to test

a few parameters which will lead to different values in this column. This running sum is used to create the account trading curve - find maximums on this curve and then subtract and subsequent data point from this maximum to get the drawdown. Now my pc refuses to create this curve due to overload.

I wonder if there is an alternative way to calculate maximum drawdown on a trading curve?

For this I need to find the maximum value of the difference between the earlier peak and the active point divided by the peak. Can this be done in a single formula?

here are some sample data points.

 -18.5 -28.5 71.5 61.5 51.5 41.5 31.5 31.5 21.5 11.5 1.5 -8.5 -18.5 -28.5 -38.5 -48.5 -58.5 41.5 31.5 21.5 11.5 111.5 101.5 91.5 81.5 181.5 171.5 161.5 151.5 141.5 131.5 121.5 111.5 101.5 91.5 81.5 81.5 71.5 61.5 51.5 41.5 31.5 21.5 11.5 1.5 -8.5 91.5 81.5 71.5 61.5 161.5 151.5 141.5 131.5 231.5 221.5 211.5 201.5 191.5 181.5 171.5 161.5 151.5 141.5 131.5 131.5 121.5 111.5 101.5 91.5 81.5 71.5 61.5 51.5 41.5 141.5 131.5 121.5 111.5 211.5 311.5 411.5 401.5 501.5 491.5 481.5 471.5 461.5 451.5 441.5 431.5 421.5 411.5 401.5 401.5 391.5 381.5 371.5 361.5 351.5 341.5 331.5 321.5 311.5 301.5 291.5 281.5 271.5 261.5 251.5 241.5 341.5 331.5 321.5 311.5 301.5 291.5 281.5 381.5 371.5 361.5 351.5 341.5 341.5 331.5 321.5 311.5 411.5 401.5 501.5 491.5 481.5 471.5 461.5 451.5 441.5 431.5 421.5 411.5 401.5 391.5 381.5 371.5 361.5 351.5 341.5 331.5 431.5 421.5 411.5 401.5 391.5 391.5 381.5 371.5 361.5 461.5 451.5 441.5 431.5 421.5 411.5 401.5 391.5 491.5 481.5 471.5 461.5 451.5 441.5 431.5 531.5 521.5 511.5 501.5 491.5 591.5 581.5 571.5 561.5 551.5 551.5 541.5 531.5 521.5 621.5 611.5 601.5 591.5 581.5 571.5 561.5 551.5 541.5 531.5 631.5 621.5 611.5 601.5 701.5
• In essense I need to find HOW STRAIGHT A LINE IS - now matter the slope....can it be done with the simple linest or intercept formulas? I woudl need to create a line and then compare the original curev to this line to see hwo far it digresses from the estimated line - is there a formula for this?

• IT TURNED OUT the running maximum formula was operating on 20 billion cells at one iteration - the solution was just running the high water mark when it changes - not calculating maximum on all previous cells - now in stead of 20 billion claucltotions the PC has to perform only 250 k - fabulous!