gloomberb 0.20.11 → 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 +2 -1
- package/src/account/billing.ts +3 -2
- package/src/account/upgrade-dialog.tsx +8 -8
- package/src/api-client/awards.ts +16 -0
- package/src/api-client/central-bank-rates.ts +5 -0
- package/src/api-client/data.ts +55 -2
- package/src/api-client/index.ts +28 -3
- package/src/api-client/install-experiments.ts +146 -0
- package/src/api-client/request.ts +86 -3
- package/src/api-client/socket-connection.ts +12 -1
- package/src/api-client/socket.ts +21 -3
- package/src/api-client/supply-chain-graph.ts +4 -2
- package/src/api-client/supply-chain.ts +8 -0
- package/src/api-client/telemetry.ts +47 -0
- package/src/api-client/types/econ.ts +10 -7
- package/src/api-client/types/filings-and-calls.ts +8 -0
- package/src/api-client/types/market.ts +4 -0
- package/src/api-client/types/news.ts +16 -0
- package/src/app/global-shortcuts.ts +2 -1
- package/src/app/keybindings/actions.ts +19 -0
- package/src/app/pane-runtime/index.tsx +18 -3
- package/src/app/pane-runtime/layout-placement.ts +63 -0
- package/src/app/pane-runtime/ticker-open-runtime.ts +10 -2
- 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/capabilities/chart-series.ts +4 -1
- package/src/cli/board-coins.ts +10 -1
- package/src/cli/commands/crypto-hints.ts +3 -2
- package/src/cli/commands/fred-series.ts +0 -54
- package/src/cli/commands/market.ts +260 -63
- package/src/cli/commands/overview.ts +50 -17
- package/src/cli/commands/search.ts +140 -17
- package/src/cli/commands/ticker.ts +37 -17
- package/src/cli/desktop-pane-shot.ts +27 -2
- package/src/cli/earnings-calendar.ts +33 -53
- package/src/cli/fx-quote-rate.ts +1 -1
- package/src/cli/glossary.ts +14 -5
- package/src/cli/history-catalog-series.ts +85 -0
- package/src/cli/history-rows.ts +18 -1
- package/src/cli/index.ts +1 -1
- package/src/cli/known-gaps.ts +9 -0
- package/src/cli/list-progress.ts +45 -0
- package/src/cli/listing-arg.ts +176 -25
- package/src/cli/name-entries.ts +8 -4
- package/src/cli/not-a-ticker.ts +2 -2
- 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 +52 -5
- package/src/cli/pane-functions/headless.ts +8 -8
- package/src/cli/pane-functions/index.ts +8 -5
- package/src/cli/pane-functions/market-session.ts +66 -14
- package/src/cli/pane-functions/options.ts +5 -0
- package/src/cli/pane-functions/report.ts +4 -1
- package/src/cli/pane-functions/resolver.ts +9 -2
- package/src/cli/pane-functions/screenshot-assessment.ts +28 -3
- package/src/cli/pane-functions/screenshot-types.ts +6 -0
- package/src/cli/perpetual-contract.ts +4 -4
- package/src/cli/quote-answer.ts +55 -12
- package/src/cli/quote-list-reads.ts +87 -0
- package/src/cli/report-tables.ts +70 -13
- package/src/cli/result.ts +26 -3
- package/src/cli/symbol-list.ts +31 -4
- package/src/cli/terminal-code-hints.ts +83 -0
- package/src/cli/ticker-resolution.ts +2 -1
- package/src/cli/treasury-yields.ts +5 -0
- 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/action-runtime.ts +2 -0
- 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/command-bar/routing/launch-request.ts +2 -1
- package/src/components/command-bar/routing/navigation-state.ts +4 -2
- package/src/components/command-bar/workflow/types.ts +6 -0
- package/src/components/data-table/view.tsx +29 -6
- package/src/components/form-modal/host.tsx +1 -1
- package/src/components/layout/detached-pane-shell.tsx +3 -0
- package/src/components/layout/double-escape-close.ts +34 -3
- package/src/components/layout/floating-pane.tsx +10 -4
- package/src/components/layout/header.tsx +3 -2
- package/src/components/layout/market-summary.ts +3 -3
- package/src/components/layout/pane/cycle-order.ts +66 -2
- package/src/components/layout/pane/error-boundary.tsx +2 -1
- package/src/components/layout/pane/header.tsx +140 -31
- package/src/components/layout/pane/sidebar.tsx +13 -5
- package/src/components/layout/pane/status-footer.ts +3 -1
- package/src/components/layout/shell/drag/runtime.ts +5 -0
- package/src/components/layout/shell/index.tsx +25 -0
- package/src/components/layout/shell/menu.ts +9 -0
- package/src/components/layout/shell/pane/actions.ts +36 -0
- package/src/components/layout/shell/pane/management-shortcuts.ts +27 -3
- package/src/components/layout/shell/pane-occlusion.ts +40 -0
- package/src/components/layout/shell/shortcuts.ts +17 -1
- package/src/components/layout/shell/terminal-pointer-runtime.ts +39 -6
- package/src/components/layout/shell/window-mode/index.ts +5 -16
- package/src/components/layout/shell/window-mode/overlays.tsx +3 -1
- package/src/components/markdown-text.tsx +36 -0
- package/src/components/market-board/index.tsx +18 -8
- package/src/components/metric-treemap/index.tsx +3 -1
- 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/button.tsx +48 -4
- package/src/components/ui/choice-dialog.tsx +101 -32
- package/src/components/ui/data-table/opentui/index.tsx +24 -9
- package/src/components/ui/data-table/types.ts +7 -0
- package/src/components/ui/inline-quick-add.tsx +19 -3
- package/src/components/ui/list-view.tsx +11 -5
- 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 +32 -5
- package/src/components/ui/selection-fill.ts +39 -0
- package/src/components/ui/stat-grid.tsx +27 -6
- package/src/core/state/app/layout-reducer.ts +2 -1
- package/src/core/state/app/pane-choices.ts +68 -0
- package/src/core/state/app/state.ts +14 -6
- package/src/core/state/app/types.ts +8 -0
- 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/pane-manager/dock-tree.ts +19 -0
- package/src/layout/pane-manager/index.ts +3 -0
- 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/market/freshness.ts +33 -0
- package/src/market-data/market/status.ts +5 -1
- package/src/market-data/quotes/contributions.ts +10 -0
- package/src/market-data/quotes/freshness.ts +19 -0
- package/src/market-data/quotes/listing-enterprise-value.ts +3 -3
- package/src/market-data/quotes/live-valuation.ts +31 -4
- package/src/market-data/quotes/resolution.ts +4 -0
- package/src/market-data/quotes/time.ts +17 -24
- 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/index.tsx +1 -0
- 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 +17 -8
- package/src/plugins/builtin/awards/headless.ts +37 -15
- package/src/plugins/builtin/awards/model.ts +40 -5
- package/src/plugins/builtin/awards/pane.tsx +11 -8
- 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-manager/index.tsx +1 -0
- package/src/plugins/builtin/broker-trading/index.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 +8 -7
- package/src/plugins/builtin/central-bank-rates/index.tsx +1 -1
- package/src/plugins/builtin/central-bank-rates/model.ts +24 -5
- package/src/plugins/builtin/central-bank-rates/pane.tsx +19 -9
- package/src/plugins/builtin/changelog/index.tsx +2 -2
- package/src/plugins/builtin/chart-composer/headless.ts +5 -1
- package/src/plugins/builtin/chart-composer/index.tsx +4 -2
- package/src/plugins/builtin/chart-composer/pane.tsx +8 -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/content/handle-prompt.tsx +4 -0
- package/src/plugins/builtin/chat/controller/realtime.ts +17 -1
- package/src/plugins/builtin/chat/controller/utils.ts +2 -1
- package/src/plugins/builtin/chat/message/terminal.tsx +4 -1
- package/src/plugins/builtin/chat/sidebar.tsx +3 -4
- 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 +39 -1
- package/src/plugins/builtin/cloud/company-picker.tsx +1 -3
- package/src/plugins/builtin/cloud/plugin.tsx +1 -0
- package/src/plugins/builtin/cloud/team/module.tsx +1 -0
- package/src/plugins/builtin/cloud/team/pane.tsx +12 -12
- package/src/plugins/builtin/cloud/thesis/detail.tsx +22 -12
- 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/commodity-balances/pane.tsx +13 -5
- 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 +18 -13
- 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/index.ts +1 -0
- 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 +14 -9
- package/src/plugins/builtin/credit-boards/client.ts +5 -0
- package/src/plugins/builtin/credit-boards/headless.ts +3 -7
- package/src/plugins/builtin/credit-boards/model.ts +5 -11
- package/src/plugins/builtin/credit-boards/series.ts +19 -8
- package/src/plugins/builtin/credit-boards/sovr-pane.tsx +9 -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/headless.ts +23 -13
- package/src/plugins/builtin/crypto-etf-flows/model.ts +4 -4
- package/src/plugins/builtin/crypto-etf-flows/pane.tsx +8 -3
- 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/headless.ts +16 -7
- package/src/plugins/builtin/debt-maturities/model.ts +12 -18
- package/src/plugins/builtin/debt-maturities/pane.tsx +11 -12
- 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 +42 -7
- package/src/plugins/builtin/earnings/board-table.ts +13 -8
- package/src/plugins/builtin/earnings/board.tsx +15 -3
- package/src/plugins/builtin/earnings/calendar-model.ts +5 -5
- package/src/plugins/builtin/earnings/calendar.tsx +11 -6
- package/src/plugins/builtin/earnings/client.ts +0 -9
- package/src/plugins/builtin/earnings/format.ts +16 -14
- package/src/plugins/builtin/earnings/headless.ts +64 -23
- 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 +22 -14
- package/src/plugins/builtin/earnings-calls/calendar.tsx +2 -1
- package/src/plugins/builtin/earnings-calls/data.ts +24 -4
- package/src/plugins/builtin/earnings-calls/format.ts +29 -10
- package/src/plugins/builtin/earnings-calls/headless.ts +23 -3
- package/src/plugins/builtin/earnings-calls/index.tsx +1 -0
- package/src/plugins/builtin/earnings-calls/model.ts +11 -1
- package/src/plugins/builtin/earnings-calls/pane.tsx +2 -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 +29 -2
- package/src/plugins/builtin/econ/detail-view.tsx +2 -2
- package/src/plugins/builtin/econ/fred-catalog.ts +3 -0
- package/src/plugins/builtin/econ/index.tsx +16 -8
- package/src/plugins/builtin/econ-statistics/detail.tsx +2 -1
- package/src/plugins/builtin/econ-statistics/headless.ts +7 -5
- package/src/plugins/builtin/econ-statistics/index.tsx +1 -1
- 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 +18 -14
- package/src/plugins/builtin/fear-greed/pane.tsx +12 -4
- package/src/plugins/builtin/filing-events/feed.ts +2 -1
- package/src/plugins/builtin/filing-events/index.tsx +1 -0
- 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 +32 -21
- 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 +11 -8
- package/src/plugins/builtin/insider/tickers.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 +18 -16
- 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/index.tsx +1 -0
- 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 +9 -8
- package/src/plugins/builtin/macro-day/model.ts +3 -2
- package/src/plugins/builtin/macro-day/pane.tsx +4 -4
- package/src/plugins/builtin/macro-day/releases.ts +25 -16
- 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/index.tsx +20 -8
- package/src/plugins/builtin/market-movers/model.ts +5 -0
- package/src/plugins/builtin/market-movers/session-body.tsx +2 -1
- 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 +14 -3
- package/src/plugins/builtin/money-markets/model.ts +3 -2
- package/src/plugins/builtin/money-markets/pane.tsx +14 -5
- 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 +48 -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 +6 -6
- 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/cli/bulk-symbols.ts +4 -31
- 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/index.tsx +6 -1
- 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 +24 -10
- package/src/plugins/builtin/portfolio-list/settings.ts +4 -1
- package/src/plugins/builtin/portfolio-list/summary/index.tsx +9 -11
- package/src/plugins/builtin/portfolio-list/table.tsx +10 -1
- 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 +37 -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/risk-factors/index.tsx +1 -0
- 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 +71 -0
- 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 +8 -3
- 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 +9 -5
- package/src/plugins/builtin/social-mentions/headless.ts +2 -1
- package/src/plugins/builtin/social-mentions/model.ts +4 -4
- package/src/plugins/builtin/social-mentions/outliers.tsx +10 -1
- package/src/plugins/builtin/social-mentions/pane.tsx +7 -0
- package/src/plugins/builtin/supply-chain/client.ts +3 -1
- package/src/plugins/builtin/supply-chain/flow.tsx +25 -8
- package/src/plugins/builtin/supply-chain/graph-client.ts +1 -1
- package/src/plugins/builtin/supply-chain/graph-evidence.ts +1 -1
- package/src/plugins/builtin/supply-chain/graph-model.ts +14 -2
- package/src/plugins/builtin/supply-chain/graph-pane.tsx +11 -10
- package/src/plugins/builtin/supply-chain/graph.tsx +12 -6
- package/src/plugins/builtin/supply-chain/headless.ts +15 -8
- package/src/plugins/builtin/supply-chain/model.ts +72 -15
- package/src/plugins/builtin/supply-chain/pane.tsx +11 -8
- package/src/plugins/builtin/supply-chain/row-evidence.tsx +7 -6
- 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 +18 -5
- 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 +35 -7
- package/src/plugins/builtin/ticker-detail/pane.tsx +48 -24
- package/src/plugins/builtin/ticker-detail/quote-footer.ts +5 -0
- package/src/plugins/builtin/ticker-detail/quote-monitor/card.tsx +13 -8
- 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/after.ts +50 -23
- package/src/plugins/builtin/treasury-auctions/cache.ts +23 -5
- package/src/plugins/builtin/treasury-auctions/client.ts +2 -1
- package/src/plugins/builtin/treasury-auctions/headless.ts +231 -42
- package/src/plugins/builtin/treasury-auctions/hk-headless.ts +14 -7
- package/src/plugins/builtin/treasury-auctions/hk-view.tsx +37 -34
- package/src/plugins/builtin/treasury-auctions/hk.ts +65 -13
- package/src/plugins/builtin/treasury-auctions/index.tsx +3 -0
- package/src/plugins/builtin/treasury-auctions/keys.ts +27 -0
- package/src/plugins/builtin/treasury-auctions/like.ts +137 -0
- package/src/plugins/builtin/treasury-auctions/model.ts +101 -23
- package/src/plugins/builtin/treasury-auctions/pane.tsx +56 -28
- 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 +6 -3
- package/src/plugins/builtin/vol-surface/pane.tsx +13 -9
- 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/plugins/runtime/index.tsx +1 -0
- package/src/plugins/runtime/state.ts +20 -0
- package/src/portfolio/allocation.ts +5 -5
- package/src/portfolio/column-values.ts +54 -42
- package/src/portfolio/futures-positions.ts +2 -1
- package/src/public/__snapshots__/public-api.test.ts.snap +5 -0
- package/src/public/react.ts +7 -0
- package/src/react/auto-refresh.ts +29 -0
- package/src/renderers/browser/deeplink-bridge.ts +24 -3
- package/src/renderers/dom/desktop/query-bar.tsx +229 -60
- package/src/renderers/dom/host/overflow-fade-px.ts +2 -0
- package/src/renderers/dom/host/overflow-fade.ts +1 -2
- package/src/renderers/dom/styles.css +25 -5
- package/src/renderers/electrobun/bun/desktop/backend-requests.ts +7 -1
- package/src/renderers/electrobun/view/cli-pane-shot-entry.tsx +2 -1
- package/src/renderers/opentui/ui-host.tsx +32 -2
- package/src/renderers/share/layout-view.tsx +2 -1
- package/src/series/types.ts +2 -0
- package/src/sources/gloomberb-cloud/fred-attribution.ts +86 -0
- package/src/sources/gloomberb-cloud/index.ts +25 -1
- package/src/sources/gloomberb-cloud/news.ts +9 -0
- package/src/sources/gloomberb-cloud/normalizers.ts +24 -3
- package/src/sources/provider-errors.ts +64 -1
- package/src/sources/provider-router/batches.ts +19 -0
- package/src/sources/provider-router/index.ts +7 -1
- package/src/sources/provider-router/search.ts +15 -10
- package/src/state/app/context/index.tsx +24 -1
- package/src/state/hooks/inline-tickers.ts +3 -2
- package/src/state/hooks/quote-streaming.ts +9 -10
- package/src/state/pane-unsent-work.ts +47 -0
- package/src/team/collections-sync.ts +8 -3
- package/src/telemetry/usage-counts.ts +26 -0
- package/src/test-support/shell-pane-keys.tsx +5 -0
- package/src/test-support/telemetry-guard.ts +83 -0
- package/src/test-support/test-env.ts +12 -0
- package/src/theme/colors.ts +17 -1
- package/src/theme/ui-tokens.ts +50 -1
- package/src/tickers/company-name-listing.ts +2 -2
- package/src/tickers/company-name.ts +17 -1
- package/src/tickers/listing-venues.ts +37 -2
- package/src/tickers/renamed-listings.ts +2 -1
- package/src/tickers/search/index.ts +19 -0
- package/src/tickers/search/japanese-names.json +1 -0
- package/src/tickers/search/japanese-names.ts +152 -0
- package/src/tickers/starter-symbols.ts +7 -0
- package/src/tickers/terminal-codes.ts +55 -6
- package/src/time-series/base-series.ts +3 -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 +9 -2
- package/src/types/financials.ts +26 -0
- package/src/types/instrument.ts +6 -0
- package/src/types/plugin-contributions.ts +7 -0
- package/src/types/plugin-panes.ts +8 -1
- package/src/types/plugin-reports.ts +8 -0
- package/src/ui/host.tsx +6 -0
- package/src/utils/datetime-format.ts +74 -33
- package/src/utils/double-escape-close.ts +42 -0
- 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/fx-status.ts +30 -7
- package/src/utils/growth.ts +67 -0
- package/src/utils/keyboard.ts +6 -0
- package/src/utils/network-failure.ts +23 -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
|
@@ -11,7 +11,7 @@ import { colors } from "../../../theme/colors";
|
|
|
11
11
|
import type { PaneProps } from "../../../types/plugin";
|
|
12
12
|
import { Box, ScrollBox, Text, useUiCapabilities } from "../../../ui";
|
|
13
13
|
import { ClippedText } from "../../../components/ui/display";
|
|
14
|
-
import { truncateToDisplayWidth } from "../../../utils/format";
|
|
14
|
+
import { MISSING_VALUE, truncateToDisplayWidth } from "../../../utils/format";
|
|
15
15
|
import { formatRelativeAge } from "../../../utils/datetime-format";
|
|
16
16
|
import { nextHeaderSort } from "../../../utils/sort-values";
|
|
17
17
|
import { useConnectionHealth, usePluginPaneState } from "../../runtime";
|
|
@@ -55,7 +55,7 @@ function statusColor(status: ConnectionHealthStatus): string {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
function formatLatency(latencyMs: number | null): string {
|
|
58
|
-
if (latencyMs == null) return
|
|
58
|
+
if (latencyMs == null) return MISSING_VALUE;
|
|
59
59
|
return latencyMs < 1000 ? `${Math.round(latencyMs)}ms` : `${(latencyMs / 1000).toFixed(1)}s`;
|
|
60
60
|
}
|
|
61
61
|
|
|
@@ -86,7 +86,7 @@ function ConnectionDetail({ source, width, now }: { source: ConnectionHealthStat
|
|
|
86
86
|
<KeyValueRow labelWidth={16} emphasis={false} label="Transition" value={formatRelativeAge(source.lastTransitionAt, now)} color={colors.textMuted} />
|
|
87
87
|
) : null}
|
|
88
88
|
<KeyValueRow labelWidth={16} emphasis={false} label="Last request" value={source.lastRequestAt ? formatRelativeAge(source.lastRequestAt, now) : "never"} color={colors.textMuted} />
|
|
89
|
-
<KeyValueRow labelWidth={16} emphasis={false} label="Operation" value={source.lastOperation ??
|
|
89
|
+
<KeyValueRow labelWidth={16} emphasis={false} label="Operation" value={source.lastOperation ?? MISSING_VALUE} color={colors.textDim} />
|
|
90
90
|
<KeyValueRow labelWidth={16} emphasis={false} label="Latency" value={formatLatency(source.lastLatencyMs)} color={colors.textMuted} />
|
|
91
91
|
{source.currentDetail ? (
|
|
92
92
|
<KeyValueRow labelWidth={16} emphasis={false} label="Detail" value={desktop ? source.currentDetail : truncateToDisplayWidth(source.currentDetail, Math.max(8, lineWidth - 16))} color={source.status === "error" ? colors.negative : colors.textDim} />
|
|
@@ -202,9 +202,9 @@ export function ConnectionsPane({ focused, width, height }: PaneProps) {
|
|
|
202
202
|
const renderCell = useCallback((source: ConnectionHealthState, column: ConnectionColumn): DataTableCell => {
|
|
203
203
|
if (column.id === "service") return { text: source.name, color: colors.text };
|
|
204
204
|
if (column.id === "status") return { text: statusLabel(source.status), color: statusColor(source.status) };
|
|
205
|
-
if (column.id === "request") return { text: source.lastOperation ??
|
|
205
|
+
if (column.id === "request") return { text: source.lastOperation ?? MISSING_VALUE, color: colors.textDim };
|
|
206
206
|
if (column.id === "latency") return { text: formatLatency(source.lastLatencyMs), color: source.status === "error" ? colors.negative : colors.textMuted };
|
|
207
|
-
return { text: source.lastRequestAt ? formatRelativeAge(source.lastRequestAt, now) :
|
|
207
|
+
return { text: source.lastRequestAt ? formatRelativeAge(source.lastRequestAt, now) : MISSING_VALUE, color: colors.textMuted };
|
|
208
208
|
}, [now]);
|
|
209
209
|
|
|
210
210
|
return (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { HeadlessPaneDefinition } from "../../../types/headless";
|
|
2
2
|
import type { TimeRange } from "../../../time-series/range";
|
|
3
|
-
import { formatNumber, formatSignificant, significantDecimals } from "../../../utils/format";
|
|
3
|
+
import { MISSING_VALUE, formatNumber, formatSignificant, significantDecimals } from "../../../utils/format";
|
|
4
4
|
import { logFailure } from "../../../utils/log-failure";
|
|
5
5
|
import { mixedSessionCloseNote } from "../../../market-data/market/session-close-note";
|
|
6
6
|
import { resolveHeadlessInstrument, loadHeadlessSymbols } from "../shared/headless-market-data";
|
|
@@ -53,7 +53,7 @@ export const correlationHeadless: HeadlessPaneDefinition<"rows"> = {
|
|
|
53
53
|
describe: ({ symbols, options }) => `Correlation Matrix | Daily returns | ${options.rangePreset ?? "1Y"} | ${symbols.join(", ")}`,
|
|
54
54
|
columns: [
|
|
55
55
|
{ key: "pair", header: "Pair", format: (_value, row) => `${row.left}/${row.right}` },
|
|
56
|
-
{ key: "correlation", header: "Correlation", align: "right", format: (value) => value == null ?
|
|
56
|
+
{ key: "correlation", header: "Correlation", align: "right", format: (value) => value == null ? MISSING_VALUE : formatNumber(Number(value), 3) },
|
|
57
57
|
{ key: "sampleSize", header: "Shared obs", align: "right" },
|
|
58
58
|
],
|
|
59
59
|
async load({ symbols, options }, ctx) {
|
|
@@ -13,6 +13,7 @@ import { useShortcut } from "../../../react/input";
|
|
|
13
13
|
import { buildChartKey } from "../../../market-data/selectors";
|
|
14
14
|
import { formatTickerListInput } from "../../../tickers/list";
|
|
15
15
|
import { isPlainKey } from "../../../utils/keyboard";
|
|
16
|
+
import { logFailure } from "../../../utils/log-failure";
|
|
16
17
|
import { useAsyncResource } from "../../../react/async-resource";
|
|
17
18
|
import { cloudGeoRequest } from "../world-venue-map/client";
|
|
18
19
|
import { geoSeriesToken, loadGeoCorrelationHistory } from "./geo";
|
|
@@ -188,7 +189,9 @@ function CorrelationMatrixPane({ focused, width, height }: PaneProps) {
|
|
|
188
189
|
|
|
189
190
|
const refresh = useCallback(() => {
|
|
190
191
|
const coordinator = getSharedMarketDataCoordinator();
|
|
191
|
-
for (const request of chartRequests)
|
|
192
|
+
for (const request of chartRequests) {
|
|
193
|
+
coordinator?.loadChart(request, { forceRefresh: true }).catch(logFailure("correlation", "Refreshing chart data failed"));
|
|
194
|
+
}
|
|
192
195
|
if (geoKey) geoHistory.reload();
|
|
193
196
|
}, [chartRequests, geoKey, geoHistory.reload]);
|
|
194
197
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../../utils/format";
|
|
1
2
|
import { chartTableLayout } from "../../../../components/chart-table/layout";
|
|
2
3
|
import { alignDailyCloses, pairedChanges } from "../compute";
|
|
3
4
|
import { buildRollingCorrelationPoints } from "../relationship/model";
|
|
@@ -74,6 +75,6 @@ export function matrixPairRead(
|
|
|
74
75
|
fullPeriod: number | null,
|
|
75
76
|
history: Pick<ReturnType<typeof buildMatrixPairHistory>, "window" | "latest" | "min" | "max">,
|
|
76
77
|
): string {
|
|
77
|
-
const value = (number: number | null) => number !== null && Number.isFinite(number) ? number.toFixed(2) :
|
|
78
|
+
const value = (number: number | null) => number !== null && Number.isFinite(number) ? number.toFixed(2) : MISSING_VALUE;
|
|
78
79
|
return `${pair[0]} and ${pair[1]}: full period ${value(fullPeriod)}, now ${value(history.latest)} (${history.window} day), range ${value(history.min)} to ${value(history.max)}`;
|
|
79
80
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ProjectedChartPoint } from "../../../../components/chart/core/data";
|
|
2
2
|
import type { ScatterChartPoint } from "../../../../components/chart/static";
|
|
3
3
|
import { colors } from "../../../../theme/colors";
|
|
4
|
-
import { formatNumber, formatSignificant } from "../../../../utils/format";
|
|
4
|
+
import { MISSING_VALUE, formatNumber, formatSignificant } from "../../../../utils/format";
|
|
5
5
|
import type { CompositeAxisDomain } from "../../../../components/chart/composite/types";
|
|
6
6
|
import type { StatItem } from "../../../../components/ui";
|
|
7
7
|
import type {
|
|
@@ -18,13 +18,13 @@ export interface MultiLineChartSeries {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
function formatNullableNumber(value: number | null | undefined, decimals: number): string {
|
|
21
|
-
return typeof value === "number" && Number.isFinite(value) ? formatNumber(value, decimals) :
|
|
21
|
+
return typeof value === "number" && Number.isFinite(value) ? formatNumber(value, decimals) : MISSING_VALUE;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
/** A figure in percentage points of daily return, as alpha reads: `1.997%`, or a bare dash when there is none. */
|
|
25
25
|
function formatNullablePercent(value: number | null | undefined, decimals: number): string {
|
|
26
26
|
const text = formatNullableNumber(value, decimals);
|
|
27
|
-
return text ===
|
|
27
|
+
return text === MISSING_VALUE ? text : `${text}%`;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
1
2
|
import type { CotClass, CotClassSummary, CotContractPayload, CotFamily, CotHistoryPoint } from "../../../api-client/cot";
|
|
2
3
|
import type { HeadlessPaneColumn, HeadlessPaneDefinition } from "../../../types/plugin";
|
|
3
4
|
import { fetchCotBoard, fetchCotContract } from "./client";
|
|
@@ -10,8 +11,8 @@ const camelClass = (id: CotClass) => id.replace(/-(\w)/g, (_match, letter: strin
|
|
|
10
11
|
const rounded = (value: number | null, digits: number) => value == null ? null : Number(value.toFixed(digits));
|
|
11
12
|
const count = (value: unknown) => cotInteger(typeof value === "number" ? value : null);
|
|
12
13
|
const signed = (value: unknown) => cotInteger(typeof value === "number" ? value : null, true);
|
|
13
|
-
const percent = (value: unknown) => typeof value === "number" ? `${value > 0 ? "+" : ""}${value.toFixed(1)}%` :
|
|
14
|
-
const rank = (value: unknown) => typeof value === "number" ? value.toFixed(0) :
|
|
14
|
+
const percent = (value: unknown) => typeof value === "number" ? `${value > 0 ? "+" : ""}${value.toFixed(1)}%` : MISSING_VALUE;
|
|
15
|
+
const rank = (value: unknown) => typeof value === "number" ? value.toFixed(0) : MISSING_VALUE;
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* The report's release, by the CFTC's schedule, as Gloom Cloud states it (else
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
1
2
|
import type { CotClass, CotContractPayload, CotFamily, CotHistoryPoint, CotPositions } from "../../../api-client/cot";
|
|
2
3
|
import { staticSeries } from "../../../components/chart/static/series";
|
|
3
4
|
import type { ResolvedSeries } from "../../../time-series/types";
|
|
@@ -304,7 +305,7 @@ export function cotContractUnitText(units: string | null | undefined): string |
|
|
|
304
305
|
return text ? `1 contract = ${PLAIN_UNITS.test(text) ? text.toLowerCase() : text}` : null;
|
|
305
306
|
}
|
|
306
307
|
export function cotInteger(value: number | null, signed = false): string {
|
|
307
|
-
return value == null ?
|
|
308
|
+
return value == null ? MISSING_VALUE : `${signed && value > 0 ? "+" : ""}${value.toLocaleString("en-US", { maximumFractionDigits: 0 })}`;
|
|
308
309
|
}
|
|
309
310
|
|
|
310
311
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
1
2
|
import { useCallback, useMemo, useRef, useState } from "react";
|
|
2
3
|
import { ChartTableHeader, CompositeChart, DataTableStackView, spanDigits, DataTableView, PaneStatusBody, QueryBar, usePaneFooter, usePaneNoticeFooter, usePaneStatusFooter, usePaneTabs, useQueryBarSearch, type ChartTableChart, type DataTableColumn, type SelectControl } from "../../../components";
|
|
3
4
|
import { useAsyncResource, usePluginPaneState, useShortcut } from "../../../public/react";
|
|
@@ -40,7 +41,7 @@ const NET_PRICE_PANELS = [{ id: "net", height: 2 }, { id: "price", height: 1 }];
|
|
|
40
41
|
const NET_PANEL = [{ id: "net" }];
|
|
41
42
|
/** Legend, four net rows, two price rows and the axis; a shorter band keeps the net alone. */
|
|
42
43
|
const PRICE_PANEL_MIN_ROWS = 8;
|
|
43
|
-
const rank = (value: number | null | undefined) => value == null ?
|
|
44
|
+
const rank = (value: number | null | undefined) => value == null ? MISSING_VALUE : value.toFixed(0);
|
|
44
45
|
/** A class's rank in a percentile column: 1Y, 3Y, or against every stored report (`all`). */
|
|
45
46
|
const columnRank = (row: CotClassSummary, column: string) =>
|
|
46
47
|
(column === "one" ? row.percentile1Y : column === "three" ? row.percentile3Y : row.percentileAll)?.value ?? null;
|
|
@@ -110,7 +111,7 @@ function CotBoard({ width, height, focused, family, initialCode }: PaneProps & {
|
|
|
110
111
|
] : [] }), [boardShown, focusSearch]);
|
|
111
112
|
usePaneNoticeFooter({ registrationId: "cot:board-notices", focused, enabled: !open, notices: data?.gaps ?? [] });
|
|
112
113
|
usePaneStatusFooter({ registrationId: "cot:board", enabled: !open, loading: resource.loading, error: resource.error,
|
|
113
|
-
info: data ? [{ id: "as-of", parts: [{ text: `CFTC ${cotPositionsText(positions)} · ${data.asOf ??
|
|
114
|
+
info: data ? [{ id: "as-of", parts: [{ text: `CFTC ${cotPositionsText(positions)} · ${data.asOf ?? MISSING_VALUE} · contracts`, tone: "muted" }] }] : [] });
|
|
114
115
|
// A class change reloads under the query bar, which stays.
|
|
115
116
|
return <DataTableStackView<CotBoardRow> columns={BOARD_COLUMNS} items={rows} focused={focused && !searching}
|
|
116
117
|
status={data ? undefined : { loading: resource.loading, error: resource.error, empty: !resource.loading && !resource.error, subject: "COT history" }}
|
|
@@ -196,7 +197,7 @@ function CotDetail({ width, height, focused, code, family, positions, traderClas
|
|
|
196
197
|
usePaneStatusFooter({ registrationId: "cot:detail", loading: resource.loading, error: resource.error,
|
|
197
198
|
// The unit the net is counted in, as `fn COT` titles it: what one contract is, where the report says.
|
|
198
199
|
// Futures and options combined says so; futures only reads as it always has.
|
|
199
|
-
info: payload ? [{ id: "as-of", parts: [{ text: `CFTC ${positions === "combined" ? `${cotPositionsText(positions)} · ` : ""}${payload.asOf ??
|
|
200
|
+
info: payload ? [{ id: "as-of", parts: [{ text: `CFTC ${positions === "combined" ? `${cotPositionsText(positions)} · ` : ""}${payload.asOf ?? MISSING_VALUE} · ${cotContractUnitText(payload.contract?.contractUnits) ?? "contracts"}${data?.priceAsOf ? ` · ${data.priceSymbol} ${data.priceAsOf}` : ""}`, tone: "muted" }] }] : [] });
|
|
200
201
|
return <PaneStatusBody loading={resource.loading && !data} error={!data ? resource.error : null} empty={!!payload && !payload.contract} subject="COT contract">
|
|
201
202
|
{payload && data ? <DataTableView columns={POSITION_COLUMNS} items={payload.positions} focused={focused} rootWidth={width} rootHeight={height}
|
|
202
203
|
rootBefore={<ChartTableHeader width={width} height={height} tableRows={payload.positions.length} chart={chart}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
1
2
|
import type { CpiRow } from "../../../api-client/cpi";
|
|
2
3
|
import type { HeadlessPaneDefinition } from "../../../types/plugin";
|
|
3
4
|
import { fetchCpiBoard } from "./client";
|
|
4
5
|
import { cpiHeaderLine, cpiMonth, cpiRowOption, cpiRows } from "./model";
|
|
5
6
|
|
|
6
7
|
/** Two decimals; a value that rounds to zero reads 0.00, never -0.00. */
|
|
7
|
-
const percent = (value: unknown) => typeof value === "number" ? (Number(value.toFixed(2)) === 0 ? "0.00" : value.toFixed(2)) :
|
|
8
|
-
const weight = (value: unknown) => typeof value === "number" ? value.toFixed(3) :
|
|
9
|
-
const text = (value: unknown) => typeof value === "string" ? value :
|
|
8
|
+
const percent = (value: unknown) => typeof value === "number" ? (Number(value.toFixed(2)) === 0 ? "0.00" : value.toFixed(2)) : MISSING_VALUE;
|
|
9
|
+
const weight = (value: unknown) => typeof value === "number" ? value.toFixed(3) : MISSING_VALUE;
|
|
10
|
+
const text = (value: unknown) => typeof value === "string" ? value : MISSING_VALUE;
|
|
10
11
|
|
|
11
12
|
/** One row per component in the release's order; numbers stay raw for JSON, rounded for text. */
|
|
12
13
|
function reportRow(row: CpiRow, indent = true) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
1
2
|
import type { CpiBoardPayload, CpiReleaseStatus, CpiRow } from "../../../api-client/cpi";
|
|
2
3
|
import type { ChartStripSpec } from "../../../components/chart-table/header";
|
|
3
4
|
import { staticSeries } from "../../../components/chart/static/series";
|
|
@@ -94,11 +95,11 @@ function signed(value: number, decimals: number): string {
|
|
|
94
95
|
}
|
|
95
96
|
|
|
96
97
|
/** Percent changes as the pane shows them: two decimals, signed, no unit (the header names it). */
|
|
97
|
-
export const formatCpiChange = (value: number | null) => value == null ?
|
|
98
|
+
export const formatCpiChange = (value: number | null) => value == null ? MISSING_VALUE : signed(value, 2);
|
|
98
99
|
/** Contributions in percentage points, two decimals, signed. */
|
|
99
|
-
export const formatCpiPoints = (value: number | null) => value == null ?
|
|
100
|
+
export const formatCpiPoints = (value: number | null) => value == null ? MISSING_VALUE : signed(value, 2);
|
|
100
101
|
/** Share of the basket, percent: one decimal. */
|
|
101
|
-
export const formatCpiWeight = (value: number | null) => value == null ?
|
|
102
|
+
export const formatCpiWeight = (value: number | null) => value == null ? MISSING_VALUE : value.toFixed(1);
|
|
102
103
|
|
|
103
104
|
const MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
|
104
105
|
|
|
@@ -107,19 +108,19 @@ export function cpiMonth(period: string): string {
|
|
|
107
108
|
return `${MONTHS[Number(period.slice(5, 7)) - 1]} ${period.slice(0, 4)}`;
|
|
108
109
|
}
|
|
109
110
|
|
|
110
|
-
/** A release instant on BLS's own clock: "Wed Oct
|
|
111
|
+
/** A release instant on BLS's own clock: "Wed 14 Oct 08:30 ET". */
|
|
111
112
|
function releaseTime(iso: string): string {
|
|
112
113
|
const parts = Object.fromEntries(new Intl.DateTimeFormat("en-US", {
|
|
113
114
|
timeZone: "America/New_York", weekday: "short", month: "short", day: "numeric",
|
|
114
115
|
hour: "2-digit", minute: "2-digit", hourCycle: "h23",
|
|
115
116
|
}).formatToParts(new Date(iso)).map((part) => [part.type, part.value]));
|
|
116
|
-
return `${parts.weekday} ${parts.
|
|
117
|
+
return `${parts.weekday} ${parts.day} ${parts.month} ${parts.hour}:${parts.minute} ET`;
|
|
117
118
|
}
|
|
118
119
|
|
|
119
120
|
/**
|
|
120
121
|
* The month the data covers, when it came out and when the next release is
|
|
121
|
-
* due, on one line: "Aug 2026 · released Fri Sep
|
|
122
|
-
* 14 08:30 ET". A release past its time and not in yet reads "due".
|
|
122
|
+
* due, on one line: "Aug 2026 · released Fri 11 Sep 08:30 ET · next Wed
|
|
123
|
+
* 14 Oct 08:30 ET". A release past its time and not in yet reads "due".
|
|
123
124
|
*/
|
|
124
125
|
export function cpiHeaderLine(release: CpiReleaseStatus, now = Date.now()): string | undefined {
|
|
125
126
|
if (!release.period) return undefined;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
1
2
|
import { useMemo } from "react";
|
|
2
3
|
import {
|
|
3
4
|
DELAYED_SEGMENT,
|
|
@@ -21,7 +22,9 @@ import type { PaneProps } from "../../../types/plugin";
|
|
|
21
22
|
import { usePluginPaneState } from "../../runtime";
|
|
22
23
|
import { FIXED_INCOME_PANE_ID } from "../fixed-income/model";
|
|
23
24
|
import { useCommandValue } from "../shared/command-tab";
|
|
25
|
+
import { reportFooterSegment } from "../shared/source-footer";
|
|
24
26
|
import { getCachedCdxBoard, loadCdxBoard } from "./client";
|
|
27
|
+
import { cdxHeadless } from "./headless";
|
|
25
28
|
import {
|
|
26
29
|
axisFormatter,
|
|
27
30
|
cdxRows,
|
|
@@ -30,7 +33,6 @@ import {
|
|
|
30
33
|
formatLevel,
|
|
31
34
|
formatMove,
|
|
32
35
|
formatSpreadRank,
|
|
33
|
-
newestRowDate,
|
|
34
36
|
partialDayText,
|
|
35
37
|
SETTLEMENT_TEXT,
|
|
36
38
|
type CdxRow,
|
|
@@ -74,7 +76,7 @@ function IndexDetail({ row, width, height, focused }: { row: CdxRow; width: numb
|
|
|
74
76
|
...(index.recovery != null ? [`${Math.round(index.recovery * 100)}% recovery`] : [])].join(" · ");
|
|
75
77
|
const items: StatItem[] = [
|
|
76
78
|
{ id: "level", label: index.quote === "spread" ? "5Y spread" : "5Y price", value: formatLevel(index.quote, index.level),
|
|
77
|
-
detail: [...(rankOnSpreadEq ? [] : [formatSpreadRank(rank)]), index.date ??
|
|
79
|
+
detail: [...(rankOnSpreadEq ? [] : [formatSpreadRank(rank)]), index.date ?? MISSING_VALUE, ...(index.kind === "settlement" ? [SETTLEMENT_TEXT] : [])].join(" · ") },
|
|
78
80
|
...(index.quote === "price" && index.spreadBp !== undefined ? [{ id: "spread", label: "Spread eq", value: formatLevel("spread", index.spreadBp ?? null),
|
|
79
81
|
...(spreadDetail ? { detail: spreadDetail } : {}) }] : []),
|
|
80
82
|
{ id: "1d", label: "1D", value: formatMove(index.quote, day.change1D), ...(through ? { detail: through } : {}) },
|
|
@@ -82,7 +84,7 @@ function IndexDetail({ row, width, height, focused }: { row: CdxRow; width: numb
|
|
|
82
84
|
{ id: "1m", label: "1M", value: formatMove(index.quote, day.change1M) },
|
|
83
85
|
{ id: "range", label: "1Y range", value: `${formatLevel(index.quote, year.low)} to ${formatLevel(index.quote, year.high)}` },
|
|
84
86
|
{ id: "contract", label: "Contract", value: formatContract(index.maturity), detail: `${index.couponBp}bp coupon` },
|
|
85
|
-
{ id: "prints", label: "Prints", value: index.prints == null ?
|
|
87
|
+
{ id: "prints", label: "Prints", value: index.prints == null ? MISSING_VALUE : String(index.prints),
|
|
86
88
|
// The value is the count already: the detail says only that the day is still trading, and its last print.
|
|
87
89
|
...(day.partial ? { detail: partialDayText(null, day.lastPrintAt) } : {}) },
|
|
88
90
|
];
|
|
@@ -110,13 +112,16 @@ export function CdxPane({ focused, width, height }: PaneProps) {
|
|
|
110
112
|
useAutoRefresh(resource.updatedAt, refresh);
|
|
111
113
|
usePaneRefreshKey(reload, { focused, enabled: !loading });
|
|
112
114
|
|
|
113
|
-
//
|
|
114
|
-
|
|
115
|
+
// Its source and the newest day the rows carry, not when the response was put together, as `fn CDX` ends.
|
|
116
|
+
// The clock says the prints are delayed, so the line does not again.
|
|
117
|
+
const sourceLine = useMemo(() => payload
|
|
118
|
+
? reportFooterSegment(cdxHeadless, { sections: [{ title: "", columns: [], rows: payload.indexes.map((index) => ({ date: index.date })) }] }, { feed: false })
|
|
119
|
+
: null, [payload]);
|
|
115
120
|
// PCTL 1Y ranks spreads; the rows quoted in price (HY, EM) rank their spread equivalent, which a picture keeps.
|
|
116
121
|
const spreadEqRanked = useMemo(() => rows.filter((row) => row.rank.basis === "spread-eq")
|
|
117
122
|
.map((row) => row.index.name.replace(/^CDX\s+/i, "")).join(", "), [rows]);
|
|
118
123
|
const info = useMemo<PaneFooterSegment[]>(() => [
|
|
119
|
-
...(
|
|
124
|
+
...(sourceLine ? [sourceLine] : []),
|
|
120
125
|
...(payload ? [DELAYED_SEGMENT] : []),
|
|
121
126
|
...(resource.data?.stale ? [{ id: "stale", parts: [{ text: "STALE", tone: "warning" as const }] }] : []),
|
|
122
127
|
...(spreadEqRanked ? [{
|
|
@@ -124,7 +129,7 @@ export function CdxPane({ focused, width, height }: PaneProps) {
|
|
|
124
129
|
parts: [{ text: `${spreadEqRanked} pctl on spread eq`, tone: "muted" as const }],
|
|
125
130
|
variants: [[{ text: "pctl on spread eq", tone: "muted" as const }]],
|
|
126
131
|
}] : []),
|
|
127
|
-
], [
|
|
132
|
+
], [payload, sourceLine, resource.data?.stale, spreadEqRanked]);
|
|
128
133
|
usePaneStatusFooter({
|
|
129
134
|
registrationId: "cdx",
|
|
130
135
|
loading,
|
|
@@ -156,7 +161,7 @@ export function CdxPane({ focused, width, height }: PaneProps) {
|
|
|
156
161
|
column: { id: "spread", label: "SPREAD EQ", width: 9, align: "right" as const },
|
|
157
162
|
sortValue: (row: CdxRow) => row.index.quote === "price" ? row.index.spreadBp ?? null : null,
|
|
158
163
|
renderCell: (row: CdxRow) => ({
|
|
159
|
-
text: row.index.quote === "price" ? formatLevel("spread", row.index.spreadBp ?? null) :
|
|
164
|
+
text: row.index.quote === "price" ? formatLevel("spread", row.index.spreadBp ?? null) : MISSING_VALUE,
|
|
160
165
|
color: theme.textMuted,
|
|
161
166
|
}),
|
|
162
167
|
}] : []),
|
|
@@ -164,7 +169,7 @@ export function CdxPane({ focused, width, height }: PaneProps) {
|
|
|
164
169
|
column: { id: "prints", label: "PRINTS", width: 7, align: "right" as const },
|
|
165
170
|
sortValue: (row: CdxRow) => row.index.prints,
|
|
166
171
|
renderCell: (row: CdxRow) => ({
|
|
167
|
-
text: row.index.prints == null ?
|
|
172
|
+
text: row.index.prints == null ? MISSING_VALUE : String(row.index.prints),
|
|
168
173
|
color: theme.textMuted,
|
|
169
174
|
}),
|
|
170
175
|
},
|
|
@@ -63,6 +63,11 @@ type BoardClient = Pick<typeof apiClient, "getCloudCdxBoard" | "getCloudSovrBoar
|
|
|
63
63
|
/** Days of history the server serves at most, for a history export. */
|
|
64
64
|
export const CDX_MAX_DAYS = 1100;
|
|
65
65
|
|
|
66
|
+
/** The publisher a board's payload names, spelled out: `DTCC PPD` is DTCC's public price dissemination. */
|
|
67
|
+
export function boardPublisher(source: string | null | undefined): string | undefined {
|
|
68
|
+
return source?.trim().replace(/\bPPD\b/, "Public Price Dissemination") || undefined;
|
|
69
|
+
}
|
|
70
|
+
|
|
66
71
|
export async function fetchCdxBoard(client: BoardClient = apiClient, days = BOARD_DAYS): Promise<CdxBoardPayload> {
|
|
67
72
|
try { return validateCdxBoard(await client.getCloudCdxBoard({ days })); }
|
|
68
73
|
catch (error) { throw unavailableOnServer(error, "Index CDS levels are not available yet."); }
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
1
2
|
import type { HeadlessPaneColumn, HeadlessPaneDefinition, HeadlessPaneRow } from "../../../types/plugin";
|
|
2
3
|
import type { CdxBoardIndex, CreditIndexQuote } from "../../../api-client/credit-boards";
|
|
3
|
-
import { CDX_MAX_DAYS, fetchCdxBoard, fetchSovrBoard, loadCurrencyMoves } from "./client";
|
|
4
|
+
import { boardPublisher, CDX_MAX_DAYS, fetchCdxBoard, fetchSovrBoard, loadCurrencyMoves } from "./client";
|
|
4
5
|
import { readsInBatches } from "../../../market-data/batched-reads";
|
|
5
6
|
import {
|
|
6
7
|
cdxDay,
|
|
@@ -17,7 +18,7 @@ import {
|
|
|
17
18
|
sovrRows,
|
|
18
19
|
} from "./model";
|
|
19
20
|
|
|
20
|
-
const percentile = (value: unknown) => value == null ?
|
|
21
|
+
const percentile = (value: unknown) => value == null ? MISSING_VALUE : Number(value).toFixed(0);
|
|
21
22
|
/** A 1Y rank as the board draws it, a whole number, so exports do not carry 8.23293172691. */
|
|
22
23
|
const rank = (value: number | null) => value == null ? null : Math.round(value);
|
|
23
24
|
/** The series a row is of, as `history` and the data catalog name it: `cdx:hy`, `sovereign-cds:br`. */
|
|
@@ -55,11 +56,6 @@ const dayColumn: HeadlessPaneColumn = {
|
|
|
55
56
|
format: (value) => typeof value === "string" ? value : "",
|
|
56
57
|
};
|
|
57
58
|
|
|
58
|
-
/** The publisher a board's payload names, spelled out: `DTCC PPD` is DTCC's public price dissemination. */
|
|
59
|
-
function boardPublisher(source: string | null | undefined): string | undefined {
|
|
60
|
-
return source?.trim().replace(/\bPPD\b/, "Public Price Dissemination") || undefined;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
59
|
/**
|
|
64
60
|
* Each day's level on the contract on the run that day, newest first, over
|
|
65
61
|
* the last `days`: the chart as a table. Its key is `day`, not `date`, so the
|
|
@@ -10,7 +10,7 @@ import { historyStatistics } from "../../../components/chart/curve/model";
|
|
|
10
10
|
import type { MarketBoardRow } from "../../../components/market-board";
|
|
11
11
|
import type { PricePoint } from "../../../types/financials";
|
|
12
12
|
import type { HeadlessPaneColumn } from "../../../types/plugin";
|
|
13
|
-
import { formatPercentileRank } from "../../../utils/format";
|
|
13
|
+
import { MISSING_VALUE, formatPercentileRank } from "../../../utils/format";
|
|
14
14
|
|
|
15
15
|
const YEAR_DAYS = 365;
|
|
16
16
|
/** A level older than this is not the current market. */
|
|
@@ -135,13 +135,13 @@ export function partialDayText(prints: number | null, lastPrintAt: string | null
|
|
|
135
135
|
|
|
136
136
|
/** Spreads in bp with a decimal; prices as quoted, to the cent. */
|
|
137
137
|
export function formatLevel(quote: CreditIndexQuote, value: number | null): string {
|
|
138
|
-
if (value == null || !Number.isFinite(value)) return
|
|
138
|
+
if (value == null || !Number.isFinite(value)) return MISSING_VALUE;
|
|
139
139
|
return quote === "spread" ? `${value.toFixed(1)}bp` : value.toFixed(2);
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
/** A move in the quote's unit: `+1.2bp`, or `-0.13` points of price. */
|
|
143
143
|
export function formatMove(quote: CreditIndexQuote, value: number | null): string {
|
|
144
|
-
if (value == null || !Number.isFinite(value)) return
|
|
144
|
+
if (value == null || !Number.isFinite(value)) return MISSING_VALUE;
|
|
145
145
|
const digits = quote === "spread" ? 1 : 2;
|
|
146
146
|
const rounded = Number(value.toFixed(digits));
|
|
147
147
|
const sign = rounded > 0 ? "+" : "";
|
|
@@ -224,12 +224,6 @@ export function formatSpreadRank(rank: SpreadRank): string {
|
|
|
224
224
|
return rank.basis === "price-inverted" && rank.percentile != null ? `${text}, price inverted` : text;
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
/** The newest day a board's rows are dated, which its footer dates the board by; null with none. */
|
|
228
|
-
export function newestRowDate(dates: ReadonlyArray<string | null | undefined>): string | null {
|
|
229
|
-
return dates.reduce<string | null>((newest, date) => date && /^\d{4}-\d{2}-\d{2}/.test(date) && (!newest || date > newest)
|
|
230
|
-
? date.slice(0, 10) : newest, null);
|
|
231
|
-
}
|
|
232
|
-
|
|
233
227
|
function daysBetween(from: string, to: string): number {
|
|
234
228
|
return Math.round((Date.parse(to) - Date.parse(from)) / 86_400_000);
|
|
235
229
|
}
|
|
@@ -241,7 +235,7 @@ function stale(date: string | null, asOf: string | null): boolean {
|
|
|
241
235
|
|
|
242
236
|
/** `2031-12-20` as `Dec 2031`, how the contract is named on a desk. */
|
|
243
237
|
export function formatContract(maturity: string | null): string {
|
|
244
|
-
if (!maturity) return
|
|
238
|
+
if (!maturity) return MISSING_VALUE;
|
|
245
239
|
const date = new Date(`${maturity}T00:00:00Z`);
|
|
246
240
|
return Number.isNaN(date.getTime())
|
|
247
241
|
? maturity
|
|
@@ -342,7 +336,7 @@ export function sovrRows(
|
|
|
342
336
|
|
|
343
337
|
/** `BRL -1.2%`; a dollar or dollar-pegged currency still shows its code. */
|
|
344
338
|
export function formatCurrencyMove(currency: string, movePercent: number | null): string {
|
|
345
|
-
if (movePercent == null || !Number.isFinite(movePercent)) return `${currency}
|
|
339
|
+
if (movePercent == null || !Number.isFinite(movePercent)) return `${currency} ${MISSING_VALUE}`;
|
|
346
340
|
const rounded = Number(movePercent.toFixed(1));
|
|
347
341
|
const sign = rounded > 0 ? "+" : "";
|
|
348
342
|
return `${currency} ${sign}${rounded === 0 ? "0.0" : rounded.toFixed(1)}%`;
|
|
@@ -2,7 +2,7 @@ import type { CdxBoardIndex, CreditBoardPoint } from "../../../api-client/credit
|
|
|
2
2
|
import type { SeriesDefinition, SeriesLoadRequest, SeriesLoadResult, SeriesPoint } from "../../../series/types";
|
|
3
3
|
import { logFailure } from "../../../utils/log-failure";
|
|
4
4
|
import { cachedSeriesNote } from "../shared/series-warning";
|
|
5
|
-
import { loadCdxBoard, loadFullCdxHistory, loadSovrBoard } from "./client";
|
|
5
|
+
import { boardPublisher, loadCdxBoard, loadFullCdxHistory, loadSovrBoard } from "./client";
|
|
6
6
|
|
|
7
7
|
/** The five on-the-run 5Y index contracts the CDX tab lists; IG and iTraxx quote spread, HY and EM price. */
|
|
8
8
|
const INDEXES = [
|
|
@@ -24,6 +24,14 @@ const SOVEREIGNS: ReadonlyArray<readonly [code: string, name: string]> = [
|
|
|
24
24
|
["DO", "Dominican Republic"], ["CI", "Ivory Coast"],
|
|
25
25
|
];
|
|
26
26
|
|
|
27
|
+
/** Every board's levels are DTCC's public trades, as the CDX and SOVR tabs cite them. */
|
|
28
|
+
const BOARD_SOURCE = "DTCC";
|
|
29
|
+
|
|
30
|
+
/** What a chart of a board's series cites: DTCC, and the publisher the board names (`DTCC Public Price Dissemination`). */
|
|
31
|
+
function boardAttribution(source: string | null | undefined): Pick<SeriesLoadResult, "attribution"> {
|
|
32
|
+
return { attribution: { source: BOARD_SOURCE, publisher: boardPublisher(source) ?? BOARD_SOURCE } };
|
|
33
|
+
}
|
|
34
|
+
|
|
27
35
|
function boardPoints(
|
|
28
36
|
rows: ReadonlyArray<{ id: string; points: readonly CreditBoardPoint[] }>,
|
|
29
37
|
id: string,
|
|
@@ -51,15 +59,15 @@ const BOARD_YEAR_ONLY = "The full history did not load; showing the last year.";
|
|
|
51
59
|
* every day the server keeps when the chart starts before it (ALL, 5Y).
|
|
52
60
|
* When that read fails the board's year stands in, said with `warning`.
|
|
53
61
|
*/
|
|
54
|
-
async function cdxIndexes(request: SeriesLoadRequest): Promise<{ indexes: readonly CdxBoardIndex[]; resource: CdxSeriesResource; warning?: string }> {
|
|
62
|
+
async function cdxIndexes(request: SeriesLoadRequest): Promise<{ indexes: readonly CdxBoardIndex[]; source: string; resource: CdxSeriesResource; warning?: string }> {
|
|
55
63
|
const resource = await loadCdxBoard();
|
|
56
64
|
const first = Math.min(...resource.payload.indexes.flatMap((index) => index.points.slice(0, 1).map((point) => Date.parse(`${point.date}T00:00:00Z`))));
|
|
57
65
|
if (!request.start || request.start.getTime() < first - BOARD_SLACK_MS) {
|
|
58
66
|
const full = await loadFullCdxHistory().catch(logFailure("credit-boards", "Read the full index CDS history failed", null));
|
|
59
|
-
if (full) return { indexes: full.indexes, resource: {} };
|
|
60
|
-
return { indexes: resource.payload.indexes, resource, warning: BOARD_YEAR_ONLY };
|
|
67
|
+
if (full) return { indexes: full.indexes, source: full.source, resource: {} };
|
|
68
|
+
return { indexes: resource.payload.indexes, source: resource.payload.source, resource, warning: BOARD_YEAR_ONLY };
|
|
61
69
|
}
|
|
62
|
-
return { indexes: resource.payload.indexes, resource };
|
|
70
|
+
return { indexes: resource.payload.indexes, source: resource.payload.source, resource };
|
|
63
71
|
}
|
|
64
72
|
|
|
65
73
|
/** A CDX series' note: the board's own, or, when it stood in for the full history, that. */
|
|
@@ -88,10 +96,11 @@ export const CREDIT_BOARD_SERIES: readonly SeriesDefinition[] = [
|
|
|
88
96
|
unit: index.quote === "spread" ? "bp" : "points",
|
|
89
97
|
frequency: "daily",
|
|
90
98
|
group: "Credit",
|
|
99
|
+
publisher: BOARD_SOURCE,
|
|
91
100
|
tags: ["CDS", "index CDS", index.quote, "credit default swap"],
|
|
92
101
|
load: async (request) => {
|
|
93
102
|
const read = await cdxIndexes(request);
|
|
94
|
-
return { ...boardPoints(read.indexes, index.code, index.name, read.resource), ...cdxSeriesNote(read) };
|
|
103
|
+
return { ...boardPoints(read.indexes, index.code, index.name, read.resource), ...cdxSeriesNote(read), ...boardAttribution(read.source) };
|
|
95
104
|
},
|
|
96
105
|
})),
|
|
97
106
|
...INDEXES.filter((index) => index.quote === "price").map((index): SeriesDefinition => ({
|
|
@@ -100,11 +109,12 @@ export const CREDIT_BOARD_SERIES: readonly SeriesDefinition[] = [
|
|
|
100
109
|
unit: "bp",
|
|
101
110
|
frequency: "daily",
|
|
102
111
|
group: "Credit",
|
|
112
|
+
publisher: BOARD_SOURCE,
|
|
103
113
|
tags: ["CDS", "index CDS", "spread", "spread equivalent", index.code, "credit default swap"],
|
|
104
114
|
description: `${index.name}'s daily price as a conventional spread: a model figure from the ISDA standard model at the index's coupon and standard recovery, on each day's on-the-run contract, not a traded spread.`,
|
|
105
115
|
load: async (request) => {
|
|
106
116
|
const read = await cdxIndexes(request);
|
|
107
|
-
return { points: spreadEquivalentPoints(read.indexes, index.code, `${index.name} spread eq`), ...cdxSeriesNote(read) };
|
|
117
|
+
return { points: spreadEquivalentPoints(read.indexes, index.code, `${index.name} spread eq`), ...cdxSeriesNote(read), ...boardAttribution(read.source) };
|
|
108
118
|
},
|
|
109
119
|
})),
|
|
110
120
|
...SOVEREIGNS.map(([code, name]): SeriesDefinition => ({
|
|
@@ -113,10 +123,11 @@ export const CREDIT_BOARD_SERIES: readonly SeriesDefinition[] = [
|
|
|
113
123
|
unit: "bp",
|
|
114
124
|
frequency: "daily",
|
|
115
125
|
group: "Credit",
|
|
126
|
+
publisher: BOARD_SOURCE,
|
|
116
127
|
tags: ["CDS", "sovereign", code, "credit default swap"],
|
|
117
128
|
load: async () => {
|
|
118
129
|
const resource = await loadSovrBoard();
|
|
119
|
-
return boardPoints(resource.payload.sovereigns, code, name, resource);
|
|
130
|
+
return { ...boardPoints(resource.payload.sovereigns, code, name, resource), ...boardAttribution(resource.payload.source) };
|
|
120
131
|
},
|
|
121
132
|
})),
|
|
122
133
|
];
|
|
@@ -23,7 +23,9 @@ import { formatPercentileRank } from "../../../utils/format";
|
|
|
23
23
|
import { useAssetData, usePluginPaneState } from "../../runtime";
|
|
24
24
|
import { FIXED_INCOME_PANE_ID } from "../fixed-income/model";
|
|
25
25
|
import { useCommandValue } from "../shared/command-tab";
|
|
26
|
+
import { reportFooterSegment } from "../shared/source-footer";
|
|
26
27
|
import { getCachedSovrBoard, loadCurrencyMoves, loadSovrBoard } from "./client";
|
|
28
|
+
import { sovrHeadless } from "./headless";
|
|
27
29
|
import { readsInBatches } from "../../../market-data/batched-reads";
|
|
28
30
|
import {
|
|
29
31
|
findSovereign,
|
|
@@ -31,7 +33,6 @@ import {
|
|
|
31
33
|
formatCurrencyMove,
|
|
32
34
|
formatLevel,
|
|
33
35
|
formatMove,
|
|
34
|
-
newestRowDate,
|
|
35
36
|
SETTLEMENT_TEXT,
|
|
36
37
|
sovrRows,
|
|
37
38
|
type SovrRow,
|
|
@@ -115,13 +116,16 @@ export function SovrPane({ focused, width, height }: PaneProps) {
|
|
|
115
116
|
moves.reload();
|
|
116
117
|
}, { focused, enabled: !loading });
|
|
117
118
|
|
|
118
|
-
//
|
|
119
|
-
|
|
119
|
+
// Its source and the newest day the rows carry, not when the response was put together, as `fn SOVR` ends.
|
|
120
|
+
// The clock says the prints are delayed, so the line does not again.
|
|
121
|
+
const sourceLine = useMemo(() => payload
|
|
122
|
+
? reportFooterSegment(sovrHeadless, { rows: payload.sovereigns.map((sovereign) => ({ date: sovereign.date })) }, { feed: false })
|
|
123
|
+
: null, [payload]);
|
|
120
124
|
const info = useMemo<PaneFooterSegment[]>(() => [
|
|
121
|
-
...(
|
|
125
|
+
...(sourceLine ? [sourceLine] : []),
|
|
122
126
|
...(payload ? [DELAYED_SEGMENT] : []),
|
|
123
127
|
...(resource.data?.stale ? [{ id: "stale", parts: [{ text: "STALE", tone: "warning" as const }] }] : []),
|
|
124
|
-
], [
|
|
128
|
+
], [payload, sourceLine, resource.data?.stale]);
|
|
125
129
|
usePaneStatusFooter({
|
|
126
130
|
registrationId: "sovr",
|
|
127
131
|
loading: loading || moves.loading,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
1
2
|
import type {
|
|
2
3
|
HeadlessPaneDefinition,
|
|
3
4
|
HeadlessPaneLoadArgs,
|
|
@@ -35,7 +36,7 @@ const COLUMNS = [
|
|
|
35
36
|
key: "dailyChangeBp",
|
|
36
37
|
header: "1D",
|
|
37
38
|
align: "right" as const,
|
|
38
|
-
format: (value: unknown) => value == null ?
|
|
39
|
+
format: (value: unknown) => value == null ? MISSING_VALUE : `${Number(value) > 0 ? "+" : ""}${Number(value).toFixed(1)}bp`,
|
|
39
40
|
},
|
|
40
41
|
{ key: "date", header: "As of" },
|
|
41
42
|
];
|
|
@@ -18,7 +18,7 @@ import { StatChartDetail } from "../../../components/market-board";
|
|
|
18
18
|
import { useAsyncResource } from "../../../react/async-resource";
|
|
19
19
|
import { colors } from "../../../theme/colors";
|
|
20
20
|
import type { PaneProps } from "../../../types/plugin";
|
|
21
|
-
import { formatPercentileRank } from "../../../utils/format";
|
|
21
|
+
import { MISSING_VALUE, formatPercentileRank } from "../../../utils/format";
|
|
22
22
|
import { usePaneSettingValue } from "../../../state/app/context";
|
|
23
23
|
import { usePluginPaneState } from "../../runtime";
|
|
24
24
|
import type { PluginModule } from "../plugin-module";
|
|
@@ -34,7 +34,7 @@ const EMPTY_ROWS: CreditConditionRow[] = [];
|
|
|
34
34
|
const PANELS = [{ id: "main" }];
|
|
35
35
|
|
|
36
36
|
function formatBp(value: number | null, signed = false): string {
|
|
37
|
-
if (value == null) return
|
|
37
|
+
if (value == null) return MISSING_VALUE;
|
|
38
38
|
const sign = signed && value > 0 ? "+" : "";
|
|
39
39
|
return `${sign}${value.toFixed(1)}bp`;
|
|
40
40
|
}
|
|
@@ -3,7 +3,7 @@ import type { DataTableColumn, StatItem } from "../../../components";
|
|
|
3
3
|
import { scalarPoint, staticSeries } from "../../../components/chart/static/series";
|
|
4
4
|
import { dropColumnsToFit } from "../../../components/ui/table-layout";
|
|
5
5
|
import type { ResolvedSeries } from "../../../time-series/types";
|
|
6
|
-
import { displayWidth } from "../../../utils/format";
|
|
6
|
+
import { MISSING_VALUE, displayWidth } from "../../../utils/format";
|
|
7
7
|
|
|
8
8
|
export const CREDIT_TABS = [{ value: "capital", label: "Capital" }, { value: "covenants", label: "Covenants" }, { value: "maturities", label: "Maturities" }, { value: "screen", label: "Screen" }] as const;
|
|
9
9
|
export type CreditTab = typeof CREDIT_TABS[number]["value"];
|
|
@@ -11,7 +11,7 @@ export const creditTab = (value: unknown): CreditTab => CREDIT_TABS.find((tab) =
|
|
|
11
11
|
/** `maintenance_covenant` and `adjustmentReason` both read as words. */
|
|
12
12
|
export const fieldLabel = (field: string) => field.replace(/_/g, " ").replace(/([a-z])([A-Z])/g, (_, a: string, b: string) => `${a} ${b.toLowerCase()}`).replace(/^./, (value) => value.toUpperCase());
|
|
13
13
|
/** The one placeholder for a value the documents do not support. */
|
|
14
|
-
export const NO_VALUE =
|
|
14
|
+
export const NO_VALUE = MISSING_VALUE;
|
|
15
15
|
export const sentence = (value: string) => value.replace(/^./, (first) => first.toUpperCase());
|
|
16
16
|
export const creditAmount = (value: number | null | undefined): string => value == null ? NO_VALUE : new Intl.NumberFormat("en-US", { notation: "compact", maximumFractionDigits: 2 }).format(value);
|
|
17
17
|
export const creditPercent = (value: number | null | undefined): string => value == null ? NO_VALUE : `${value.toFixed(1)}%`;
|