6 Commits

Author SHA1 Message Date
e36ef3fe47 feat: add ?years= param to underlying-only chart endpoint
Endpoint standalone /api/chart/underlying/{id} caricava un TOP 350
fisso; ora accetta ?years= (default 5, clamp 1-20) e la SP filtra per
data invece che per numero di righe.

Il prezzo usato resta Px_close/Px_closeadj in base ad
AdjustedPrices, senza fallback incrociato tra i due campi: quando
Px_closeadj non è backfillato prima di uno split (es. Apple, valorizzato
solo da inizio 2019), un fallback avrebbe mischiato dati adjusted/raw
creando un gradino artificiale nel grafico. La SP ora taglia lo storico
dove il campo scelto non è popolato.

Fix collaterale: skip righe con prezzo NULL prima del cast a decimal,
evitava un InvalidCastException con storici lunghi.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-21 17:54:25 +02:00
fdbf16ad0b fix: use CONCAT for NULL-safe underlying name in cedlab_Chart_UnderlyingOnly 2026-07-21 10:31:15 +02:00
d6f781e34d docs: add cedlab_Chart_UnderlyingOnly SP script 2026-07-21 10:29:03 +02:00
679f9e4528 fix: rewrite cedlab_Chart_AllSeriesV2 with correct schema from cedlab_Chart_UL1 (CertificatesUnderlyings.Strike, StartDate=MIN(Prices.Px_date), deleted/sospeso filters) 2026-05-27 17:17:32 +02:00
e4728cf79e fix: revert to cedlab_Chart_UL1 (already has all V2 fields); remove cedlab_Chart_UL2; fix AllSeriesV2 SQL with DailyUL1 logic 2026-05-27 16:35:48 +02:00
a866a2f7d5 fix: use cedlab_Chart_UL2 (new SP, don't modify UL1); add correct SQL scripts with Prices table 2026-05-27 16:28:26 +02:00