Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
MaxDrawdown - odd calculation

Hi,
I want to calculate MaxDrawdown per all stock in universe (for full hisotry), for some stocks I got results bigger than 1 (100%).
How is that possible? Isnt it aginst the MaxDrawdown definition?

See code below

from quantopian.pipeline import Pipeline  
from quantopian.research import run_pipeline  
from quantopian.pipeline.data import EquityPricing  
from quantopian.pipeline.factors import MaxDrawdown


pipe = Pipeline()

def make_pipeline():

    # lets assume 3030 days is since begining of ages  
    dd = MaxDrawdown([EquityPricing.close], window_length=3030)  
    filter_ = dd>0.9

    return Pipeline(  
        columns={  
            'dd': dd,  
        },  
        screen=(  
            filter_  
        )  
    )

results = run_pipeline(make_pipeline(), '2018-12-20', '2018-12-20')  
print results