quantlab.portfolio.config.ReturnViewConfig#

class quantlab.portfolio.config.ReturnViewConfig(*, annual_return=None, store=None, variable=None, confidence=None, std=None)[source]#

Bases: FrozenConfig

The fields every user view of a BlackLittermanOptimizer shares: its value and uncertainty.

The view is an annualised return, annual_return or the series variable of the zarr store store on timestamp (exactly one of the two), with confidence or std (exactly one). Each view config subclasses it with what the view is on.

Examples

>>> cfg = MarketReturnViewConfig(annual_return=0.06, confidence=0.5)
>>> isinstance(cfg, ReturnViewConfig), cfg.store is None, cfg.std is None
(True, True, True)
annual_return = None#

The annualised return, constant at every bar.

confidence = None#

Idzorek’s confidence C in (0, 1]: the view’s variance is tau (1 - C)/C times the prior variance of the viewed return.

std = None#

The view’s standard deviation, annualised like the return and converted to the span the same way (times span / 252); positive.

store = None#

A zarr store holding the annualised return as a series on timestamp; the value at a bar is the last finite one dated at or before it.

variable = None#

The store’s variable holding the series; required with store.