Coverage for evaluation/__init__.py: 100%
6 statements
« prev ^ index » next coverage.py v7.17.3, created at 2026-11-22 12:55 +0000
« prev ^ index » next coverage.py v7.17.3, created at 2026-11-22 12:55 +0000
1"""Offline, cost-aware evaluation of the cross-sectional rank book (V5.1
2Phase 0) - turns "how good is this rank prediction" into "what would this
3have actually earned net of fees", the question nothing else in this
4codebase answers (train.py::compute_strategy_metrics() simulates a
5long-only 1-day-direction strategy gross of costs, not the rank book, and
6not net-of-cost). Deliberately its own package, not folded into
7retraining/ or performance/: pure numpy/pandas, NO torch import, so both of
8those (and any future Postgres-fed monitoring job) can import it without
9pulling in the training stack - the same torch-free-core convention
10train.py::_rank_ic_from_arrays() already established for its own metric.
11"""
13from .ablation import (
14 ABLATION_VARIANTS,
15 NOT_OFFLINE_MEASURABLE_VARIANTS,
16 compare_static_vs_retrained,
17 run_ablation,
18 simulate_static_baseline,
19)
20from .confidence_threshold_calibration import calibrate_confidence_threshold
21from .model_predictions import (
22 build_sequence_windows,
23 predict_head,
24 predict_heads,
25 predict_multitask_head,
26 predict_sequence_head,
27 select_context_date_range,
28)
29from .rank_book_simulator import (
30 RankBookSimulationResult,
31 capacity_curve,
32 simulate_rank_book,
33 stress_test_costs,
34 summarize_metric_stability,
35)
36from .rank_signal_calibration import (
37 calibrate_book_confidence_spread,
38 compute_blended_raw_scores,
39 reconcile_book_history_date,
40 replay_book_history_reconciliation,
41 segment_logged_records_by_run,
42 summarize_book_history_reconciliation,
43 summarize_book_member_diversion,
44 summarize_universe_presence_by_symbol,
45 summarize_universe_snapshot_by_security_type,
46)
48__all__ = [
49 "ABLATION_VARIANTS",
50 "NOT_OFFLINE_MEASURABLE_VARIANTS",
51 "RankBookSimulationResult",
52 "build_sequence_windows",
53 "calibrate_book_confidence_spread",
54 "calibrate_confidence_threshold",
55 "capacity_curve",
56 "compare_static_vs_retrained",
57 "compute_blended_raw_scores",
58 "predict_head",
59 "predict_heads",
60 "predict_multitask_head",
61 "predict_sequence_head",
62 "reconcile_book_history_date",
63 "replay_book_history_reconciliation",
64 "run_ablation",
65 "segment_logged_records_by_run",
66 "select_context_date_range",
67 "simulate_rank_book",
68 "simulate_static_baseline",
69 "stress_test_costs",
70 "summarize_book_history_reconciliation",
71 "summarize_book_member_diversion",
72 "summarize_metric_stability",
73 "summarize_universe_presence_by_symbol",
74 "summarize_universe_snapshot_by_security_type",
75]