SPB Git

spb/hfchart Public

HFChart — la référence des charts haute fréquence : 14 types rendus canvas from scratch (zéro dépendance), données HF Market Data — www.hfchart.io

JavaScript 82.1% CSS 10% HTML 5.8% Python 2.1%

fix(options-lab): spot UNADJUSTED pour stock/etf (strikes as-traded) + message quand les filtres vident la chaîne

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Simon-Pierre Boucher committed 7 h ago (Aug 10, 2026) parent b83f7a1

Showing 2 changed files with +9 and −0

modified web/js/options-app.js +5 −0
@@ -168,6 +168,11 @@
168 168 return dOk && distOk;
169 169 });
170 170 $('#chain-count').textContent = `${visible.length} strikes · ${state.rows.length} contrats`;
171 + if (state.rows.length && !visible.length) {
172 + showEmpty('Aucun strike ne passe les filtres — élargissez « ± spot » ou « |Δ| max ».');
173 + } else if (state.rows.length) {
174 + $('#chain-empty').hidden = true;
175 + }
171 176
172 177 const posKeys = new Set(state.legs.map(l => `${l.kind}|${l.strike}|${l.expiry}`));
173 178 const cols = [
modified web/js/options-data.js +4 −0
@@ -108,6 +108,10 @@
108 108 const params = new URLSearchParams({
109 109 timeframe: '1day', order: 'asc', limit: '4000', start, end,
110 110 });
111 + // les strikes/primes d'options sont as-traded : il faut le spot NON
112 + // ajusté des splits/dividendes (sinon AAPL 2015 vaut 23 $ face à des
113 + // strikes 105/110)
114 + if (asset === 'stock' || asset === 'etf') params.set('adjustment', 'UNADJUSTED');
111 115 const j = await getJSON(`${API}/v1/bars/${asset}/${encodeURIComponent(ticker)}?${params}`);
112 116 if (j.data && j.data.length) {
113 117 assetOf.set(ticker, asset);
114 118