You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
User Story: As an analyst reading a generated technical/fundamental write-up, I want to press p on any paragraph that references chartable metrics and see a small inline chart with those metrics overlaid on price, so that I can validate the LLM's claim at a glance without leaving the AI tab.
Example paragraphs (all from real AI Analysis output for DJT):
Trend Direction: DJT is currently exhibiting a downtrend. The price is significantly below both the SMA(20) at 9.22 and the SMA(50) at 9.36. The EMA(12) and EMA(26) also lag behind the price, reinforcing this downward bias. The 1D and 1W changes are negative, further supporting the downtrend.
Momentum: The MACD is showing a bearish crossover (-0.2164 to -0.1731) and remains in negative territory, indicating weak momentum. The RSI reading of 21.2 confirms extremely oversold conditions…
Volatility: Bollinger Bands are relatively wide with a 14% bandwidth (Upper=9.99, Mid=9.22, Lower=8.45). This suggests elevated volatility…
Pressing p on the first should pop a small chart showing price + SMA20 + SMA50 over the longer of the periods referenced (1W here, since both 1D and 1W are mentioned).
Acceptance Criteria:
Each generated paragraph on the AI tab is individually focusable via j/k (extends the existing trading-panel vim navigation).
Pressing p on a focused paragraph parses the metric references from the text (regex over a known set: SMA(N), EMA(N), MACD, RSI, BB, Bollinger Bands, ATR, plus period cues like 1D/1W/1M/3M/1Y) and renders a small inline chart below the paragraph showing those metrics.
Period selection: use the longest period mentioned; fall back to 3M if none.
p again on the same paragraph closes the chart.
Pressing Esc closes whichever chart is open.
Existing j/k/Enter flow into Run Deep Analysis stays intact.
Future hook:
This per-paragraph addressability is the prerequisite for Attach panels to a sketch (notes linking) #73 (attach panels to a sketch) at paragraph granularity. The natural follow-up is A on a focused paragraph to pin the paragraph + its chart into an idea's notes — capturing the analyst observation and the corroborating chart as a single attachment.
Technical Notes:
Use <p class="ai-paragraph trading-vim-item" data-ai-para> so paragraphs slot into the existing _tradingVimHandler without a parallel registry.
Metric-extraction regex lives next to classifyKeyPoint / mdInline in info.js — it's the same shape of LLM-output parsing problem.
The chart is the same lightweight-charts setup the financials preview uses (slide-in pattern); render with attributionLogo: false.
If FMP doesn't already expose a given indicator, this is a forcing function to add /api/technical/{symbol}?indicator=… — but most are derivable from historical/price series client-side.
Spotted while reviewing the Deep Analysis output post-#68.
User Story: As an analyst reading a generated technical/fundamental write-up, I want to press
pon any paragraph that references chartable metrics and see a small inline chart with those metrics overlaid on price, so that I can validate the LLM's claim at a glance without leaving the AI tab.Example paragraphs (all from real AI Analysis output for DJT):
Pressing
pon the first should pop a small chart showing price + SMA20 + SMA50 over the longer of the periods referenced (1W here, since both 1D and 1W are mentioned).Acceptance Criteria:
j/k(extends the existing trading-panel vim navigation).pon a focused paragraph parses the metric references from the text (regex over a known set: SMA(N), EMA(N), MACD, RSI, BB, Bollinger Bands, ATR, plus period cues like 1D/1W/1M/3M/1Y) and renders a small inline chart below the paragraph showing those metrics.pagain on the same paragraph closes the chart.Esccloses whichever chart is open.j/k/Enter flow into Run Deep Analysis stays intact.Future hook:
Aon a focused paragraph to pin the paragraph + its chart into an idea's notes — capturing the analyst observation and the corroborating chart as a single attachment.Technical Notes:
<p class="ai-paragraph trading-vim-item" data-ai-para>so paragraphs slot into the existing_tradingVimHandlerwithout a parallel registry.classifyKeyPoint/mdInlinein info.js — it's the same shape of LLM-output parsing problem.attributionLogo: false./api/technical/{symbol}?indicator=…— but most are derivable fromhistorical/priceseries client-side.Spotted while reviewing the Deep Analysis output post-#68.