Commit Graph

10 Commits

Author SHA1 Message Date
Jose Selesan
0f62a13246 fix(analysis): compute variation for oldest month in 12-month table
The last row of the monthly variation table (oldest month of the rolling
window) always showed only the inflation value: the window started exactly
at that month, so there was no previous month to compare against, the
variation was null and the currency cells rendered '--' (hiding the prices
too).

- Backend: fetch 13 months (12 displayed + 1 base) so the oldest displayed
  month gets its previous month; bump cache key to monthly-last-v3.
- Backend: fix external fallback filter comparing a full date against a
  month key ('2026-10-14' > '2026-10' is always true), which silently
  dropped the most recent month whenever it was missing from the DB.
  Now filters by month key only.
- Backend: normalize subtractMonths to the 1st of the target month to avoid
  month shifts; skip external quotes without a buy value.
- Frontend: compute variations over the 13 months and render the last 12;
  show the current price when a variation is unavailable so no row is blank.
- Add regression tests for the window size and the external fallback.
2026-10-14 12:05:27 -03:00
Jose Selesan
1fee87a4ce fix(analysis): use compound inflation calculation instead of linear sum 2026-08-27 12:52:48 -03:00
Jose Selesan
d24f3ce872 feat(analysis): add 12-month summary row with total variation and accumulated inflation 2026-08-27 11:56:02 -03:00
Jose Selesan
d8aed4970c feat(analysis): bold month names for DB-sourced data, regular for external 2026-08-27 11:37:43 -03:00
Jose Selesan
873fd63ea4 style(analysis): use full month names in variation table 2026-08-27 11:16:39 -03:00
Jose Selesan
88fa05d5b8 style(analysis): show raw values inline instead of below percentage 2026-08-27 10:37:04 -03:00
Jose Selesan
f9e0267c94 feat(analysis): show raw values ( → ) below each variation 2026-08-27 10:34:33 -03:00
Jose Selesan
0c634bbc8b fix(analysis): don't skip any months for inflation, just check if data exists 2026-08-27 10:22:13 -03:00
Jose Selesan
e32131d32e fix(analysis): only skip inflation for current month, not last complete month
The last complete month's inflation is usually available by the 14th of the
current month. Previously July was always skipped even though data exists.
2026-08-27 10:21:39 -03:00
Jose Selesan
66ab56b46a feat(analysis): add monthly variation table with inflation comparison
- New backend endpoint GET /api/quotes/monthly-last
- MonthlyVariationTable component with BELO/Blue/Oficial % changes
- Inflation data from ArgentinaDatos API with 24h cache
- Visual indicators: green if beats inflation, red if below
- Responsive: cards on mobile, table on desktop
2026-08-27 10:13:56 -03:00