Repository navigation
fix(console): gated asset-change fallback when strict cohort has no overlap - #989
Merged
Merged
Conversation
The combined performance view requires every account to share an observation date. When the strict intersection is empty or too thin, the calendar and latest daily change collapsed to an empty state even though per-currency forward-filled asset history exists. Reuse the bounded (max 3-day) asset series for those blocks only when no read failed, no account is missing, dates were omitted, and no strict calendar values exist. Cells are labeled asset_change/partial with snapshot_history_missing coverage, and never carry a return claim. Mixed-currency returns expose an independent asset_change series per currency; strict TWR fields are untouched.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
asset_change/partialwithsnapshot_history_missing; no return claim is made and strict TWR fields stay unchanged.returns.per_currencyentries expose their ownasset_changeseries; currencies are never merged and no FX is inferred.ReturnsCardandCalendarCard.tests/console_calendar_fallback_validation.mjscovers disjoint-date fallback, year view, missing/failed guards, mixed currencies, cashflow failure preservation, and untouched strict overlap.Test plan
node tests/console_calendar_fallback_validation.mjsconsole_performance_stats,console_currency_totals,console_equity_history,console_api_contract, ...)npx tsc --noEmitnpm run build