Skip to content

In quantative finance world, maimum drawdown is an important factor in strategy choosing, even more important than sharpe ratio

Notifications You must be signed in to change notification settings

GreatYoungShaw/Calculating-maximum-drawdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Calculating-maximum-drawdown

In quantative finance world, maximum drawdown is an important factor in strategy choosing, even more important than sharpe ratio

To get the maximum drawdown within fastest time, the time complexity O(N) is a cosideration.

In slow algo, drawdown in done through data traversing of differential value. which is X = max(array[0:i+1) Overall complexity being O(N^2)

In fast algo, drawdown is completed through comparsion, which is X = max(array[i+1], previous max value) Overall complexity being O(N)

Ofcourse, python one line code with inserted function is np.argmax((np.maximum.accumulate(Asset) - Asset) / np.maximum.accumulate(Asset))

About

In quantative finance world, maimum drawdown is an important factor in strategy choosing, even more important than sharpe ratio

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published