quantlab.portfolio.predefined.top_n#

Equal-weight top-n selection, the simplest portfolio construction rule.

TopNConstructor ranks the symbols of a bar by one label’s prediction and holds the top top_n with equal weights, or with direction="long_short" also shorts the bottom top_n, around the locked positions it must keep.

Classes

TopNConstructor

Equal-weight top-n selection on each rebalance bar.