fix(cli): finish the run surface

- backtest takes --run-id, so an interrupted sweep continues
- an inverted date range or an empty ticker list is an error, not a clean zero-cell run
- a setup failure in a sweep reports one line instead of a traceback
- the remembered endpoint URL is offered back
- a round count set in the environment says it overrode the chosen research depth
- the run directory validates the ticker, and the report saves under results_dir
- the run says whether it resumed a saved run or started fresh
This commit is contained in:
Yijia-Xiao
2026-09-17 23:44:14 +00:00
parent 04b691804c
commit 9683194793
7 changed files with 180 additions and 10 deletions
+2
View File
@@ -38,6 +38,8 @@ def iter_grid(start_date: str, end_date: str, every_n_days: int = 1) -> list[str
start, end = _canonical(start_date), _canonical(end_date)
if every_n_days < 1:
raise ValueError("every_n_days must be at least 1")
if end < start:
raise ValueError(f"the grid ends before it starts: {end_date} is before {start_date}")
last = min(end, datetime.strptime(get_current_date(), "%Y-%m-%d"))
dates, cursor = [], start