quantlab.portfolio.config.RelativeFactorReturnViewConfig#

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

Bases: ReturnViewConfig

Config of RelativeFactorReturnView: a view on one factor’s return less another’s.

ReturnViewConfig’s fields and the two factors, by their names in the risk model: the view is f_outperformer - f_underperformer.

Examples

>>> cfg = RelativeFactorReturnViewConfig(
...     outperformer="style_book_to_price", underperformer="style_momentum",
...     annual_return=0.02, confidence=0.5,
... )
>>> cfg.outperformer, cfg.underperformer
('style_book_to_price', 'style_momentum')
outperformer#

The factor expected to earn annual_return more than the other.

underperformer#

The factor it is measured against.