base
Metric protocol and MetricRegistry for the BRMS bank simulation.
Classes:
-
Metric–Protocol defining the interface for a computable bank metric.
-
MetricRegistry–Registry for Metric instances, keyed by MetricName.
Metric
Bases: Protocol
Protocol defining the interface for a computable bank metric.
Methods:
-
compute–Compute the metric value.
compute
compute(
bank: Any,
market_state: MarketState,
valuation_store: ValuationStore,
date: date | None = None,
) -> Any
Compute the metric value.
MetricRegistry
MetricRegistry(metrics: Iterable[Metric] = ())
Registry for Metric instances, keyed by MetricName.
Methods:
-
all_metrics–Return all registered metrics.
-
get–Retrieve a metric by name.
-
register–Register a metric.