Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
I set MAX_POSITION_SIZE = 0.01, but when I run the algorithm, it has 400 positions after optimization... is it a bug?

MAX_POSITION_SIZE = 0.01

objective = opt.MaximizeAlpha(combined_alpha)  

constraints = []  

constraints.append(opt.MaxGrossExposure(1.0))  

constraints.append(opt.DollarNeutral())  

constraints.append(  
    opt.PositionConcentration.with_equal_bounds(  
        min=-MAX_POSITION_SIZE,  
        max=MAX_POSITION_SIZE  
    ))  

where my combined_alpha is the quantile of the stocks belongs to like:

2007-05-09 22:30 PRINT Equity(2 [ARNC]) 9
Equity(24 [AAPL]) 9
Equity(31 [ABAX]) 1
Equity(41 [ARCB]) 3
Equity(52 [ABM]) 9
Equity(62 [ABT]) 8
Equity(64 [ABX]) 8
Equity(65 [ABY]) 4
Equity(67 [ADSK]) 8
Equity(76 [TAP]) 7
Equity(85 [ACF]) 3
Equity(88 [ACI]) 1
Equity(99 [ACO]) 2
Equity(107 [ACV]) 7
Equity(110 [RAMP]) 8
Equity(114 [ADBE]) 5
Equity(115 [ADCT]) 7
Equity(122 [ADI]) 6
Equity(128 [ADM]) 1
Equity(154 [AEM]) 3
Equity(161 [AEP]) 2
Equity(166 [AES]) 3
Equity(168 [AET]) 9
Equity(185 [AFL]) 6
Equity(197 [AGCO]) 9
Equity(198 [AGE]) 6
Equity(202 [AGII]) 5
Equity(205 [AGN]) 2
Equity(209 [AM]) 9
Equity(216 [HES]) 2
..
Equity(27908 [CPA]) 7
Equity(27912 [SPSN]) 0
Equity(27943 [LYV]) 0
Equity(27990 [MIR]) 9
Equity(27995 [CXG]) 3
Equity(27997 [WN...
.... I am wondering why would this happen? should I increase quantiles number?