Skip to content

Data: Forecast Sheet Forecast Start option (#785) - #786

Merged
h-a-n-a-s-h-i merged 2 commits into
storytold:mainfrom
vangel76:feat/forecast-start-785
Oct 13, 2026
Merged

h-a-n-a-s-h-i merged 2 commits into
storytold:mainfrom
vangel76:feat/forecast-start-785

Conversation

@vangel76

Copy link
Copy Markdown
Contributor

Fixes #785

What changed

  • data.forecastSheet takes optional forecastStart (number or date text on the timeline). When it is a history point before the last one, the FORECAST.ETS / CONFINT / STAT formulas use only the rows before it, the forecast columns join the actuals at the previous row and run over the overlap and on into the future (periods/end as before); the chart shows actual vs forecast.
  • Start equal to the last point or one step after it = current behaviour. Blank/missing = current behaviour. Start not on the timeline, before the third point (fewer than 2 values to fit), beyond the next step, or non-numeric = error, nothing built. Result JSON gains fitted.
  • Forecast Sheet dialog gets a "Forecast start" field (looked at a snapshot). Dialog labels in this dialog are not in the i18n catalogs (like its other fields), so no catalog change.
  • Docs: gaps.md §13, ROADMAP progress row.

Tests / commands

  • cargo test -p gridcraft-engine forecast (hindcast formulas and values on a fixed seasonal series, invalid starts, blank start unchanged), cargo clippy -p gridcraft-engine --all-targets -- -D warnings, fmt.

Not done

  • No xtask ci locally (CI covers it); no Excel comparison.

Unverified assumptions (need confirmation in Excel)

  • Start is the first forecast point and the model is fit to points strictly before it (per Excel's public description: data prior to the start is used); the join cell at the previous row shows the actual.
  • Start = last point is treated as the default (Excel's default start), i.e. fit to all history.
  • Start after the history (beyond the next step) is an error rather than a gap.
  • Minimum of two values before the start is my choice.

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
# Conflicts:
#	ROADMAP.md
#	docs/gaps.md
@h-a-n-a-s-h-i
h-a-n-a-s-h-i merged commit 8488b03 into storytold:main Oct 13, 2026
1 check failed
@echelon

echelon commented Oct 13, 2026

Copy link
Copy Markdown
Member

Merged — thank you @vangel76 for the contribution!

I merged main into your branch to resolve conflicts with other PRs that landed first.

vangel76 added a commit to vangel76/gridcraft that referenced this pull request Oct 13, 2026
Keep the audit's corrections and add what main merged meanwhile (storytold#727, storytold#528, storytold#833, storytold#792/storytold#794, storytold#785/storytold#786, storytold#840, storytold#453, storytold#739, storytold#652); landed PRs no longer listed as open; one Last updated line per doc.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parity: Data › Forecast › Forecast Sheet: Forecast Start (hindcast) option

3 participants