Rendering¶
Every function here takes a result object and returns a string. Nothing
computes, reads a file, or prints — a test fails if report.py so much as
mentions load_bars or open(.
Commands that take minutes have their output split in two: *_header renders
what is known before the work starts, so it can be shown while the user waits,
and format_* renders the whole report for a caller that just wants the text.
report ¶
Rendering. Every function takes a result object and returns a string.
Nothing here computes anything, reads a file, or prints. That is the point: the text a command emits is now a pure function of what the command measured, so it can be tested by comparing strings instead of by capturing stdout, and changing how a number is displayed cannot change the number.
Commands that take minutes have their output split in two. *_header renders
what is known before the work starts — which config, which symbols, whether
this looks like something already killed — so it can be shown while the user
waits. format_* renders the whole report, header included, for a caller that
just wants the text.
ledger_line ¶
The "logged as runs/ [id]" trailer, or nothing if the write failed.
Public because nullres run prints it after the --save line rather
than as part of the body, so the CLI has to place it itself.
Source code in nullres/report.py
run_header ¶
Config line and near-miss warning, printable before the backtest starts.
Source code in nullres/report.py
run_body ¶
run_body(result: RunResult) -> str
Results table, deflated Sharpe, and what the numbers do not prove.
Source code in nullres/report.py
audit_header ¶
audit_body ¶
audit_body(result: AuditResult) -> str
Each check's verdict, plus what a pass does and does not mean.
Source code in nullres/report.py
format_audit ¶
format_audit(result: AuditResult) -> str
budget_header ¶
budget_body ¶
budget_body(result: BudgetResult) -> str
The two break-even tables, measured against modelled.
Source code in nullres/report.py
format_budget ¶
format_budget(result: BudgetResult) -> str
sweep_header ¶
sweep_body ¶
sweep_body(result: SweepResult) -> str
The entry x hold Sharpe surface. Read the shape, not the peak.
Source code in nullres/report.py
format_sweep ¶
format_sweep(result: SweepResult) -> str
robust_header ¶
Strategy, symbol, and any near-miss warning.
Source code in nullres/report.py
robust_body ¶
robust_body(result: RobustnessResult) -> str
All three falsification tests, the verdict, and its reasoning.
Source code in nullres/report.py
format_robust ¶
format_robust(result: RobustnessResult) -> str
ablate_header ¶
ablate_body ¶
ablate_body(result: AblationResult) -> str
Per-fold AUC with and without the group, and the paired t-test.
Source code in nullres/report.py
format_ablate ¶
format_ablate(result: AblationResult) -> str
features_header ¶
features_body ¶
features_body(result: FeatureImportanceResult) -> str
Permutation importance per feature, with derivatives marked.
Source code in nullres/report.py
format_features ¶
format_features(result: FeatureImportanceResult) -> str
format_fetch ¶
format_fetch(result: FetchResult) -> str
What is now in the cache.
Source code in nullres/report.py
format_ledger ¶
format_ledger(view: LedgerView) -> str
The run ledger, and why a long one is a reason for less confidence.
Source code in nullres/report.py
xsec_header ¶
Universe size and how it was chosen — enumerated or hardcoded.
Source code in nullres/report.py
xsec_body ¶
xsec_body(result: XsecResult) -> str
Panel summary, survivorship, books, cost sensitivity, verification.
Source code in nullres/report.py
format_verification ¶
format_verification(v: PanelVerification, panel) -> str
The controls that decide whether cross-sectional skill is real.
Source code in nullres/report.py
541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 | |
format_xsec ¶
format_xsec(result: XsecResult) -> str