quantlab.portfolio.config.ReturnViewConfig#
- class quantlab.portfolio.config.ReturnViewConfig(*, annual_return=None, store=None, variable=None, confidence=None, std=None)[source]#
Bases:
FrozenConfigThe fields every user view of a
BlackLittermanOptimizershares: its value and uncertainty.The view is an annualised return,
annual_returnor the seriesvariableof the zarr storestoreontimestamp(exactly one of the two), withconfidenceorstd(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
Cin(0, 1]: the view’s variance istau (1 - C)/Ctimes 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.