This is to clarify what MaximizeAlpha does, that it doesn't allocate proportionally to the alpha signals we supply. It is reasonable to assume many of us have been operating with the belief due to wording like this in Lesson 7 Portfolio Management. Emphasis mine.
We will use MaximizeAlpha, which will attempt to allocate capital to assets proportional to their sentiment scores.
Shown in the backtest below, the sentiment scores are not used proportionally. Someone might want to edit that page.
Help, on the other hand is clear on this point in a few places:
Since MaximizeAlpha tries to put as much capital as possible to the assets with the largest alpha values, additional constraints are necessary to prevent the optimizer from trying to allocate “infinite” capital.
Without a constraint on gross exposure, this objective will raise an error attempting to allocate an unbounded amount of capital to every asset with a nonzero alpha.
Without a constraint on individual position size, this objective will allocate all of its capital in the single asset with the largest [supplied alpha value] expected return.
Other areas may have the potential of generating a different notion in the mind of the reader, maybe that their alpha values could have proportional significance:
Ideally, alphas should contain coefficients such that alphas[asset] is proportional to the expected return of asset for the time horizon over which the target portfolio will be held.
MaximizeAlpha takes a Series mapping assets to “alpha” values for each asset, and it finds an array of new portfolio weights that maximizes the sum of each asset’s weight times its alpha value.
Rather than any operation involving "times its alpha value", to be clear, MaximizeAlpha allocates up to PositionConcentration when present, most often the maximum position concentration, and stops allocating when it reaches a limit based on other constraints.
This backtest is cloned from the Lesson 7 link above with Optimization weights logging code added, show_opt_weights().
The source contains output for four trading days.
Observations
Excerpts
There are times when the alpha input signals are zero yet positions are modified rather than closed.
2016-01-11 06:31 show_opt_weights:224 INFO
alpha old new pct
0.000000 -0.013653 => -0.010581 77.5% Equity(19509 [PB])
0.000000 -0.014005 => -0.010853 77.5% Equity(17448 [SLG])
0.000000 -0.014122 => -0.010880 77.0% Equity(3128 [TGNA])
0.000000 -0.014578 => -0.011208 76.9% Equity(25837 [MGLN])
0.000000 -0.014589 => -0.011170 76.6% Equity(38760 [CLNY])
0.000000 -0.014614 => -0.011199 76.6% Equity(1995 [CUZ])
0.000000 -0.014851 => -0.011311 76.2% Equity(42811 [TUMI])
0.000000 -0.014468 => -0.010993 76.0% Equity(46694 [IMS])
0.000000 -0.015006 => -0.011396 75.9% Equity(21975 [ALE])
Some existing positions with alpha signals are closed. (Surely no longer among the strongest signals)
Close
alpha old new
0.047475 0.007497 => 0 Equity(301 [ALKS])
0.593333 0.015064 => 0 Equity(5303 [NHI])
0.486667 -0.016469 => 0 Equity(5634 [OKE])
0.140000 0.013884 => 0 Equity(5769 [PBCT])
0.000000 0.015034 => 0 Equity(6190 [PSB])
-0.136667 -0.013643 => 0 Equity(8233 [WNC])
Indicators to swap short/long instead closed (same as above).
alpha old new
-1.066667 0.011697 => 0 Equity(1942 [CTB])
1.900000 -0.013903 => 0 Equity(3219 [GK])
0.750000 -0.013526 => 0 Equity(6297 [QDEL])
2.230000 -0.014115 => 0 Equity(8278 [WIBC])
0.273333 -0.013332 => 0 Equity(13508 [CLB])
1.890000 -0.013395 => 0 Equity(16059 [NUS])
1.686667 -0.003494 => 0 Equity(17632 [CHRW])
1.266667 -0.013662 => 0 Equity(17646 [DRQ])
-0.090000 0.014392 => 0 Equity(32714 [LDOS])
1.900000 -0.014776 => 0 Equity(33879 [TRS])
Meanwhile it is also important to understand that weights are not always max_pos_size. Here, two are lower, surely due to other constraints that apply to them.
Open
alpha old new
-3.100000 0 => -0.015000 Equity(474 [APOG])
2.890000 0 => 0.015000 Equity(557 [ASGN])
2.500000 0 => 0.013172 Equity(1942 [CTB])
-3.100000 0 => -0.015000 Equity(1995 [CUZ])
2.890000 0 => 0.015000 Equity(3037 [FSS])
-3.100000 0 => -0.015000 Equity(3128 [TGNA])
-3.100000 0 => -0.015000 Equity(3219 [GK])
2.500000 0 => 0.013423 Equity(3424 [AJRD])
So MaximizeAlpha can kind of be thought of as Maximize_Position_Concentration_for_Just_the_Strongest_Alpha_Signals
The Lesson 7 algo invests in 60 to 80 of 2000+ coming from pipeline.