metrics_service
MetricsService: computes bank metrics and writes results to MetricStore.
Classes:
-
MetricsService–Service for computing bank metrics via a MetricRegistry.
MetricsService
MetricsService(metric_registry: MetricRegistry)
Service for computing bank metrics via a MetricRegistry.
Methods:
-
compute–Compute all registered metrics and write results to metric_store.
-
compute_all–Legacy compute_all: compute all metrics and return as a dict (no store needed).
-
compute_one–Compute a single metric by name and write it to metric_store.
compute
compute(
bank: Any,
market_state: MarketState,
date: date,
metric_store: MetricStore,
valuation_store: ValuationStore,
) -> None
Compute all registered metrics and write results to metric_store.
compute_all
compute_all(
bank: Any, market_state: Any, history: Any
) -> dict[str, Any]
Legacy compute_all: compute all metrics and return as a dict (no store needed).
compute_one
compute_one(
name: MetricName,
bank: Any,
market_state: MarketState,
date: date,
metric_store: MetricStore,
valuation_store: ValuationStore,
) -> Any
Compute a single metric by name and write it to metric_store.