quantlab.portfolio.predefined.approximate.black_litterman.decide#

quantlab.portfolio.predefined.approximate.black_litterman.decide(rule, panel, prices=None, stopping=Stopping(tolerance=1e-05, max_iterations=20000))[source]#

Return every bar’s Black-Litterman weights of a decision panel.

The approximate mean-variance (mean_variance.decide) on each bar’s posterior (see the module docstring): every selectable symbol a candidate, candidate_top_k ranking the posterior mu.

Parameters:
ruleBlackLittermanOptimizer

The rule, bound to the predicted labels (its span read).

panelDecisionPanel

The bars’ decision inputs, the market factor among the factors.

pricesPanelPrices, optional

The book before the first bar and the prices it drifts with.

stoppingStopping

The kernels’ stopping rule.

Returns:
PanelSolution

Examples

With rule a bound BlackLittermanOptimizer over a factor risk model and panel a decision panel of its declared inputs:

>>> decide(rule, panel).weights.sum(axis=1)
array([1., 1.])