gloomberb 0.20.12 → 0.20.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/account/billing.ts +3 -2
- package/src/account/upgrade-dialog.tsx +8 -8
- package/src/api-client/index.ts +10 -2
- package/src/api-client/install-experiments.ts +146 -0
- package/src/api-client/telemetry.ts +47 -0
- package/src/api-client/types/market.ts +4 -0
- package/src/api-client/types/news.ts +16 -0
- package/src/architecture/floating-promise-allowlist.json +17 -33
- package/src/brokers/signed-in/adapter.ts +2 -2
- package/src/brokers/signed-in/catalog.ts +13 -4
- package/src/cli/commands/market.ts +51 -32
- package/src/cli/commands/overview.ts +3 -3
- package/src/cli/commands/search.ts +103 -9
- package/src/cli/commands/ticker.ts +22 -13
- package/src/cli/earnings-calendar.ts +33 -53
- package/src/cli/history-rows.ts +18 -1
- package/src/cli/known-gaps.ts +9 -0
- package/src/cli/listing-arg.ts +105 -18
- package/src/cli/pane-functions/catalog.ts +55 -7
- package/src/cli/pane-functions/dom.ts +8 -1
- package/src/cli/pane-functions/freshness.ts +2 -2
- package/src/cli/pane-functions/headless.ts +8 -8
- package/src/cli/pane-functions/index.ts +1 -1
- package/src/cli/pane-functions/report.ts +4 -1
- package/src/cli/perpetual-contract.ts +4 -4
- package/src/cli/quote-answer.ts +6 -2
- package/src/cli/result.ts +2 -1
- package/src/components/chart/composite/axis-overlays.tsx +5 -2
- package/src/components/chart/composite/composite-chart.tsx +1 -0
- package/src/components/chart/composite/format.ts +101 -15
- package/src/components/chart/composite/legend.tsx +60 -25
- package/src/components/chart/composite/time-axis.ts +51 -29
- package/src/components/chart/composite/toolbar.tsx +42 -6
- package/src/components/chart/curve/curve-surface.tsx +5 -5
- package/src/components/command-bar/list/badge.ts +8 -5
- package/src/components/command-bar/list/model.ts +0 -5
- package/src/components/command-bar/list/view.tsx +39 -2
- package/src/components/command-bar/routes/root/plugin-install.ts +4 -2
- package/src/components/command-bar/routes/root/provider-search.ts +23 -3
- package/src/components/command-bar/routes/root/results.ts +20 -9
- package/src/components/command-bar/routes/root/start-here.ts +1 -2
- package/src/components/command-bar/routes/ticker-search/actions.ts +2 -3
- package/src/components/command-bar/routes/ticker-search/results.ts +23 -4
- package/src/components/data-table/view.tsx +29 -6
- package/src/components/form-modal/host.tsx +1 -1
- package/src/components/layout/header.tsx +3 -2
- package/src/components/layout/market-summary.ts +3 -3
- package/src/components/layout/pane/error-boundary.tsx +2 -1
- package/src/components/markdown-text.tsx +36 -0
- package/src/components/market-board/index.tsx +4 -3
- package/src/components/onboarding/first-run-workspace.ts +46 -11
- package/src/components/onboarding/onboarding-keyboard.ts +57 -5
- package/src/components/onboarding/onboarding-wizard.tsx +91 -24
- package/src/components/onboarding/portfolio-step/index.tsx +1 -0
- package/src/components/onboarding/portfolio-step/positions-panel.tsx +36 -9
- package/src/components/onboarding/portfolio-step/types.ts +2 -0
- package/src/components/onboarding/tickers-step-model.ts +140 -0
- package/src/components/onboarding/tickers-step.tsx +116 -0
- package/src/components/onboarding/use-onboarding-broker-form.ts +1 -1
- package/src/components/onboarding/use-onboarding-progress.ts +100 -11
- package/src/components/onboarding/use-onboarding-upgrade.ts +3 -2
- package/src/components/onboarding/wizard-model.ts +3 -1
- package/src/components/onboarding/wizard-tickers.ts +139 -0
- package/src/components/price-performance.tsx +2 -2
- package/src/components/speedometer-gauge/model.ts +2 -1
- package/src/components/speedometer-gauge/terminal.tsx +13 -8
- package/src/components/ui/choice-dialog.tsx +101 -32
- package/src/components/ui/multi-select/dialog.tsx +1 -7
- package/src/components/ui/not-meaningful.ts +16 -0
- package/src/components/ui/query-bar.tsx +16 -4
- package/src/components/ui/stat-grid.tsx +27 -6
- package/src/data/config/store/normalize.ts +2 -0
- package/src/docs/snapshot.json +1 -1
- package/src/i18n/es.ts +5 -2
- package/src/i18n/ja.ts +5 -2
- package/src/i18n/ko.ts +5 -2
- package/src/i18n/zh-cn.ts +5 -2
- package/src/i18n/zh-tw.ts +5 -2
- package/src/layout-marketplace/model.ts +2 -1
- package/src/market-data/futures-contract.ts +2 -1
- package/src/market-data/hooks.tsx +1 -1
- package/src/market-data/market/change-basis.ts +27 -5
- package/src/market-data/market/format.ts +13 -13
- package/src/market-data/quotes/listing-enterprise-value.ts +3 -3
- package/src/market-data/quotes/time.ts +17 -10
- package/src/market-data/tax-equivalent.ts +3 -2
- package/src/news/aggregator.ts +19 -8
- package/src/news/hooks.ts +1 -1
- package/src/news/news-model.ts +49 -0
- package/src/news/types.ts +9 -0
- package/src/plugins/builtin/account-management/calendar-tab.tsx +8 -3
- package/src/plugins/builtin/account-management/pane.tsx +9 -8
- package/src/plugins/builtin/alerts/calendar-events.ts +4 -5
- package/src/plugins/builtin/alerts/format.ts +6 -5
- package/src/plugins/builtin/alerts/headless.ts +3 -2
- package/src/plugins/builtin/alerts/history.ts +2 -1
- package/src/plugins/builtin/alerts/pane.tsx +2 -1
- package/src/plugins/builtin/alerts/price-text.ts +2 -1
- package/src/plugins/builtin/alerts/scheduled.ts +6 -5
- package/src/plugins/builtin/analytics/account-returns.ts +6 -7
- package/src/plugins/builtin/analytics/display.ts +2 -1
- package/src/plugins/builtin/analytics/pane-model.ts +5 -9
- package/src/plugins/builtin/analytics/risk-model.ts +6 -6
- package/src/plugins/builtin/analytics/risk-pane.tsx +6 -5
- package/src/plugins/builtin/analytics/view.tsx +5 -5
- package/src/plugins/builtin/attention/model.ts +6 -5
- package/src/plugins/builtin/attention/pane.tsx +5 -4
- package/src/plugins/builtin/awards/detail.tsx +5 -4
- package/src/plugins/builtin/awards/headless.ts +8 -7
- package/src/plugins/builtin/awards/model.ts +4 -3
- package/src/plugins/builtin/awards/pane.tsx +4 -4
- package/src/plugins/builtin/backtest/format.ts +3 -2
- package/src/plugins/builtin/backtest/report.ts +3 -2
- package/src/plugins/builtin/bond-calculator/headless.ts +2 -1
- package/src/plugins/builtin/bond-calculator/pane.tsx +2 -1
- package/src/plugins/builtin/broker-manager/add-flow.tsx +1 -1
- package/src/plugins/builtin/broker-trading/orders-data.ts +3 -3
- package/src/plugins/builtin/broker-trading/orders.tsx +3 -2
- package/src/plugins/builtin/broker-trading/ticket.tsx +2 -2
- package/src/plugins/builtin/buildout/cells.tsx +2 -1
- package/src/plugins/builtin/buildout/company/pane.tsx +4 -3
- package/src/plugins/builtin/buildout/data-runtime.ts +21 -23
- package/src/plugins/builtin/buildout/detail/values.ts +2 -1
- package/src/plugins/builtin/buildout/format.ts +4 -3
- package/src/plugins/builtin/buildout/pane/index.tsx +3 -3
- package/src/plugins/builtin/catalysts/detail.tsx +2 -1
- package/src/plugins/builtin/catalysts/model.ts +6 -5
- package/src/plugins/builtin/catalysts/pane.tsx +2 -1
- package/src/plugins/builtin/cds/headless.ts +3 -2
- package/src/plugins/builtin/cds/model.ts +8 -8
- package/src/plugins/builtin/cds/pane.tsx +3 -2
- package/src/plugins/builtin/central-bank-rates/headless.ts +2 -1
- package/src/plugins/builtin/central-bank-rates/model.ts +3 -2
- package/src/plugins/builtin/central-bank-rates/pane.tsx +5 -5
- package/src/plugins/builtin/changelog/index.tsx +2 -2
- package/src/plugins/builtin/chart-composer/index.tsx +4 -2
- package/src/plugins/builtin/chart-composer/pane.tsx +7 -3
- package/src/plugins/builtin/chart-composer/use-series-catalog.ts +3 -1
- package/src/plugins/builtin/chart-composer/user-series.ts +3 -1
- package/src/plugins/builtin/chat/attachments/desktop.tsx +2 -1
- package/src/plugins/builtin/chat/controller/utils.ts +2 -1
- package/src/plugins/builtin/clinical-trials/model.ts +4 -3
- package/src/plugins/builtin/clinical-trials/sponsor-tickers.ts +4 -2
- package/src/plugins/builtin/cloud/askg/lock-note.ts +16 -4
- package/src/plugins/builtin/cloud/askg/model.ts +2 -1
- package/src/plugins/builtin/cloud/askg/pane.tsx +35 -1
- package/src/plugins/builtin/cloud/company-picker.tsx +1 -3
- package/src/plugins/builtin/cloud/team/pane.tsx +12 -12
- package/src/plugins/builtin/cloud/thesis/detail.tsx +13 -8
- package/src/plugins/builtin/cloud-tweets/model.ts +2 -2
- package/src/plugins/builtin/comment-letters/pane.tsx +2 -1
- package/src/plugins/builtin/commodity-balances/headless.ts +3 -2
- package/src/plugins/builtin/company-attention/app-rank.tsx +5 -4
- package/src/plugins/builtin/company-attention/building-model.ts +7 -7
- package/src/plugins/builtin/company-attention/headless.ts +6 -5
- package/src/plugins/builtin/company-attention/model.ts +4 -4
- package/src/plugins/builtin/company-attention/moves-model.ts +9 -9
- package/src/plugins/builtin/company-attention/signals-model.ts +9 -9
- package/src/plugins/builtin/company-kpis/headless.ts +2 -1
- package/src/plugins/builtin/company-kpis/model.ts +15 -10
- package/src/plugins/builtin/company-kpis/pane.tsx +2 -2
- package/src/plugins/builtin/congress-trades/detail.tsx +6 -5
- package/src/plugins/builtin/congress-trades/headless.ts +2 -1
- package/src/plugins/builtin/congress-trades/model.ts +6 -6
- package/src/plugins/builtin/congress-trades/table.tsx +7 -6
- package/src/plugins/builtin/connections/pane.tsx +5 -5
- package/src/plugins/builtin/correlation/headless.ts +2 -2
- package/src/plugins/builtin/correlation/index.tsx +4 -1
- package/src/plugins/builtin/correlation/matrix/selection.ts +2 -1
- package/src/plugins/builtin/correlation/relationship/view-model.ts +3 -3
- package/src/plugins/builtin/cot/headless.ts +3 -2
- package/src/plugins/builtin/cot/model.ts +2 -1
- package/src/plugins/builtin/cot/pane.tsx +4 -3
- package/src/plugins/builtin/cpi/headless.ts +4 -3
- package/src/plugins/builtin/cpi/model.ts +8 -7
- package/src/plugins/builtin/credit-boards/cdx-pane.tsx +5 -4
- package/src/plugins/builtin/credit-boards/headless.ts +2 -1
- package/src/plugins/builtin/credit-boards/model.ts +5 -5
- package/src/plugins/builtin/credit-conditions/headless.ts +2 -1
- package/src/plugins/builtin/credit-conditions/index.tsx +2 -2
- package/src/plugins/builtin/credit-documents/model.ts +2 -2
- package/src/plugins/builtin/crypto-board/defi-view.tsx +7 -7
- package/src/plugins/builtin/crypto-board/defi.ts +2 -2
- package/src/plugins/builtin/crypto-board/model.ts +4 -3
- package/src/plugins/builtin/crypto-board/pane.tsx +8 -8
- package/src/plugins/builtin/crypto-board/supply.ts +2 -2
- package/src/plugins/builtin/crypto-etf-flows/model.ts +4 -4
- package/src/plugins/builtin/custom-view/index.tsx +3 -1
- package/src/plugins/builtin/custom-view/pane.tsx +5 -1
- package/src/plugins/builtin/custom-view/view-spec.ts +11 -0
- package/src/plugins/builtin/debt-maturities/model.ts +3 -3
- package/src/plugins/builtin/debt-maturities/pane.tsx +2 -2
- package/src/plugins/builtin/dividend-yield/client.ts +7 -3
- package/src/plugins/builtin/dividend-yield/headless.ts +16 -11
- package/src/plugins/builtin/dividend-yield/pane.tsx +12 -10
- package/src/plugins/builtin/dividend-yield/ranking-view.tsx +4 -1
- package/src/plugins/builtin/dividend-yield/ranking.ts +19 -11
- package/src/plugins/builtin/dividend-yield/types.ts +4 -0
- package/src/plugins/builtin/dividend-yield/view.ts +3 -3
- package/src/plugins/builtin/docs/use-docs.ts +4 -2
- package/src/plugins/builtin/doe/headless.ts +2 -1
- package/src/plugins/builtin/doe/model.ts +12 -11
- package/src/plugins/builtin/earnings/board-model.ts +14 -8
- package/src/plugins/builtin/earnings/board-table.ts +13 -8
- package/src/plugins/builtin/earnings/calendar-model.ts +5 -5
- package/src/plugins/builtin/earnings/calendar.tsx +2 -1
- package/src/plugins/builtin/earnings/format.ts +16 -14
- package/src/plugins/builtin/earnings/headless.ts +57 -19
- package/src/plugins/builtin/earnings/history-model.ts +11 -7
- package/src/plugins/builtin/earnings/history-table.ts +14 -9
- package/src/plugins/builtin/earnings/history.tsx +4 -3
- package/src/plugins/builtin/earnings-calls/calendar.tsx +2 -1
- package/src/plugins/builtin/earnings-calls/format.ts +6 -5
- package/src/plugins/builtin/earnings-calls/upcoming.ts +5 -5
- package/src/plugins/builtin/earnings-ripple/headless.ts +2 -1
- package/src/plugins/builtin/earnings-ripple/model.ts +3 -2
- package/src/plugins/builtin/earnings-ripple/pane.tsx +6 -6
- package/src/plugins/builtin/econ/calendar-model.ts +2 -2
- package/src/plugins/builtin/econ/detail-view.tsx +2 -2
- package/src/plugins/builtin/econ/index.tsx +7 -6
- package/src/plugins/builtin/econ-statistics/detail.tsx +2 -1
- package/src/plugins/builtin/econ-statistics/headless.ts +4 -4
- package/src/plugins/builtin/econ-statistics/pane.tsx +2 -2
- package/src/plugins/builtin/equity-screener/headless.ts +5 -5
- package/src/plugins/builtin/equity-screener/model.ts +6 -4
- package/src/plugins/builtin/equity-screener/pane.tsx +7 -7
- package/src/plugins/builtin/equity-screener/screen-check.ts +2 -1
- package/src/plugins/builtin/equity-screener/ticker-check.tsx +2 -1
- package/src/plugins/builtin/estimate-revisions/model.ts +3 -2
- package/src/plugins/builtin/estimate-revisions/pane.tsx +8 -8
- package/src/plugins/builtin/executives/format.ts +4 -4
- package/src/plugins/builtin/exposure/headless.ts +8 -8
- package/src/plugins/builtin/exposure/model.ts +4 -3
- package/src/plugins/builtin/exposure/pane.tsx +6 -5
- package/src/plugins/builtin/fear-greed/format.ts +7 -7
- package/src/plugins/builtin/fear-greed/headless.ts +2 -1
- package/src/plugins/builtin/filing-events/feed.ts +2 -1
- package/src/plugins/builtin/futures/table.tsx +8 -8
- package/src/plugins/builtin/futures-curve/headless.ts +18 -18
- package/src/plugins/builtin/futures-curve/model.ts +5 -5
- package/src/plugins/builtin/futures-curve/pane.tsx +8 -8
- package/src/plugins/builtin/fx-matrix/index.tsx +2 -2
- package/src/plugins/builtin/fx-matrix/pairs.ts +2 -1
- package/src/plugins/builtin/gpu/board.tsx +6 -5
- package/src/plugins/builtin/gpu/changes.tsx +2 -1
- package/src/plugins/builtin/gpu/equities.tsx +2 -2
- package/src/plugins/builtin/gpu/headless.ts +4 -3
- package/src/plugins/builtin/gpu/model.ts +8 -7
- package/src/plugins/builtin/help/functions-table.tsx +41 -9
- package/src/plugins/builtin/help/index.tsx +6 -3
- package/src/plugins/builtin/help/keybindings-editor.tsx +35 -7
- package/src/plugins/builtin/help/shortcut-table.tsx +19 -7
- package/src/plugins/builtin/help/table-cells.tsx +51 -0
- package/src/plugins/builtin/holders/pane.tsx +4 -1
- package/src/plugins/builtin/insider/base-values.ts +2 -2
- package/src/plugins/builtin/insider/display.ts +2 -1
- package/src/plugins/builtin/insider/headless.ts +16 -16
- package/src/plugins/builtin/insider/insider-data.ts +2 -1
- package/src/plugins/builtin/insider/signals-model.ts +3 -3
- package/src/plugins/builtin/insider/table-model.ts +27 -13
- package/src/plugins/builtin/insider/table.tsx +1 -1
- package/src/plugins/builtin/ipo-calendar/model.ts +4 -4
- package/src/plugins/builtin/iv-history/format.ts +8 -7
- package/src/plugins/builtin/iv-history/headless.ts +9 -8
- package/src/plugins/builtin/iv-history/pane.tsx +3 -2
- package/src/plugins/builtin/iv-history/screen-pane.tsx +5 -4
- package/src/plugins/builtin/jobs/headless.ts +11 -11
- package/src/plugins/builtin/jobs/model.ts +2 -2
- package/src/plugins/builtin/jobs/pane.tsx +5 -5
- package/src/plugins/builtin/jodi/model.ts +2 -2
- package/src/plugins/builtin/jodi/pane.tsx +2 -1
- package/src/plugins/builtin/kelly-sizer/headless.ts +4 -4
- package/src/plugins/builtin/kelly-sizer/model.ts +2 -1
- package/src/plugins/builtin/kelly-sizer/sections.tsx +2 -2
- package/src/plugins/builtin/macro-day/headless.ts +6 -5
- package/src/plugins/builtin/macro-day/model.ts +2 -1
- package/src/plugins/builtin/macro-day/pane.tsx +4 -4
- package/src/plugins/builtin/market-halts/model.ts +11 -10
- package/src/plugins/builtin/market-halts/pane.tsx +2 -1
- package/src/plugins/builtin/market-heatmap/index.tsx +4 -4
- package/src/plugins/builtin/market-movers/session-table.ts +3 -3
- package/src/plugins/builtin/market-movers/session.ts +2 -1
- package/src/plugins/builtin/market-movers/table.ts +5 -5
- package/src/plugins/builtin/market-valuation/detail.tsx +2 -2
- package/src/plugins/builtin/market-valuation/headless.ts +7 -7
- package/src/plugins/builtin/market-valuation/pane.tsx +7 -7
- package/src/plugins/builtin/members/breadth-pane.tsx +5 -4
- package/src/plugins/builtin/members/headless.ts +2 -1
- package/src/plugins/builtin/members/model.ts +3 -2
- package/src/plugins/builtin/members/pane.tsx +10 -9
- package/src/plugins/builtin/mna/distress/model.ts +2 -1
- package/src/plugins/builtin/mna/model.ts +5 -5
- package/src/plugins/builtin/money-markets/headless.ts +2 -1
- package/src/plugins/builtin/money-markets/model.ts +3 -2
- package/src/plugins/builtin/money-markets/pane.tsx +4 -4
- package/src/plugins/builtin/news/headless.ts +5 -2
- package/src/plugins/builtin/news/wire/breaking/notifications.ts +21 -19
- package/src/plugins/builtin/news/wire/news/row.ts +3 -1
- package/src/plugins/builtin/news/wire/news/table.tsx +3 -2
- package/src/plugins/builtin/news/wire/persisted-articles.ts +28 -3
- package/src/plugins/builtin/notes/headless.ts +2 -1
- package/src/plugins/builtin/notes/model.ts +2 -1
- package/src/plugins/builtin/openfda/pane.tsx +4 -3
- package/src/plugins/builtin/options/carry.ts +3 -2
- package/src/plugins/builtin/options/market-reference.ts +2 -1
- package/src/plugins/builtin/options/table.ts +48 -9
- package/src/plugins/builtin/options/view.tsx +47 -17
- package/src/plugins/builtin/options-calculator/headless.ts +3 -2
- package/src/plugins/builtin/options-calculator/pane.tsx +7 -7
- package/src/plugins/builtin/options-positioning/headless.ts +8 -7
- package/src/plugins/builtin/options-positioning/model.ts +10 -10
- package/src/plugins/builtin/options-positioning/pane.tsx +5 -5
- package/src/plugins/builtin/options-scenario/collar.ts +5 -4
- package/src/plugins/builtin/options-scenario/csp-screen-headless.ts +11 -10
- package/src/plugins/builtin/options-scenario/csp-screen-pane.tsx +15 -14
- package/src/plugins/builtin/options-scenario/csp-screen.ts +2 -1
- package/src/plugins/builtin/options-scenario/csp.ts +6 -5
- package/src/plugins/builtin/options-scenario/headless.ts +6 -5
- package/src/plugins/builtin/options-scenario/hedge.ts +3 -3
- package/src/plugins/builtin/options-scenario/pane.tsx +7 -6
- package/src/plugins/builtin/options-scenario/strategy-screen.ts +1 -1
- package/src/plugins/builtin/pe-band/headless.ts +9 -8
- package/src/plugins/builtin/pe-band/pane.tsx +7 -7
- package/src/plugins/builtin/perps/cascade.ts +3 -2
- package/src/plugins/builtin/perps/headless.ts +10 -9
- package/src/plugins/builtin/perps/model.ts +14 -14
- package/src/plugins/builtin/perps/pane.tsx +3 -2
- package/src/plugins/builtin/portfolio-list/header.tsx +2 -2
- package/src/plugins/builtin/portfolio-list/index.tsx +3 -2
- package/src/plugins/builtin/portfolio-list/pane/futures-terms.ts +4 -2
- package/src/plugins/builtin/portfolio-list/pane/period-pnl.ts +2 -1
- package/src/plugins/builtin/portfolio-list/pane/purchase-date-fx.ts +4 -2
- package/src/plugins/builtin/portfolio-list/quick-add/index.tsx +2 -2
- package/src/plugins/builtin/portfolio-list/settings.ts +4 -1
- package/src/plugins/builtin/portfolio-list/summary/index.tsx +4 -4
- package/src/plugins/builtin/power/detail.tsx +6 -5
- package/src/plugins/builtin/power/gas-model.ts +8 -7
- package/src/plugins/builtin/power/gas.tsx +2 -1
- package/src/plugins/builtin/power/headless.ts +7 -6
- package/src/plugins/builtin/power/model.ts +3 -2
- package/src/plugins/builtin/power/prices-headless.ts +10 -9
- package/src/plugins/builtin/power/prices-model.ts +3 -2
- package/src/plugins/builtin/power/prices.tsx +2 -1
- package/src/plugins/builtin/primary-dealers/model.ts +3 -3
- package/src/plugins/builtin/primary-dealers/pane.tsx +2 -2
- package/src/plugins/builtin/rate-path/headless.ts +8 -7
- package/src/plugins/builtin/rate-path/model.ts +6 -5
- package/src/plugins/builtin/rate-path/pane.tsx +6 -5
- package/src/plugins/builtin/realized-vol/fx-proxy.ts +2 -1
- package/src/plugins/builtin/realized-vol/headless.ts +11 -10
- package/src/plugins/builtin/realized-vol/pane.tsx +5 -4
- package/src/plugins/builtin/relative-rotation/headless.ts +2 -1
- package/src/plugins/builtin/relative-rotation/pane.tsx +6 -6
- package/src/plugins/builtin/research/analyst-headless.ts +5 -5
- package/src/plugins/builtin/research/analyst-model.ts +7 -7
- package/src/plugins/builtin/research/analyst-pane.tsx +7 -7
- package/src/plugins/builtin/research/client.ts +14 -0
- package/src/plugins/builtin/research/corporate-actions-pane.tsx +40 -30
- package/src/plugins/builtin/research/event-model.ts +55 -22
- package/src/plugins/builtin/research/event-sources.ts +26 -8
- package/src/plugins/builtin/research/relative-valuation-columns.ts +20 -12
- package/src/plugins/builtin/research/relative-valuation-currency.ts +16 -0
- package/src/plugins/builtin/research/relative-valuation-headless.ts +33 -21
- package/src/plugins/builtin/research/relative-valuation-model.ts +31 -17
- package/src/plugins/builtin/research/relative-valuation-pane.tsx +29 -14
- package/src/plugins/builtin/research-search/model.ts +2 -1
- package/src/plugins/builtin/research-search/saved-view.tsx +4 -3
- package/src/plugins/builtin/revenue-breakdown/model.ts +4 -4
- package/src/plugins/builtin/reverse-dcf/headless.ts +7 -7
- package/src/plugins/builtin/reverse-dcf/model.ts +4 -4
- package/src/plugins/builtin/reverse-dcf/pane.tsx +2 -2
- package/src/plugins/builtin/scanner/flow-model.ts +7 -4
- package/src/plugins/builtin/scanner/flow-pane.tsx +1 -1
- package/src/plugins/builtin/scanner/headless.ts +3 -2
- package/src/plugins/builtin/scanner/hilo-model.ts +2 -1
- package/src/plugins/builtin/scanner/live-headless.ts +2 -2
- package/src/plugins/builtin/scanner/live-model.ts +3 -2
- package/src/plugins/builtin/scanner/live-pane.tsx +5 -5
- package/src/plugins/builtin/seasonality/headless.ts +2 -1
- package/src/plugins/builtin/seasonality/pane.tsx +4 -3
- package/src/plugins/builtin/sec/filing-display.tsx +12 -15
- package/src/plugins/builtin/sec/fund-facts.ts +2 -2
- package/src/plugins/builtin/sec/headless.ts +2 -1
- package/src/plugins/builtin/sec/index.tsx +6 -2
- package/src/plugins/builtin/sectors/headless.ts +4 -4
- package/src/plugins/builtin/sectors/index.tsx +7 -7
- package/src/plugins/builtin/shared/earnings-calendar.ts +90 -6
- package/src/plugins/builtin/shared/earnings-report.ts +13 -6
- package/src/plugins/builtin/shared/research-cells.tsx +2 -2
- package/src/plugins/builtin/shared/source-footer.ts +2 -1
- package/src/plugins/builtin/shared/trend.ts +2 -2
- package/src/plugins/builtin/shared/use-quote-board.ts +9 -8
- package/src/plugins/builtin/short-interest/headless.ts +6 -6
- package/src/plugins/builtin/short-interest/model.ts +9 -9
- package/src/plugins/builtin/short-interest/publications-model.ts +5 -5
- package/src/plugins/builtin/short-interest/publications-pane.tsx +3 -2
- package/src/plugins/builtin/short-interest/watch-headless.ts +5 -5
- package/src/plugins/builtin/short-interest/watch-pane.tsx +6 -6
- package/src/plugins/builtin/short-volume/model.ts +5 -5
- package/src/plugins/builtin/short-volume/pane.tsx +4 -4
- package/src/plugins/builtin/social-mentions/headless.ts +2 -1
- package/src/plugins/builtin/social-mentions/model.ts +4 -4
- package/src/plugins/builtin/supply-chain/graph-model.ts +2 -1
- package/src/plugins/builtin/supply-chain/graph-pane.tsx +2 -2
- package/src/plugins/builtin/supply-chain/headless.ts +3 -2
- package/src/plugins/builtin/supply-chain/model.ts +4 -4
- package/src/plugins/builtin/supply-chain/pane.tsx +2 -2
- package/src/plugins/builtin/supply-chain/row-evidence.tsx +2 -1
- package/src/plugins/builtin/themes/headless.ts +2 -1
- package/src/plugins/builtin/themes/model.ts +3 -2
- package/src/plugins/builtin/themes/pane.tsx +3 -2
- package/src/plugins/builtin/thirteenf/format.ts +9 -9
- package/src/plugins/builtin/thirteenf/headless.ts +3 -2
- package/src/plugins/builtin/thirteenf/model.ts +2 -1
- package/src/plugins/builtin/thirteenf/overlap-pane.tsx +2 -1
- package/src/plugins/builtin/thirteenf/pane.tsx +5 -4
- package/src/plugins/builtin/thirteenf/report-notes.ts +2 -1
- package/src/plugins/builtin/thirteenf/signals-pane.tsx +3 -2
- package/src/plugins/builtin/thirteenf/table.ts +6 -5
- package/src/plugins/builtin/ticker-detail/adr-pair/model.ts +4 -3
- package/src/plugins/builtin/ticker-detail/data-panes/historical-prices.tsx +4 -4
- package/src/plugins/builtin/ticker-detail/data-panes/returns-pane.tsx +3 -3
- package/src/plugins/builtin/ticker-detail/financials/model.ts +83 -35
- package/src/plugins/builtin/ticker-detail/financials/ratio-table.tsx +3 -1
- package/src/plugins/builtin/ticker-detail/financials/ratios.ts +2 -2
- package/src/plugins/builtin/ticker-detail/financials/schema.ts +14 -18
- package/src/plugins/builtin/ticker-detail/financials/tab.tsx +8 -13
- package/src/plugins/builtin/ticker-detail/headless.ts +7 -5
- package/src/plugins/builtin/ticker-detail/overview/chart-scale.ts +52 -0
- package/src/plugins/builtin/ticker-detail/overview/components.tsx +4 -4
- package/src/plugins/builtin/ticker-detail/overview/model.ts +24 -13
- package/src/plugins/builtin/ticker-detail/overview/pane.tsx +6 -0
- package/src/plugins/builtin/ticker-detail/overview/tax-equivalent.ts +2 -1
- package/src/plugins/builtin/ticker-detail/overview-tab.tsx +33 -7
- package/src/plugins/builtin/ticker-detail/quote-monitor/card.tsx +7 -5
- package/src/plugins/builtin/ticker-detail/quote-monitor/rows.ts +4 -4
- package/src/plugins/builtin/ticker-detail/settings.ts +17 -0
- package/src/plugins/builtin/time-sales/headless.ts +3 -2
- package/src/plugins/builtin/time-sales/model.ts +7 -5
- package/src/plugins/builtin/time-sales/pane.tsx +7 -6
- package/src/plugins/builtin/trace-bonds/model.ts +3 -2
- package/src/plugins/builtin/trace-bonds/pane.tsx +3 -2
- package/src/plugins/builtin/treasury-auctions/client.ts +2 -1
- package/src/plugins/builtin/treasury-auctions/headless.ts +6 -6
- package/src/plugins/builtin/treasury-auctions/hk-headless.ts +3 -2
- package/src/plugins/builtin/treasury-auctions/hk-view.tsx +10 -9
- package/src/plugins/builtin/treasury-auctions/hk.ts +5 -5
- package/src/plugins/builtin/treasury-auctions/model.ts +4 -4
- package/src/plugins/builtin/treasury-auctions/pane.tsx +18 -18
- package/src/plugins/builtin/treasury-auctions/treasury-direct.ts +2 -1
- package/src/plugins/builtin/treasury-daily/model.ts +2 -2
- package/src/plugins/builtin/vol-surface/events.ts +5 -4
- package/src/plugins/builtin/vol-surface/headless.ts +19 -18
- package/src/plugins/builtin/vol-surface/heat-grid.tsx +2 -1
- package/src/plugins/builtin/vol-surface/pane.tsx +8 -7
- package/src/plugins/builtin/vol-surface/stored.ts +2 -1
- package/src/plugins/builtin/vol-surface/tables.ts +4 -3
- package/src/plugins/builtin/volatility/headless.ts +5 -4
- package/src/plugins/builtin/volatility/pane.tsx +6 -6
- package/src/plugins/builtin/world-indices/headless.ts +7 -7
- package/src/plugins/builtin/world-indices/index.tsx +3 -1
- package/src/plugins/builtin/world-venue-map/headless.ts +2 -1
- package/src/plugins/builtin/world-venue-map/layered-pane.tsx +2 -1
- package/src/plugins/builtin/world-venue-map/layers.ts +3 -2
- package/src/plugins/builtin/world-venue-map/use-geo.ts +4 -2
- package/src/plugins/builtin/yield-curve/curves.ts +3 -3
- package/src/plugins/builtin/yield-curve/headless.ts +7 -6
- package/src/plugins/builtin/yield-curve/index.tsx +5 -4
- package/src/plugins/builtin/yield-curve/swaps.tsx +2 -1
- package/src/portfolio/allocation.ts +5 -5
- package/src/portfolio/column-values.ts +47 -41
- package/src/portfolio/futures-positions.ts +2 -1
- package/src/renderers/electrobun/bun/desktop/backend-requests.ts +7 -1
- package/src/renderers/opentui/ui-host.tsx +32 -2
- package/src/renderers/share/layout-view.tsx +2 -1
- package/src/sources/gloomberb-cloud/news.ts +9 -0
- package/src/sources/gloomberb-cloud/normalizers.ts +2 -0
- package/src/sources/provider-router/search.ts +15 -10
- package/src/state/hooks/inline-tickers.ts +3 -2
- package/src/state/hooks/quote-streaming.ts +9 -10
- package/src/team/collections-sync.ts +8 -3
- package/src/telemetry/usage-counts.ts +26 -0
- package/src/tickers/company-name-listing.ts +2 -2
- package/src/tickers/company-name.ts +17 -1
- package/src/tickers/listing-venues.ts +26 -1
- package/src/tickers/renamed-listings.ts +2 -1
- package/src/tickers/search/index.ts +19 -0
- package/src/tickers/starter-symbols.ts +7 -0
- package/src/time-series/fundamentals/statement-fields.ts +11 -14
- package/src/time-series/history-acquisition.ts +1 -1
- package/src/time-series/log-scale.ts +9 -0
- package/src/time-series/reporting.ts +3 -3
- package/src/time-series/resolve.ts +6 -4
- package/src/time-series/transforms.ts +10 -5
- package/src/types/config.ts +9 -0
- package/src/types/data-provider.ts +3 -2
- package/src/types/financials.ts +15 -0
- package/src/types/instrument.ts +6 -0
- package/src/types/plugin-panes.ts +1 -1
- package/src/types/plugin-reports.ts +8 -0
- package/src/utils/datetime-format.ts +74 -33
- package/src/utils/financial-statements.ts +39 -15
- package/src/utils/format.ts +4 -9
- package/src/utils/fundamentals.ts +38 -16
- package/src/utils/growth.ts +67 -0
- package/src/utils/keyboard.ts +6 -0
- package/src/utils/options.ts +1 -1
- package/src/utils/report-timing.ts +2 -2
- package/src/utils/served-rates.ts +45 -0
- package/src/utils/text-wrap.ts +84 -3
- package/src/utils/zoned-date-time.ts +47 -22
|
@@ -1,12 +1,8 @@
|
|
|
1
|
+
import { revenueMargin } from "../../../../utils/growth";
|
|
1
2
|
import type { FinancialSubTab } from "./model";
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
denominator: number | undefined,
|
|
6
|
-
): number | undefined {
|
|
7
|
-
if (numerator == null || denominator == null || denominator === 0) return undefined;
|
|
8
|
-
return numerator / denominator;
|
|
9
|
-
}
|
|
4
|
+
/** A line over revenue: N/M where revenue is zero or negative. */
|
|
5
|
+
const financialRatio = revenueMargin;
|
|
10
6
|
|
|
11
7
|
const LOWER_IS_BETTER = "lower" as const;
|
|
12
8
|
const NEUTRAL_GROWTH = "neutral" as const;
|
|
@@ -136,7 +132,7 @@ export const FINANCIAL_SUB_TABS: FinancialSubTab[] = [
|
|
|
136
132
|
defaultExpanded: true,
|
|
137
133
|
children: [
|
|
138
134
|
{ label: "Operating CF", key: "operatingCashFlow", format: "compact" },
|
|
139
|
-
{ label: "CapEx", key: "capitalExpenditure", format: "compact" },
|
|
135
|
+
{ label: "CapEx", key: "capitalExpenditure", format: "compact", outflow: true },
|
|
140
136
|
],
|
|
141
137
|
},
|
|
142
138
|
{
|
|
@@ -183,13 +179,13 @@ export const FINANCIAL_SUB_TABS: FinancialSubTab[] = [
|
|
|
183
179
|
summaryKey: "investingCashFlow",
|
|
184
180
|
defaultExpanded: true,
|
|
185
181
|
children: [
|
|
186
|
-
{ label: "Purchase PPE", key: "purchaseOfPPE", format: "compact" },
|
|
182
|
+
{ label: "Purchase PPE", key: "purchaseOfPPE", format: "compact", outflow: true },
|
|
187
183
|
{ label: "Sale PPE", key: "saleOfPPE", format: "compact" },
|
|
188
184
|
{ label: "Net PPE", key: "netPPEPurchaseAndSale", format: "compact" },
|
|
189
|
-
{ label: "Acquisitions", key: "purchaseOfBusiness", format: "compact" },
|
|
185
|
+
{ label: "Acquisitions", key: "purchaseOfBusiness", format: "compact", outflow: true },
|
|
190
186
|
{ label: "Business Sales", key: "saleOfBusiness", format: "compact" },
|
|
191
187
|
{ label: "Net Business", key: "netBusinessPurchaseAndSale", format: "compact" },
|
|
192
|
-
{ label: "Buy Investments", key: "purchaseOfInvestment", format: "compact" },
|
|
188
|
+
{ label: "Buy Investments", key: "purchaseOfInvestment", format: "compact", outflow: true },
|
|
193
189
|
{ label: "Sell Investments", key: "saleOfInvestment", format: "compact" },
|
|
194
190
|
{ label: "Net Investments", key: "netInvestmentPurchaseAndSale", format: "compact" },
|
|
195
191
|
{ label: "Other Investing", key: "netOtherInvestingChanges", format: "compact" },
|
|
@@ -204,20 +200,20 @@ export const FINANCIAL_SUB_TABS: FinancialSubTab[] = [
|
|
|
204
200
|
defaultExpanded: true,
|
|
205
201
|
children: [
|
|
206
202
|
{ label: "Debt Issuance", key: "issuanceOfDebt", format: "compact" },
|
|
207
|
-
{ label: "Debt Repayment", key: "repaymentOfDebt", format: "compact" },
|
|
203
|
+
{ label: "Debt Repayment", key: "repaymentOfDebt", format: "compact", outflow: true },
|
|
208
204
|
{ label: "Net Debt", key: "netIssuancePaymentsOfDebt", format: "compact" },
|
|
209
205
|
{ label: "LT Debt Issuance", key: "longTermDebtIssuance", format: "compact" },
|
|
210
|
-
{ label: "LT Debt Payments", key: "longTermDebtPayments", format: "compact" },
|
|
206
|
+
{ label: "LT Debt Payments", key: "longTermDebtPayments", format: "compact", outflow: true },
|
|
211
207
|
{ label: "Net LT Debt", key: "netLongTermDebtIssuance", format: "compact" },
|
|
212
208
|
{ label: "ST Debt Issuance", key: "shortTermDebtIssuance", format: "compact" },
|
|
213
|
-
{ label: "ST Debt Payments", key: "shortTermDebtPayments", format: "compact" },
|
|
209
|
+
{ label: "ST Debt Payments", key: "shortTermDebtPayments", format: "compact", outflow: true },
|
|
214
210
|
{ label: "Net ST Debt", key: "netShortTermDebtIssuance", format: "compact" },
|
|
215
|
-
{ label: "Buybacks", key: "repurchaseOfCapitalStock", format: "compact" },
|
|
211
|
+
{ label: "Buybacks", key: "repurchaseOfCapitalStock", format: "compact", outflow: true },
|
|
216
212
|
{ label: "Stock Issuance", key: "commonStockIssuance", format: "compact" },
|
|
217
|
-
{ label: "Stock Payments", key: "commonStockPayments", format: "compact" },
|
|
213
|
+
{ label: "Stock Payments", key: "commonStockPayments", format: "compact", outflow: true },
|
|
218
214
|
{ label: "Net Stock", key: "netCommonStockIssuance", format: "compact" },
|
|
219
|
-
{ label: "Dividends Paid", key: "cashDividendsPaid", format: "compact" },
|
|
220
|
-
{ label: "Common Dividends", key: "commonStockDividendPaid", format: "compact" },
|
|
215
|
+
{ label: "Dividends Paid", key: "cashDividendsPaid", format: "compact", outflow: true },
|
|
216
|
+
{ label: "Common Dividends", key: "commonStockDividendPaid", format: "compact", outflow: true },
|
|
221
217
|
{ label: "Other Financing", key: "netOtherFinancingCharges", format: "compact" },
|
|
222
218
|
{ label: "Continuing Fin CF", key: "cashFlowFromContinuingFinancingActivities", format: "compact" },
|
|
223
219
|
],
|
|
@@ -14,6 +14,8 @@ import {
|
|
|
14
14
|
type DataTableColumn,
|
|
15
15
|
} from "../../../../components";
|
|
16
16
|
import { colors, priceColor } from "../../../../theme/colors";
|
|
17
|
+
import { notMeaningfulColor } from "../../../../components/ui/not-meaningful";
|
|
18
|
+
import { isNotMeaningful } from "../../../../utils/growth";
|
|
17
19
|
import { fiscalYearEndMonth } from "../../../../utils/fiscal-period";
|
|
18
20
|
import { displayWidth, padTo } from "../../../../utils/format";
|
|
19
21
|
import { filledPeriodPublications, filledPeriodsNote, stalePeriodNote } from "../../../../utils/financial-statements";
|
|
@@ -23,18 +25,16 @@ import {
|
|
|
23
25
|
financialPeriodWidth,
|
|
24
26
|
FINANCIAL_SUB_TABS,
|
|
25
27
|
buildFinancialRows,
|
|
26
|
-
canCompareFinancialRow,
|
|
27
28
|
collectDefaultCollapsedGroupIds,
|
|
28
29
|
collectGroupIds,
|
|
29
|
-
|
|
30
|
-
financialCellValue,
|
|
30
|
+
financialCellParts,
|
|
31
31
|
financialColumnLabel,
|
|
32
32
|
formatFinancialCell,
|
|
33
|
+
formatFinancialCellValue,
|
|
33
34
|
financialStatementCurrency,
|
|
34
35
|
financialStatementLimitations,
|
|
35
36
|
financialStatementPeriods,
|
|
36
37
|
financialSubTabFields,
|
|
37
|
-
formatFinancialValue,
|
|
38
38
|
latestFinancialPeriodEnd,
|
|
39
39
|
notInYetNote,
|
|
40
40
|
resolveFinancialPeriod,
|
|
@@ -359,7 +359,7 @@ export function ResolvedFinancialsTab({
|
|
|
359
359
|
if (nativePaneChrome || ratioTab) return FINANCIAL_COL_W;
|
|
360
360
|
const everyRow = shareFinancialUnit(buildFinancialRows(subTab.rows, displayStatements, NO_COLLAPSED_GROUPS)).rows;
|
|
361
361
|
const values = [...everyRow, ...rows].flatMap((row) => displayStatements.map((statement) => (
|
|
362
|
-
|
|
362
|
+
formatFinancialCellValue(row, statement)
|
|
363
363
|
)));
|
|
364
364
|
return financialPeriodWidth(values, periodHeaders);
|
|
365
365
|
}, [displayStatements, nativePaneChrome, periodHeaders, ratioTab, rows, subTab.rows]);
|
|
@@ -414,13 +414,7 @@ export function ResolvedFinancialsTab({
|
|
|
414
414
|
text: "",
|
|
415
415
|
};
|
|
416
416
|
|
|
417
|
-
const
|
|
418
|
-
const value = financialCellValue(row, column.statement);
|
|
419
|
-
const previousValue = previous ? financialCellValue(row, previous) : undefined;
|
|
420
|
-
const growth = (row.kind === "metric" && !row.showGrowth)
|
|
421
|
-
|| !canCompareFinancialRow(row, column.statement, previous, comparisonCurrency)
|
|
422
|
-
? undefined : computeGrowth(value, previousValue);
|
|
423
|
-
const formattedValue = formatFinancialValue(value, row, column.statement);
|
|
417
|
+
const { formattedValue, growth } = financialCellParts(row, column.statement, previousStatementMap.get(column.statement.date), comparisonCurrency);
|
|
424
418
|
const cell = formatFinancialCell(formattedValue, growth, column.width);
|
|
425
419
|
const growthColorValue = semanticGrowthValue(growth, row.growthDirection);
|
|
426
420
|
|
|
@@ -436,7 +430,8 @@ export function ResolvedFinancialsTab({
|
|
|
436
430
|
</Text>
|
|
437
431
|
<Text
|
|
438
432
|
attributes={row.kind === "group" ? TextAttributes.BOLD : TextAttributes.NONE}
|
|
439
|
-
|
|
433
|
+
// N/M growth as every pane draws it.
|
|
434
|
+
fg={growthColorValue != null ? priceColor(growthColorValue) : isNotMeaningful(growth) ? notMeaningfulColor() : colors.text}
|
|
440
435
|
>
|
|
441
436
|
{cell.growthText}
|
|
442
437
|
</Text>
|
|
@@ -7,7 +7,7 @@ import { hasValidQuoteObservationTime } from "../../../market-data/quotes/freshn
|
|
|
7
7
|
import { quoteMonitorColumns, quoteMonitorRow, QUOTE_MONITOR_BASE_COLUMNS, QUOTE_MONITOR_ROW_KEYS } from "./quote-monitor/rows";
|
|
8
8
|
import type { HeadlessPaneColumn, HeadlessPaneDefinition, HeadlessPaneFreshness, HeadlessPaneOptionValues } from "../../../types/headless";
|
|
9
9
|
import type { TimeRange } from "../../../time-series/range";
|
|
10
|
-
import { formatNumber } from "../../../utils/format";
|
|
10
|
+
import { MISSING_VALUE, formatNumber } from "../../../utils/format";
|
|
11
11
|
import { formatPriceObservation, penceFigure, quoteFormatOptions } from "../../../market-data/market/format";
|
|
12
12
|
import {
|
|
13
13
|
MISSING_VOLUME_TEXT, missingVolumeCount, missingVolumeNotice, pricePointOpenWithheld, pricePointWickFlags, priceHistoryIntegrityNotice,
|
|
@@ -164,7 +164,9 @@ export const financialStatementsHeadless: HeadlessPaneDefinition<"rows"> = {
|
|
|
164
164
|
{ key: "metric", header: "Metric" },
|
|
165
165
|
...dates.map(({ date, label }, index) => ({
|
|
166
166
|
key: date, header: label, align: "right" as const,
|
|
167
|
-
|
|
167
|
+
// Exports write the amount alone, every digit; its growth (or N/M) is in the JSON and on the text table.
|
|
168
|
+
format: (_value: unknown, row: Record<string, unknown>) => (row.cells as Array<{ formatted: string }>)[index]!.formatted,
|
|
169
|
+
textFormat: (_value: unknown, row: Record<string, unknown>) => {
|
|
168
170
|
const cell = (row.cells as Array<{ formatted: string; growthFormatted: string }>)[index]!;
|
|
169
171
|
return [cell.formatted, cell.growthFormatted].filter(Boolean).join(" ");
|
|
170
172
|
},
|
|
@@ -397,7 +399,7 @@ export const quoteComparisonHeadless: HeadlessPaneDefinition<"rows"> = {
|
|
|
397
399
|
const historyPriceColumns = (volumeMissing: boolean, decimals?: number, pence?: (close: number) => string | null): HeadlessPaneColumn[] => ["open", "high", "low", "close", "volume"].map((key) => ({
|
|
398
400
|
key, header: key, align: "right" as const,
|
|
399
401
|
format: (value: unknown) => {
|
|
400
|
-
if (value == null || !Number.isFinite(Number(value))) return key === "volume" && volumeMissing ? MISSING_VOLUME_TEXT :
|
|
402
|
+
if (value == null || !Number.isFinite(Number(value))) return key === "volume" && volumeMissing ? MISSING_VOLUME_TEXT : MISSING_VALUE;
|
|
401
403
|
if (key === "volume") return formatNumber(Number(value), 0);
|
|
402
404
|
if (decimals == null) return formatPriceObservation(Number(value), { minimumFractionDigits: 2 });
|
|
403
405
|
// A London line's close also reads in pence, as the pane's close notes it: 6.385 638.5p.
|
|
@@ -544,7 +546,7 @@ export const historicalPricesHeadless: HeadlessPaneDefinition<"rows"> = {
|
|
|
544
546
|
|
|
545
547
|
/** A percent with its sign, two decimals: `+0.63%`; a dash for a gap. */
|
|
546
548
|
function signedPercentCell(value: unknown): string {
|
|
547
|
-
if (typeof value !== "number" || !Number.isFinite(value)) return
|
|
549
|
+
if (typeof value !== "number" || !Number.isFinite(value)) return MISSING_VALUE;
|
|
548
550
|
return `${value >= 0 ? "+" : ""}${value.toFixed(2)}%`;
|
|
549
551
|
}
|
|
550
552
|
|
|
@@ -594,7 +596,7 @@ export const returnsHeadless: HeadlessPaneDefinition<"rows"> = {
|
|
|
594
596
|
// Today's daily bar is the session still trading, not a close: marked partial (DTD), as `history` marks it.
|
|
595
597
|
const dayToDate = isTodayReturnRow(returns.at(-1), series.resolution, venue, now);
|
|
596
598
|
const rows = forming || dayToDate ? [...unmarked.slice(0, -1), { ...unmarked.at(-1)!, partial: true }] : unmarked;
|
|
597
|
-
const price = (value: unknown) => typeof value === "number" && Number.isFinite(value) ? value.toFixed(decimals) :
|
|
599
|
+
const price = (value: unknown) => typeof value === "number" && Number.isFinite(value) ? value.toFixed(decimals) : MISSING_VALUE;
|
|
598
600
|
// The largest fall from a close to a later one in the window, said under the title; a yield's in bp, with its largest rise.
|
|
599
601
|
// A week's or month's close is dated by its last session, not the 1st its bar is dated by ("peak 35.70 on 2026-03-31").
|
|
600
602
|
const closes = unmarked.map((row) => ({ date: intraday ? row.time : barCloseSession(series.resolution, row.time, venue, now), close: row.close }));
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { PanelScale } from "../../../../time-series/types";
|
|
2
|
+
|
|
3
|
+
/** The Overview chart's value axis: picked from the history's range, or set by hand. */
|
|
4
|
+
export type OverviewChartScaleChoice = "auto" | PanelScale;
|
|
5
|
+
|
|
6
|
+
/** The research pane setting that remembers a scale set by hand. */
|
|
7
|
+
export const OVERVIEW_CHART_SCALE_SETTING = "overviewChartScale";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* A history whose highest close is at least this many times its lowest opens
|
|
11
|
+
* on a log axis: on a linear one its early years lie flat along the floor.
|
|
12
|
+
*/
|
|
13
|
+
export const AUTO_LOG_RANGE = 3;
|
|
14
|
+
|
|
15
|
+
export function parseOverviewChartScaleChoice(value: unknown): OverviewChartScaleChoice {
|
|
16
|
+
return value === "linear" || value === "log" ? value : "auto";
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The scale a history's own range calls for. A close at zero or below, which
|
|
21
|
+
* a log axis cannot place, keeps it linear, and so does a rate (a Treasury
|
|
22
|
+
* yield index), whose level does not compound.
|
|
23
|
+
*/
|
|
24
|
+
export function autoOverviewChartScale(
|
|
25
|
+
points: ReadonlyArray<{ value: number | null }>,
|
|
26
|
+
options: { rate?: boolean } = {},
|
|
27
|
+
): PanelScale {
|
|
28
|
+
if (options.rate) return "linear";
|
|
29
|
+
let low = Number.POSITIVE_INFINITY;
|
|
30
|
+
let high = Number.NEGATIVE_INFINITY;
|
|
31
|
+
for (const { value } of points) {
|
|
32
|
+
if (value === null || !Number.isFinite(value)) continue;
|
|
33
|
+
if (value <= 0) return "linear";
|
|
34
|
+
if (value < low) low = value;
|
|
35
|
+
if (value > high) high = value;
|
|
36
|
+
}
|
|
37
|
+
return high >= low * AUTO_LOG_RANGE ? "log" : "linear";
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function resolveOverviewChartScale(choice: OverviewChartScaleChoice, auto: PanelScale): PanelScale {
|
|
41
|
+
return choice === "auto" ? auto : choice;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The choice after switching the scale shown: the other scale, kept for every
|
|
46
|
+
* ticker the pane shows, or auto again once that is the one the history calls
|
|
47
|
+
* for, so switching back never leaves a choice behind.
|
|
48
|
+
*/
|
|
49
|
+
export function toggledOverviewChartScale(choice: OverviewChartScaleChoice, auto: PanelScale): OverviewChartScaleChoice {
|
|
50
|
+
const next: PanelScale = resolveOverviewChartScale(choice, auto) === "log" ? "linear" : "log";
|
|
51
|
+
return next === auto ? "auto" : next;
|
|
52
|
+
}
|
|
@@ -5,7 +5,7 @@ import { formatMarketPrice, formatMarketPriceWithCurrency, liveQuoteFormatOption
|
|
|
5
5
|
import { colors, hoverBg, priceColor } from "../../../../theme/colors";
|
|
6
6
|
import type { Quote } from "../../../../types/financials";
|
|
7
7
|
import { Box, Text, useUiCapabilities } from "../../../../ui";
|
|
8
|
-
import { displayWidth, formatNumber, truncateToDisplayWidth } from "../../../../utils/format";
|
|
8
|
+
import { MISSING_VALUE, displayWidth, formatNumber, truncateToDisplayWidth } from "../../../../utils/format";
|
|
9
9
|
import type { OverviewFunctionLink, PositionTableRow, StatField } from "./types";
|
|
10
10
|
import { portfolioPnlLabel } from "../../../../portfolio/position-metrics";
|
|
11
11
|
|
|
@@ -213,11 +213,11 @@ export function QuoteBook({ quote, assetCategory, width, desktopWidth }: {
|
|
|
213
213
|
const { nativePaneChrome } = useUiCapabilities();
|
|
214
214
|
// Bid, ask and spread keep the instrument's decimals on every tick ($224.58 / $224.60 / $0.02).
|
|
215
215
|
const priceOptions = liveQuoteFormatOptions(quote, quote.currency, assetCategory);
|
|
216
|
-
const bidPrice = quote.bid != null ? formatMarketPriceWithCurrency(quote.bid, quote.currency, priceOptions) :
|
|
217
|
-
const askPrice = quote.ask != null ? formatMarketPriceWithCurrency(quote.ask, quote.currency, priceOptions) :
|
|
216
|
+
const bidPrice = quote.bid != null ? formatMarketPriceWithCurrency(quote.bid, quote.currency, priceOptions) : MISSING_VALUE;
|
|
217
|
+
const askPrice = quote.ask != null ? formatMarketPriceWithCurrency(quote.ask, quote.currency, priceOptions) : MISSING_VALUE;
|
|
218
218
|
const bidText = quote.bidSize != null && quote.bidSize > 0 ? `${formatNumber(quote.bidSize, 0)} x ${bidPrice}` : bidPrice;
|
|
219
219
|
const askText = quote.askSize != null && quote.askSize > 0 ? `${formatNumber(quote.askSize, 0)} x ${askPrice}` : askPrice;
|
|
220
|
-
let spreadText =
|
|
220
|
+
let spreadText = MISSING_VALUE;
|
|
221
221
|
// A crossed book (a closing auction's last bid above its ask, Tencent's HK$430.80 / HK$430.40) has no spread to show.
|
|
222
222
|
if (quote.bid != null && quote.ask != null && quote.ask >= quote.bid) {
|
|
223
223
|
const spread = quote.ask - quote.bid;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { forwardFiscalYear, forwardPEAsked, formatPriceEarnings, NOT_MEANINGFUL } from "../../../../utils/price-earnings";
|
|
2
2
|
import { convertMarketCapitalization } from "../../../../utils/market-capitalization";
|
|
3
3
|
import { priceColor } from "../../../../theme/colors";
|
|
4
|
+
import { notMeaningfulColor } from "../../../../components/ui/not-meaningful";
|
|
5
|
+
import { NOT_MEANINGFUL_TEXT } from "../../../../utils/growth";
|
|
6
|
+
import type { ServedRate } from "../../../../utils/served-rates";
|
|
4
7
|
import type { CedearRatio, CompanyProfile, DepositaryPair, NextEarnings, Quote, TickerFinancials } from "../../../../types/financials";
|
|
5
8
|
import { adrRatioText } from "../../../../utils/depositary-receipt";
|
|
6
9
|
import { cedearRatioText, ratioCount } from "../../../../market-data/depositary-pair";
|
|
@@ -9,6 +12,7 @@ import type { Portfolio, TickerPosition, TickerRecord } from "../../../../types/
|
|
|
9
12
|
import type { BrokerInstanceConfig } from "../../../../types/config";
|
|
10
13
|
import type { BrokerAccount } from "../../../../types/trading";
|
|
11
14
|
import {
|
|
15
|
+
MISSING_VALUE,
|
|
12
16
|
formatCompact,
|
|
13
17
|
formatCompactCurrency,
|
|
14
18
|
formatCurrency,
|
|
@@ -31,7 +35,7 @@ import { getPortfolioPositionMetrics, getPortfolioQuoteDisplay, resolvePortfolio
|
|
|
31
35
|
import { listingDividendYield, liveForwardPE, liveMarketCapitalization, liveTrailingPE } from "../../../../market-data/quotes/live-valuation";
|
|
32
36
|
import { atRegularSessionPrice } from "../../../../market-data/quotes/regular-session-valuation";
|
|
33
37
|
import { formatReportedMoney, REPORTING_CURRENCY_NOT_SOURCED } from "../../../../utils/reported-money";
|
|
34
|
-
import { enterpriseValueCheck, enterpriseValueComputed, enterpriseValueNotMeaningful, fundamentalsCurrency,
|
|
38
|
+
import { enterpriseValueCheck, enterpriseValueComputed, enterpriseValueNotMeaningful, fundamentalsCurrency, financialEnterpriseValue, fundamentalsEpsCurrency, reportedEnterpriseValue } from "../../../../utils/fundamentals";
|
|
35
39
|
import { formatShortDate } from "../../../../utils/datetime-format";
|
|
36
40
|
import { safeExternalUrl } from "../../../../utils/external-url";
|
|
37
41
|
import type { FundBondFacts } from "../../../../api-client/fund-facts";
|
|
@@ -63,7 +67,7 @@ function daysUntil(date: string, today: string): number {
|
|
|
63
67
|
return Math.round((Date.parse(`${date}T00:00:00Z`) - Date.parse(`${today}T00:00:00Z`)) / 86_400_000);
|
|
64
68
|
}
|
|
65
69
|
|
|
66
|
-
/** "Sep
|
|
70
|
+
/** "10 Sep", or "12 Dec '25" in another year. */
|
|
67
71
|
function calendarDate(date: string, today: string): string {
|
|
68
72
|
return formatShortDate(`${date}T00:00:00Z`, { year: date.slice(0, 4) === today.slice(0, 4) ? false : "2-digit", utc: true });
|
|
69
73
|
}
|
|
@@ -158,6 +162,7 @@ export function buildOverviewStats({
|
|
|
158
162
|
bond = null,
|
|
159
163
|
runway = null,
|
|
160
164
|
trailingEpsYear,
|
|
165
|
+
notMeaningful = {},
|
|
161
166
|
}: {
|
|
162
167
|
quote: Quote | undefined;
|
|
163
168
|
fundamentals: TickerFinancials["fundamentals"] | undefined;
|
|
@@ -187,6 +192,8 @@ export function buildOverviewStats({
|
|
|
187
192
|
runway?: CashRunway | null;
|
|
188
193
|
/** The fiscal year the trailing EPS is ("FY Mar-26"), when it is a year's a quarter or more old (trailingEpsFiscalYear). */
|
|
189
194
|
trailingEpsYear?: string;
|
|
195
|
+
/** Why a served margin or revenue growth is N/M (servedRatesNotMeaningful): read N/M, as RV and `ticker` read it. */
|
|
196
|
+
notMeaningful?: Partial<Record<ServedRate, string>>;
|
|
190
197
|
}): StatField[] {
|
|
191
198
|
const stats: StatField[] = [];
|
|
192
199
|
// Amounts no source names the currency of are bare; the first says so after it, once for all of them.
|
|
@@ -316,14 +323,16 @@ export function buildOverviewStats({
|
|
|
316
323
|
}
|
|
317
324
|
const runwayField = runwayStat(runway);
|
|
318
325
|
if (runwayField) stats.push(runwayField);
|
|
326
|
+
// A margin over revenue at or below zero, and growth off it, read N/M in N/M's own colour, never a sign's.
|
|
327
|
+
const notMeaningfulStat = (label: string): StatField => ({ label, value: NOT_MEANINGFUL_TEXT, valueColor: notMeaningfulColor() });
|
|
319
328
|
if (fundamentals?.operatingMargin != null) {
|
|
320
|
-
stats.push({ label: "Op Margin", value: formatLevelPercent(fundamentals.operatingMargin) });
|
|
329
|
+
stats.push(notMeaningful.operatingMargin ? notMeaningfulStat("Op Margin") : { label: "Op Margin", value: formatLevelPercent(fundamentals.operatingMargin) });
|
|
321
330
|
}
|
|
322
331
|
if (fundamentals?.profitMargin != null) {
|
|
323
|
-
stats.push({ label: "Profit Marg", value: formatLevelPercent(fundamentals.profitMargin) });
|
|
332
|
+
stats.push(notMeaningful.profitMargin ? notMeaningfulStat("Profit Marg") : { label: "Profit Marg", value: formatLevelPercent(fundamentals.profitMargin) });
|
|
324
333
|
}
|
|
325
334
|
if (fundamentals?.revenueGrowth != null) {
|
|
326
|
-
stats.push({
|
|
335
|
+
stats.push(notMeaningful.revenueGrowth ? notMeaningfulStat("Rev Growth") : {
|
|
327
336
|
label: "Rev Growth",
|
|
328
337
|
value: formatPercent(fundamentals.revenueGrowth),
|
|
329
338
|
valueColor: priceColor(fundamentals.revenueGrowth),
|
|
@@ -334,11 +343,13 @@ export function buildOverviewStats({
|
|
|
334
343
|
const enterpriseValue = reportedEnterpriseValue(priced);
|
|
335
344
|
// At or below zero, N/M as a P/E over a loss reads, with why in the space a stat has; valuation gives the full reason.
|
|
336
345
|
if (enterpriseValueNotMeaningful(priced)) {
|
|
337
|
-
// A bank's deposits are funding, not debt (
|
|
346
|
+
// A bank's deposits and an insurer's float are funding, not debt (withFinancialEnterpriseValue);
|
|
347
|
+
// any other's cash exceeds the rest.
|
|
348
|
+
const financial = financialEnterpriseValue(priced);
|
|
338
349
|
stats.push({ label: "EV", value: formatPriceEarnings(NOT_MEANINGFUL),
|
|
339
|
-
detail:
|
|
350
|
+
detail: financial ? financial.replace(/^n\/m /, "") : ["cash > cap + debt", "cash > cap"] });
|
|
340
351
|
} else if (fundamentals?.unavailableFields?.includes("enterpriseValue")) {
|
|
341
|
-
stats.push({ label: "EV", value:
|
|
352
|
+
stats.push({ label: "EV", value: MISSING_VALUE });
|
|
342
353
|
} else if (enterpriseValue != null) {
|
|
343
354
|
// Market cap + debt - cash (+ minority interest) where the provider's is more than 5% from it, as every view
|
|
344
355
|
// shows it; the notice under the pane gives its inputs where the provider's is far off (enterpriseValueGapIsLarge).
|
|
@@ -444,7 +455,7 @@ export function buildPositionRows({
|
|
|
444
455
|
currentPrice != null ? toBase(currentPrice, quoteCurrency) : null);
|
|
445
456
|
const pnlValue = selectedPnl.value;
|
|
446
457
|
const percent = portfolioPnlPercent(pnlValue, costBasisBase != null ? Math.abs(costBasisBase) : Number.NaN);
|
|
447
|
-
const returnPercent = percent === null ?
|
|
458
|
+
const returnPercent = percent === null ? MISSING_VALUE : formatPercentRaw(percent);
|
|
448
459
|
const unit = metrics.priceBasis === "percent-of-par" ? "" : ticker.metadata.assetCategory === "BOND" ? " units" : metrics.multiplierHint > 1 ? " ct" : " sh";
|
|
449
460
|
|
|
450
461
|
return {
|
|
@@ -465,10 +476,10 @@ export function buildPositionRows({
|
|
|
465
476
|
priceBasis: currentPrice != null ? quote?.priceBasis : metrics.priceBasis,
|
|
466
477
|
maxWidth: 9,
|
|
467
478
|
}, fallbackMarkCurrency))
|
|
468
|
-
:
|
|
469
|
-
cost: costBasisBase != null ? formatCurrency(costBasisBase, baseCurrency) :
|
|
470
|
-
value: marketValueBase != null ? formatCurrency(marketValueBase, baseCurrency) :
|
|
471
|
-
pnl: pnlValue != null ? `${pnlValue >= 0 ? "+" : ""}${formatCurrency(pnlValue, baseCurrency)}` :
|
|
479
|
+
: MISSING_VALUE,
|
|
480
|
+
cost: costBasisBase != null ? formatCurrency(costBasisBase, baseCurrency) : MISSING_VALUE,
|
|
481
|
+
value: marketValueBase != null ? formatCurrency(marketValueBase, baseCurrency) : MISSING_VALUE,
|
|
482
|
+
pnl: pnlValue != null ? `${pnlValue >= 0 ? "+" : ""}${formatCurrency(pnlValue, baseCurrency)}` : MISSING_VALUE,
|
|
472
483
|
ret: returnPercent,
|
|
473
484
|
pnlValue,
|
|
474
485
|
pnlBasis: selectedPnl.basis,
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
useAppDispatch,
|
|
10
10
|
useOptionalPaneInstanceId,
|
|
11
11
|
usePaneInstance,
|
|
12
|
+
usePaneSettingValue,
|
|
12
13
|
usePaneTicker,
|
|
13
14
|
} from "../../../../state/app/context";
|
|
14
15
|
import { usePluginAppActions } from "../../../runtime";
|
|
@@ -21,6 +22,7 @@ import { useTickerSnapshotState } from "../../../../market-data/hooks";
|
|
|
21
22
|
import { taxRatesFromSettings } from "../../../../market-data/tax-equivalent";
|
|
22
23
|
import { PaneLinkMenu } from "../../../../components";
|
|
23
24
|
import { FunctionLinkRow } from "./components";
|
|
25
|
+
import { OVERVIEW_CHART_SCALE_SETTING, parseOverviewChartScaleChoice } from "./chart-scale";
|
|
24
26
|
|
|
25
27
|
/** Registered by the chart composer, in the same plugin as this tab. */
|
|
26
28
|
const CHART_TAB_ID = "chart";
|
|
@@ -38,6 +40,8 @@ export function OverviewResearchTab({ width, height, focused }: TickerResearchTa
|
|
|
38
40
|
const dividend = useOverviewDividend(ticker?.metadata.ticker ?? null, ticker?.metadata.exchange ?? "", financials?.fundamentals);
|
|
39
41
|
// A pane locked to one tab has nowhere to go.
|
|
40
42
|
const lockedToOneTab = getTickerResearchPaneSettings(paneInstance?.settings).hideTabs;
|
|
43
|
+
// The chart's scale, once set from the pane menu, holds for every ticker the pane shows.
|
|
44
|
+
const [chartScale, setChartScale] = usePaneSettingValue<unknown>(OVERVIEW_CHART_SCALE_SETTING, "auto");
|
|
41
45
|
const openChart = useCallback(() => {
|
|
42
46
|
if (paneId) dispatch({ type: "UPDATE_PANE_STATE", paneId, patch: { activeTabId: CHART_TAB_ID } });
|
|
43
47
|
}, [dispatch, paneId]);
|
|
@@ -61,6 +65,8 @@ export function OverviewResearchTab({ width, height, focused }: TickerResearchTa
|
|
|
61
65
|
dividend={dividend}
|
|
62
66
|
snapshot={snapshot}
|
|
63
67
|
tax={taxRatesFromSettings(paneInstance?.settings)}
|
|
68
|
+
chartScale={parseOverviewChartScaleChoice(chartScale)}
|
|
69
|
+
onChartScaleChange={paneId ? setChartScale : undefined}
|
|
64
70
|
news={ticker ? (contentWidth: number) => (
|
|
65
71
|
<TickerNewsHeadlines ticker={ticker} width={contentWidth} openNewsView={openNewsView}>
|
|
66
72
|
<PaneLinkMenu><FunctionLinkRow link={NEWS} onOpen={openFunction} /></PaneLinkMenu>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../../utils/format";
|
|
1
2
|
import { useCallback } from "react";
|
|
2
3
|
import type { FundBondFacts } from "../../../../api-client/fund-facts";
|
|
3
4
|
import {
|
|
@@ -44,7 +45,7 @@ export function useOverviewTaxEquivalent(input: {
|
|
|
44
45
|
* cut to fit; DVD and fundamentals give the formulas whole.
|
|
45
46
|
*/
|
|
46
47
|
export function taxEquivalentFields(analysis: TaxEquivalentAnalysis | { error: string }): StatField[] {
|
|
47
|
-
const missing = (label: string, why: string): StatField => ({ label, value:
|
|
48
|
+
const missing = (label: string, why: string): StatField => ({ label, value: MISSING_VALUE, detail: why, clipDetail: true });
|
|
48
49
|
if ("error" in analysis) return [missing("Tax-Eq Yld", analysis.error)];
|
|
49
50
|
const lines = taxEquivalentLines(analysis);
|
|
50
51
|
const line = (key: string) => lines.find((entry) => entry.key === key);
|
|
@@ -6,7 +6,7 @@ import { mayBeUsEquityOrFundTicker } from "../../../utils/sec";
|
|
|
6
6
|
import { ResearchTradeActions, researchTradeMatches, useResearchTrading } from "../shared/research-trading";
|
|
7
7
|
import { instrumentFromTicker } from "../../../market-data/request-types";
|
|
8
8
|
import { useMemo, type ReactNode } from "react";
|
|
9
|
-
import { EmptyState, ExternalLinkText, PaneLinkMenu, PaneStatusBody, SectionHeading, unavailableText, usePaneNoticeFooter } from "../../../components";
|
|
9
|
+
import { EmptyState, ExternalLinkText, PaneLinkMenu, PaneStatusBody, SectionHeading, unavailableText, usePaneMenuItems, usePaneNoticeFooter } from "../../../components";
|
|
10
10
|
import { CompositeChart, pricePointsToResolvedSeries } from "../../../components/chart/composite";
|
|
11
11
|
import { CompanyLogo, resolveCompanyLogoSrc } from "../../../components/company-logo";
|
|
12
12
|
import { bodyLineInk, FigureText, figureLineInk, useFigureCells } from "../../../components/ui/figure";
|
|
@@ -39,8 +39,9 @@ import { Box, ScrollBox, Text, useUiCapabilities } from "../../../ui";
|
|
|
39
39
|
import { publicTickerKey, resolveExchangeTimeZone } from "../../../utils/exchanges";
|
|
40
40
|
import { convertCurrency, displayWidth, formatPercentRaw, truncateToDisplayWidth } from "../../../utils/format";
|
|
41
41
|
import {
|
|
42
|
-
appTtmRate, enterpriseValueGapIsLarge, enterpriseValueReconciliationNote, trailingEpsFiscalYear, ttmAtAppRate, ttmConversionNote,
|
|
42
|
+
appTtmRate, enterpriseValueGapIsLarge, enterpriseValueReconciliationNote, trailingEpsFiscalYear, ttmAtAppRate, ttmConversionNote, withFinancialEnterpriseValue,
|
|
43
43
|
} from "../../../utils/fundamentals";
|
|
44
|
+
import { servedRatesNotMeaningful } from "../../../utils/served-rates";
|
|
44
45
|
import { atRegularSessionPrice } from "../../../market-data/quotes/regular-session-valuation";
|
|
45
46
|
import { zonedDateKey } from "../../../utils/zoned-date-time";
|
|
46
47
|
import { sharesOutstandingInReceipts } from "../../../utils/depositary-receipt";
|
|
@@ -74,6 +75,11 @@ import { useOfferingNote } from "./financials/offerings";
|
|
|
74
75
|
import { taxEquivalentFields, useOverviewTaxEquivalent } from "./overview/tax-equivalent";
|
|
75
76
|
import { distributionBasis, type TaxRates } from "../../../market-data/tax-equivalent";
|
|
76
77
|
import { currentListingName } from "../../../tickers/listing-name";
|
|
78
|
+
import { isYieldIndexSymbol } from "../../../tickers/index-roots";
|
|
79
|
+
import { hiddenOnLogScale, logScaleHiddenWarning } from "../../../time-series/log-scale";
|
|
80
|
+
import {
|
|
81
|
+
autoOverviewChartScale, resolveOverviewChartScale, toggledOverviewChartScale, type OverviewChartScaleChoice,
|
|
82
|
+
} from "./overview/chart-scale";
|
|
77
83
|
|
|
78
84
|
/** Cells between the Day and 52W ranges when they share a row. */
|
|
79
85
|
const RANGE_PAIR_GAP = 4;
|
|
@@ -116,6 +122,10 @@ interface OverviewTabProps {
|
|
|
116
122
|
snapshot?: TickerSnapshotState;
|
|
117
123
|
/** The rates `fn DES --tax-rate` set (taxRatesFromSettings): a fund's tax-equivalent yield and muni/Treasury ratio follow its facts. */
|
|
118
124
|
tax?: { rates: TaxRates } | { error: string } | null;
|
|
125
|
+
/** The price chart's value axis as the pane remembers it; auto picks log for a history of a wide range. */
|
|
126
|
+
chartScale?: OverviewChartScaleChoice;
|
|
127
|
+
/** Remembers the choice the pane menu's Log Scale switches to; without it the menu has no such item. */
|
|
128
|
+
onChartScaleChange?: (choice: OverviewChartScaleChoice) => void;
|
|
119
129
|
}
|
|
120
130
|
|
|
121
131
|
/** Nothing of the ticker is in yet: no quote, profile, figures or history. */
|
|
@@ -147,7 +157,10 @@ export function OverviewTab(props: OverviewTabProps) {
|
|
|
147
157
|
/** Where a fund's facts open: the ETF function, its facts over its filings. */
|
|
148
158
|
const FUND_FACTS_LINK: OverviewFunctionLink = { name: "Fund Facts", templateId: "sec-etf-pane" };
|
|
149
159
|
|
|
150
|
-
function ResolvedOverviewTab({
|
|
160
|
+
function ResolvedOverviewTab({
|
|
161
|
+
width, height, focused = false, ticker, financials, onOpenChart, onOpenFunction, perpetuals, news, dividend, tax = null,
|
|
162
|
+
chartScale: chartScaleChoice = "auto", onChartScaleChange,
|
|
163
|
+
}: OverviewTabProps & { ticker: TickerRecord }) {
|
|
151
164
|
const trade = useResearchTrading();
|
|
152
165
|
const baseCurrency = useAppSelector((state) => state.config.baseCurrency);
|
|
153
166
|
const portfolios = useAppSelector((state) => state.config.portfolios);
|
|
@@ -188,9 +201,9 @@ function ResolvedOverviewTab({ width, height, focused = false, ticker, financial
|
|
|
188
201
|
[fxObservations],
|
|
189
202
|
);
|
|
190
203
|
const ttmRate = appTtmRate(fundamentals, (currency) => fxObservations.get(currency));
|
|
191
|
-
// A bank's EV reads n/m: its deposits are funding, not debt.
|
|
204
|
+
// A bank's or an insurer's EV reads n/m: its deposits or float are funding, not debt.
|
|
192
205
|
const shownFundamentals = useMemo(
|
|
193
|
-
() => (fundamentals ? ttmAtAppRate(
|
|
206
|
+
() => (fundamentals ? ttmAtAppRate(withFinancialEnterpriseValue(fundamentals, profile), ttmRate) : fundamentals),
|
|
194
207
|
[fundamentals, profile, ttmRate?.rate, ttmRate?.asOf],
|
|
195
208
|
);
|
|
196
209
|
const quoteCurrency = quote?.currency || ticker.metadata.currency || baseCurrency;
|
|
@@ -252,9 +265,20 @@ function ResolvedOverviewTab({ width, height, focused = false, ticker, financial
|
|
|
252
265
|
panelId: "price",
|
|
253
266
|
timeBasis: chartTimeZone ? { kind: "market", timeZone: chartTimeZone } : undefined,
|
|
254
267
|
});
|
|
268
|
+
// Years of history from a few dollars to hundreds read on a log axis, the Chart tab's own, so the early ones do not lie flat.
|
|
269
|
+
const autoChartScale = autoOverviewChartScale(priceSeries.points, { rate: isYieldIndexSymbol(ticker.metadata.ticker) });
|
|
270
|
+
const chartScale = resolveOverviewChartScale(chartScaleChoice, autoChartScale);
|
|
271
|
+
const hiddenOnLog = hasHistory && chartScale === "log"
|
|
272
|
+
? priceSeries.points.filter((point) => hiddenOnLogScale(point.value)).length : 0;
|
|
273
|
+
usePaneMenuItems("overview:chart-scale", () => hasHistory && onChartScaleChange ? [{
|
|
274
|
+
id: "overview-log-scale",
|
|
275
|
+
label: t("Log Scale"),
|
|
276
|
+
checked: chartScale === "log",
|
|
277
|
+
onSelect: () => onChartScaleChange(toggledOverviewChartScale(chartScaleChoice, autoChartScale)),
|
|
278
|
+
}] : null, [autoChartScale, chartScale, chartScaleChoice, hasHistory, onChartScaleChange]);
|
|
255
279
|
// A provider EV well off market cap + debt - cash, or why a withdrawn one is unavailable, at the
|
|
256
280
|
// regular session price the EV beside it is shown at. A gap of a few percent is the valuation panes' detail.
|
|
257
|
-
const pricedForEnterpriseValue = atRegularSessionPrice({ quote, fundamentals:
|
|
281
|
+
const pricedForEnterpriseValue = atRegularSessionPrice({ quote, fundamentals: withFinancialEnterpriseValue(fundamentals, profile) }).fundamentals;
|
|
258
282
|
const enterpriseValueNote = enterpriseValueGapIsLarge(pricedForEnterpriseValue)
|
|
259
283
|
? enterpriseValueReconciliationNote(pricedForEnterpriseValue, undefined, financials ?? undefined) : undefined;
|
|
260
284
|
// Months of cash, for a company that burns it, and an offering since its balance sheet that the cash is not in yet.
|
|
@@ -270,6 +294,7 @@ function ResolvedOverviewTab({ width, height, focused = false, ticker, financial
|
|
|
270
294
|
...(runwayOfferingNote ? [runwayOfferingNote] : []),
|
|
271
295
|
...(runway?.trailingGap === "short-history" ? [`Runway TTM: ${SHORT_RUNWAY_HISTORY}.`] : []),
|
|
272
296
|
...(priceSeries.warning ? [priceSeries.warning] : []),
|
|
297
|
+
...(hiddenOnLog > 0 ? [logScaleHiddenWarning(priceSeries.label, hiddenOnLog)] : []),
|
|
273
298
|
...(enterpriseValueNote ? [enterpriseValueNote] : []),
|
|
274
299
|
...(ttmNote ? [ttmNote] : []),
|
|
275
300
|
...(capitalization?.provenance.kind === "fundamentals" && !capitalization.live
|
|
@@ -418,6 +443,7 @@ function ResolvedOverviewTab({ width, height, focused = false, ticker, financial
|
|
|
418
443
|
bond: fundFacts?.bond ?? null,
|
|
419
444
|
runway,
|
|
420
445
|
trailingEpsYear: financials ? trailingEpsFiscalYear(financials) : undefined,
|
|
446
|
+
notMeaningful: servedRatesNotMeaningful(shownFundamentals, financials),
|
|
421
447
|
});
|
|
422
448
|
const profileFields = buildProfileFields({
|
|
423
449
|
// The contract section names an option's type.
|
|
@@ -627,7 +653,7 @@ function ResolvedOverviewTab({ width, height, focused = false, ticker, financial
|
|
|
627
653
|
focused={false}
|
|
628
654
|
interactive={false}
|
|
629
655
|
series={[priceSeries]}
|
|
630
|
-
panels={[{ id: "price" }]}
|
|
656
|
+
panels={[{ id: "price", scale: chartScale }]}
|
|
631
657
|
levels={trade && researchTradeMatches(trade, instrumentFromTicker(ticker)) ? { seriesId: priceSeries.id, items: trade.levels } : undefined}
|
|
632
658
|
showLegend={false}
|
|
633
659
|
/>
|
|
@@ -302,8 +302,8 @@ export function QuoteMonitorCard({
|
|
|
302
302
|
position: "relative",
|
|
303
303
|
zIndex: 1,
|
|
304
304
|
display: "grid",
|
|
305
|
-
// The
|
|
306
|
-
gridTemplateColumns: "minmax(
|
|
305
|
+
// The symbol and the price keep their natural widths; the name gives way first.
|
|
306
|
+
gridTemplateColumns: "minmax(min-content, 1fr) auto",
|
|
307
307
|
// The symbol and price, what the price is as of, an extended print, the range, a perpetual.
|
|
308
308
|
gridTemplateRows: "auto auto 1fr auto auto",
|
|
309
309
|
columnGap: "var(--gloom-space-md)",
|
|
@@ -321,7 +321,7 @@ export function QuoteMonitorCard({
|
|
|
321
321
|
overflow: "hidden",
|
|
322
322
|
}}
|
|
323
323
|
>
|
|
324
|
-
<Text attributes={TextAttributes.BOLD} fg={symbolFg} bg={symbolBg} style={desktopSymbolStyle}>
|
|
324
|
+
<Text attributes={TextAttributes.BOLD} fg={symbolFg} bg={symbolBg} style={{ ...desktopSymbolStyle, whiteSpace: "nowrap" }}>
|
|
325
325
|
{label}
|
|
326
326
|
</Text>
|
|
327
327
|
{quoteFailed && !endedRow && (
|
|
@@ -330,7 +330,8 @@ export function QuoteMonitorCard({
|
|
|
330
330
|
</Text>
|
|
331
331
|
)}
|
|
332
332
|
{!quoteFailed && ticker?.metadata.name && (
|
|
333
|
-
|
|
333
|
+
// No width of its own: the column is the symbol's, and the name is cut to it.
|
|
334
|
+
<Text fg={colors.textDim} style={{ ...DESKTOP_META_LINE_STYLE, contain: "inline-size" }}>
|
|
334
335
|
{ticker.metadata.name}
|
|
335
336
|
</Text>
|
|
336
337
|
)}
|
|
@@ -413,7 +414,8 @@ export function QuoteMonitorCard({
|
|
|
413
414
|
<Text
|
|
414
415
|
fg={colors.textDim}
|
|
415
416
|
style={{
|
|
416
|
-
|
|
417
|
+
// Across the card, so a wide range never widens the price's column into the symbol's.
|
|
418
|
+
gridColumn: "1 / -1",
|
|
417
419
|
gridRow: "4",
|
|
418
420
|
justifySelf: "end",
|
|
419
421
|
alignSelf: "end",
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import { quoteExportFeed, quoteExportUnit, quoteSourceName, type BrokerNameOf } from "../../../../market-data/quotes/export-identity";
|
|
10
10
|
import { isYieldIndexSymbol } from "../../../../tickers/index-roots";
|
|
11
11
|
import { toBasisPoints } from "../../../../utils/basis-points";
|
|
12
|
-
import { formatPercentRaw } from "../../../../utils/format";
|
|
12
|
+
import { MISSING_VALUE, formatPercentRaw } from "../../../../utils/format";
|
|
13
13
|
import { parsePublicTickerKey } from "../../../../utils/exchanges";
|
|
14
14
|
import { quoteFreshnessFields } from "../../shared/report-freshness";
|
|
15
15
|
|
|
@@ -20,7 +20,7 @@ import { quoteFreshnessFields } from "../../shared/report-freshness";
|
|
|
20
20
|
|
|
21
21
|
/** A price or move in the row's own currency, as the cards draw it. */
|
|
22
22
|
function quoteAmount(value: unknown, row: Record<string, unknown>, signed = false): string {
|
|
23
|
-
if (typeof value !== "number" || !Number.isFinite(value)) return
|
|
23
|
+
if (typeof value !== "number" || !Number.isFinite(value)) return MISSING_VALUE;
|
|
24
24
|
const currency = typeof row.currency === "string" && row.currency.trim() ? row.currency : undefined;
|
|
25
25
|
const base: MarketFormatOptions = { assetCategory: typeof row.instrumentType === "string" ? row.instrumentType : undefined,
|
|
26
26
|
priceBasis: row.priceBasis === "per-unit" || row.priceBasis === "percent-of-par" ? row.priceBasis : undefined };
|
|
@@ -33,7 +33,7 @@ function quoteAmount(value: unknown, row: Record<string, unknown>, signed = fals
|
|
|
33
33
|
const amount = currency
|
|
34
34
|
? formatMarketPriceWithCurrency(value, currency, options)
|
|
35
35
|
: formatMarketPrice(value, options);
|
|
36
|
-
return amount ===
|
|
36
|
+
return amount === MISSING_VALUE ? amount : `${signed && value >= 0 ? "+" : ""}${amount}`;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
function percentCell(value: unknown): string {
|
|
@@ -74,7 +74,7 @@ function extendedSessionColumn(session: ExtendedSession): HeadlessPaneColumn {
|
|
|
74
74
|
key: "extendedPrice", header: EXTENDED_SESSION_LABELS[session], align: "right",
|
|
75
75
|
format: (value, row) => row.extendedSession === session
|
|
76
76
|
? `${quoteAmount(value, row)} ${percentCell(row.extendedChangePercent)}`
|
|
77
|
-
:
|
|
77
|
+
: MISSING_VALUE,
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
|