Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Style exposure constraint not being met

I am trying to understand why the style exposure is not met when I am utilizing the following constraint.

    factor_risk_constraints = opt.experimental.RiskModelExposure(  
        #context.risk_loading_pipeline,  
        context.risk_factor_betas,  
        version=opt.Newest  
    )

Is the constraint being ignored? Why is the algorithm not constraining the style exposure?

1 response

Hi Klaus, I'm assuming you ran a full backtest and saw you failed one of the 7 risk constraints. You can try manually constraining whichever style you were over/under exposed to by using the following (example: 0.01 = 1%). You can choose to set fixed values for all style type or specific to the one which go outside of the contest limits.

factor_risk_constraints = opt.experimental.RiskModelExposure(  
            context.risk_factor_betas,  
            version=opt.Newest,  
            min_momentum = -0.01,  
            max_momentum = 0.01,  
            min_size = -0.01,  
            max_size = 0.01,  
            min_value = -0.01,  
            max_value = 0.01,  
            min_short_term_reversal = -0.01,  
            max_short_term_reversal = 0.01,  
            min_volatility = -0.01,  
            max_volatility = 0.01,  
            )