Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Function that tells us the rolling 30-day drawdown of a security

Hi all,

Is there any function that tells is the rolling 30-day drawdown of a security?

For example, for Apple stock, is there a function that tells us the drawdown in the last 30 days given any particular date? Like
The max drawdown in the last 30 days prior to 7/7
The max drawdown in the lsat 30 days prior to 7/6