Back to Community
ImportError: No module named quantopian.optimize.experimental

I was trying to setup constraint for the RiskModelExposure and got this error. Has anything changed recently moving away from experimental?

4 responses

This happens when I run debuger into this block:

import quantopian.optimize as opt  
    constrain_sector_style_risk = opt.experimental.RiskModelExposure(  
        min_momentum=-0.1, max_momentum=0.1,  
        min_value=-0.1, max_value=0.1,  
        min_volatility=-0.1, max_volatility=0.1,  

Aged bug in the debugger, like fine wine.

Really? No fix for so long?

Since at least Feb 2018. Graciously I was thanked for the report back then, saying it will be filed. I gathered that people are not using the debugger very much, sad because it is so useful.

If they might be inclined to fix it at some point:

1. Clone the first algo at
2. No changes
3. Set a breakpoint on line 101
4. 'Build Algorithm'
5. When the debugger breaks in, press the triangle icon to resume, 5 times

ImportError: No module named quantopian.optimize.experimental

Ignore the warning about QTradableStocksUS which was not occurring at that time.