Skip to content

Add finance charting surface - #427

Draft
Alek99 wants to merge 8 commits into
mainfrom
codex/finance-charting-surface
Draft

Add finance charting surface#427
Alek99 wants to merge 8 commits into
mainfrom
codex/finance-charting-surface

Conversation

@Alek99

@Alek99 Alek99 commented Aug 4, 2026

Copy link
Copy Markdown
Member

Summary

  • add native candlestick and OHLC marks plus a composable finance-chart container
  • add OHLCV volume panes, moving averages, Bollinger bands, VWAP/anchored VWAP, volume profiles, RSI, MACD, and Stochastic
  • add portfolio/risk layers for equity and drawdown plus return distributions with VaR/CVaR markers
  • add serializable position, forecast, measurement, volume, and chart-pattern layers
  • preserve finance layer/tool payloads through the Reflex adapter
  • document the finance roadmap and add focused API, payload, adapter, and renderer regressions

Why

XY needs a Python-native finance surface that composes with the existing chart and Reflex APIs without overloading the base candlestick mark. Studies, drawings, panes, and tool state remain independent layers over the same renderer and binary transport.

User and developer impact

Python users can compose finance charts from the public XY component API. Reflex users can publish state-dependent finance figures while keeping large market arrays out of Reflex state.

The pre-existing example applications are unchanged from main; this PR contains no example-app or notebook changes.

Validation

  • focused finance, example-compatibility, adapter, API-parity, and type-surface suites — 162 passed, 1 skipped
  • restored Reflex showcase compiles successfully in production mode
  • Ruff checks and formatting pass
  • focused headless-browser toolbar regression passes

Draft scope

The core Tier-1 finance surface is present. Interactive drawing creation/editing, persistence, session-aware axes, finance-bar streaming, and broader indicator/alternative-chart coverage remain follow-up work documented in docs/quant-finance-roadmap.md.

This supersedes #1, which GitHub could not reopen after its head branch was force-pushed/recreated.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e12c58b6-e067-4b88-8aa3-90cba59c97c7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Aug 4, 2026

Copy link
Copy Markdown

Greptile Summary

The PR adds a composable finance-charting surface across the Python API, binary payload pipeline, Reflex adapter, and browser renderer.

  • Adds candlestick/OHLC marks, finance studies, drawings, oscillator and volume panes, and portfolio/risk layers.
  • Extends payload and adapter support for finance-specific traces, layers, and tool state.
  • Updates the short-chart pane allocator so the main plot, gaps, and lower panes stay within the available plot rectangle.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the prior pane-overflow issue is fixed by allocating the main plot, collapsed gaps, and lower panes from one bounded height budget, with a browser regression covering the reported three-pane case.

Important Files Changed

Filename Overview
js/src/50_chartview.ts Adds finance-layer rendering and a bounded pane allocator; the previous three-pane short-chart overflow is fixed by shrinking gaps and pane heights within the available budget.
js/src/40_gl.ts Adds dedicated WebGL candlestick/OHLC shaders and fixed attribute bindings.
js/src/57_layers.ts Adds finance-layer rendering for studies, drawings, volume panes, and oscillators.
python/xy/finance.py Implements finance components, indicators, risk calculations, and serializable layer specifications.
python/xy/_payload.py Extends binary payload emission for the new finance mark geometry and layer metadata.
python/reflex_xy/assets/XYChart.jsx Preserves and forwards finance chart layers and tool payloads through the Reflex client adapter.
tests/test_ui_issue_regressions.py Adds a browser regression proving three lower panes remain ordered, visible, and contained in a 150 px plot budget.

Reviews (3): Last reviewed commit: "Keep finance panes within short charts" | Re-trigger Greptile

Comment thread js/src/50_chartview.ts Outdated
@Alek99 Alek99 changed the title Add finance charting surface and terminal example Add finance charting surface Aug 4, 2026
@Alek99
Alek99 force-pushed the codex/finance-charting-surface branch from bced203 to 92e092e Compare August 4, 2026 21:35
@codspeed-hq

codspeed-hq Bot commented Aug 4, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 109 untouched benchmarks
⏩ 2 skipped benchmarks1


Comparing codex/finance-charting-surface (92e092e) with main (e6f367f)

Open in CodSpeed

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant