Commit 20eb3ea
Fix base scenario coin leak and aggregate method handling
Two bugs fixed:
1. apply_scenario fell back to master_coins (union of all scenarios)
for scenarios without explicit coins. Now falls back to base_coins
(the original approved_coins from config) via new optional
base_coins/base_ignored parameters threaded through suite_runner,
optimize_suite, and run_backtest_scenario.
2. calc_fitness always used _mean stats for scoring objectives,
ignoring backtest.aggregate config (e.g. "max" for
high_exposure_hours_max_long). SuiteEvaluator now overrides
flat_stats with correctly aggregated values before calling
calc_fitness. pareto_store.py script reads the aggregate config
from entries, uses it in _suite_metrics_to_stats fallback paths,
and applies ratio-based correction to stored objectives.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent a20c643 commit 20eb3ea
File tree
6 files changed
+545
-6
lines changed- src
- tests
6 files changed
+545
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1218 | 1218 | | |
1219 | 1219 | | |
1220 | 1220 | | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
1221 | 1226 | | |
1222 | 1227 | | |
1223 | 1228 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| 251 | + | |
| 252 | + | |
251 | 253 | | |
252 | 254 | | |
253 | 255 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
76 | 92 | | |
77 | 93 | | |
78 | 94 | | |
| |||
83 | 99 | | |
84 | 100 | | |
85 | 101 | | |
86 | | - | |
| 102 | + | |
| 103 | + | |
87 | 104 | | |
88 | 105 | | |
89 | 106 | | |
90 | 107 | | |
91 | 108 | | |
92 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
93 | 116 | | |
94 | 117 | | |
95 | 118 | | |
| |||
574 | 597 | | |
575 | 598 | | |
576 | 599 | | |
577 | | - | |
| 600 | + | |
| 601 | + | |
578 | 602 | | |
579 | 603 | | |
580 | 604 | | |
581 | 605 | | |
582 | 606 | | |
583 | | - | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
584 | 610 | | |
585 | 611 | | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
586 | 631 | | |
587 | 632 | | |
588 | 633 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
618 | 618 | | |
619 | 619 | | |
620 | 620 | | |
| 621 | + | |
| 622 | + | |
621 | 623 | | |
622 | 624 | | |
623 | 625 | | |
| |||
635 | 637 | | |
636 | 638 | | |
637 | 639 | | |
638 | | - | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
639 | 643 | | |
640 | | - | |
| 644 | + | |
641 | 645 | | |
642 | 646 | | |
643 | 647 | | |
| |||
834 | 838 | | |
835 | 839 | | |
836 | 840 | | |
| 841 | + | |
| 842 | + | |
837 | 843 | | |
838 | 844 | | |
839 | 845 | | |
| |||
849 | 855 | | |
850 | 856 | | |
851 | 857 | | |
| 858 | + | |
| 859 | + | |
852 | 860 | | |
853 | 861 | | |
854 | 862 | | |
| |||
1474 | 1482 | | |
1475 | 1483 | | |
1476 | 1484 | | |
| 1485 | + | |
| 1486 | + | |
1477 | 1487 | | |
1478 | 1488 | | |
1479 | 1489 | | |
| |||
1516 | 1526 | | |
1517 | 1527 | | |
1518 | 1528 | | |
| 1529 | + | |
| 1530 | + | |
1519 | 1531 | | |
1520 | 1532 | | |
1521 | 1533 | | |
| |||
0 commit comments