Skip to content

markowitz.views.exceptions

markowitz.views.exceptions

Exception hierarchy for the Black-Litterman view-construction subsystem.

BlackLittermanError

Bases: Exception

Base class for all errors raised by :mod:markowitz.views.

OmegaSpecificationError

Bases: BlackLittermanError

Raised when the view-uncertainty matrix Omega is mis-specified.

Triggered for shape mismatches, non-positive-definite supplied matrices, or inconsistent combinations of omega, omega_method and per-view confidences.

TauScaleError

Bases: BlackLittermanError

Raised when the prior-scaling parameter tau is invalid (non-positive).

ViewValidationError

Bases: BlackLittermanError

Raised when a user-supplied view fails structural validation.

Examples:

  • A relative view whose pick-row coefficients do not sum to zero.
  • A view that references an asset which is not present in the universe.
  • A confidence value outside the closed interval [0, 1].