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
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
1
2
|
import type { OptionContract } from "../../../types/financials";
|
|
2
3
|
import { formatMarketPrice, stablePriceFractionDigits } from "../../../market-data/market/format";
|
|
3
4
|
import { formatExpDate } from "../../../utils/options";
|
|
@@ -45,7 +46,7 @@ export function formatOptionPrice(value: number, maxWidth?: number): string {
|
|
|
45
46
|
return formatMarketPrice(value, { assetCategory: "OPT", fixedFractionDigits: OPTION_PRICE_DIGITS, maxWidth });
|
|
46
47
|
}
|
|
47
48
|
|
|
48
|
-
const price = (value: number) => Number.isFinite(value) && value > 0 ? formatOptionPrice(value) :
|
|
49
|
+
const price = (value: number) => Number.isFinite(value) && value > 0 ? formatOptionPrice(value) : MISSING_VALUE;
|
|
49
50
|
|
|
50
51
|
/**
|
|
51
52
|
* The spread is the one quote fact the chain table cannot show: its columns
|
|
@@ -3,7 +3,8 @@ import type { DataTableCell } from "../../../components";
|
|
|
3
3
|
import type { OptionContract, OptionsChain } from "../../../types/financials";
|
|
4
4
|
import { blendHex, colors } from "../../../theme/colors";
|
|
5
5
|
import { blendForContrast, blendForSeparation, contrastRatio } from "../../../theme/color-utils";
|
|
6
|
-
import {
|
|
6
|
+
import { getTableWidth } from "../../../components/ui/table-layout";
|
|
7
|
+
import { MISSING_VALUE, formatCompact } from "../../../utils/format";
|
|
7
8
|
import { formatStrikeLabel } from "../../../utils/options";
|
|
8
9
|
import { formatOptionPrice, optionQuoteSide, optionSpread } from "./market-reference";
|
|
9
10
|
import { formatCarryPercent, formatCostOfSpot } from "./carry";
|
|
@@ -113,6 +114,44 @@ export function resolveOptionFieldIds(value: unknown): OptionFieldId[] {
|
|
|
113
114
|
return fields.length > 0 ? fields : [...DEFAULT_OPTION_FIELD_IDS];
|
|
114
115
|
}
|
|
115
116
|
|
|
117
|
+
/** The strike column between the two sides. */
|
|
118
|
+
const STRIKE_COLUMN_WIDTH = 9;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* The order fields give way in when calls and puts do not both fit: the
|
|
122
|
+
* Greeks past delta and the derived figures first, then the last trade and the
|
|
123
|
+
* flow, so the quotes and their volatility are what stays. The bid never goes.
|
|
124
|
+
*/
|
|
125
|
+
const OPTION_FIELD_DROP_ORDER: readonly OptionFieldId[] = [
|
|
126
|
+
"rho", "vega", "theta", "gamma", "extrinsicPerYear", "costOfSpot", "spread",
|
|
127
|
+
"last", "volume", "delta", "openInterest", "iv", "ask",
|
|
128
|
+
];
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Cells the terminal chain draws with these fields: each column as the table
|
|
132
|
+
* draws it, widened to its header and sort mark ("C LAST" takes 8 cells, not
|
|
133
|
+
* its field's 7), with no gap or padding between them, as the pane lays it out.
|
|
134
|
+
*/
|
|
135
|
+
function optionChainWidth(fields: readonly OptionFieldId[]): number {
|
|
136
|
+
return getTableWidth(createOptionColumns(fields), 0, 0);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* The fields a terminal chain `width` cells wide draws, so the puts are on
|
|
141
|
+
* screen beside the calls rather than past a sideways scroll (review, 12 Nov
|
|
142
|
+
* 2026: a floating OMON showed the calls and two put columns). Fields give
|
|
143
|
+
* way on both sides together, in OPTION_FIELD_DROP_ORDER, keeping the order
|
|
144
|
+
* Settings gave the rest.
|
|
145
|
+
*/
|
|
146
|
+
export function fitOptionFieldIds(fieldIds: readonly OptionFieldId[], width: number): OptionFieldId[] {
|
|
147
|
+
let fields = resolveOptionFieldIds(fieldIds);
|
|
148
|
+
for (const drop of OPTION_FIELD_DROP_ORDER) {
|
|
149
|
+
if (optionChainWidth(fields) <= width) break;
|
|
150
|
+
if (fields.length > 1) fields = fields.filter((field) => field !== drop);
|
|
151
|
+
}
|
|
152
|
+
return fields;
|
|
153
|
+
}
|
|
154
|
+
|
|
116
155
|
function sideColumn(side: OptionSide, field: OptionFieldId): Omit<OptionColumn, "headerColor"> {
|
|
117
156
|
const definition = OPTION_FIELDS_BY_ID.get(field)!;
|
|
118
157
|
return {
|
|
@@ -129,7 +168,7 @@ export function createOptionColumns(fieldIds: readonly OptionFieldId[]): Array<O
|
|
|
129
168
|
const fields = resolveOptionFieldIds(fieldIds);
|
|
130
169
|
return [
|
|
131
170
|
...fields.filter((field) => !OPTION_FIELDS_BY_ID.get(field)!.putOnly).map((field) => sideColumn("call", field)),
|
|
132
|
-
{ id: "strike", field: "strike", side: null, label: "STRIKE", width:
|
|
171
|
+
{ id: "strike", field: "strike", side: null, label: "STRIKE", width: STRIKE_COLUMN_WIDTH, align: "right" },
|
|
133
172
|
...[...fields].reverse().map((field) => sideColumn("put", field)),
|
|
134
173
|
];
|
|
135
174
|
}
|
|
@@ -166,7 +205,7 @@ export function findNearestStrikeIndex(strikes: number[], targetStrike: number):
|
|
|
166
205
|
export function formatIv(value: number | undefined, filled = false): string {
|
|
167
206
|
// Providers send 0 for contracts with no implied volatility; "0.0%" would read
|
|
168
207
|
// as a real quote of zero vol.
|
|
169
|
-
if (value == null || !Number.isFinite(value) || value <= 0) return
|
|
208
|
+
if (value == null || !Number.isFinite(value) || value <= 0) return MISSING_VALUE;
|
|
170
209
|
// A filled figure leads with "~": it was read off the neighbouring strikes, not solved from a quote.
|
|
171
210
|
// Without the decimal it still fits the column at 100% and over.
|
|
172
211
|
if (filled) return value >= 0.9995 ? `~${Math.round(value * 100)}%` : `~${(value * 100).toFixed(1)}%`;
|
|
@@ -182,11 +221,11 @@ export function formatIv(value: number | undefined, filled = false): string {
|
|
|
182
221
|
*/
|
|
183
222
|
function formatSpreadPercent(contract: OptionContract): string {
|
|
184
223
|
const spread = optionSpread(contract);
|
|
185
|
-
return spread.kind === "two-sided" ? `${spread.percentOfMid.toFixed(1)}%` :
|
|
224
|
+
return spread.kind === "two-sided" ? `${spread.percentOfMid.toFixed(1)}%` : MISSING_VALUE;
|
|
186
225
|
}
|
|
187
226
|
|
|
188
227
|
function formatGreek(value: number | undefined): string {
|
|
189
|
-
if (value == null || !Number.isFinite(value)) return
|
|
228
|
+
if (value == null || !Number.isFinite(value)) return MISSING_VALUE;
|
|
190
229
|
return value.toFixed(3).replace(/^(-?)0\./, "$1.");
|
|
191
230
|
}
|
|
192
231
|
|
|
@@ -291,15 +330,15 @@ function formatOptionContractCell(
|
|
|
291
330
|
contract: OptionContract | undefined,
|
|
292
331
|
column: OptionColumn,
|
|
293
332
|
): string {
|
|
294
|
-
if (!contract) return
|
|
333
|
+
if (!contract) return MISSING_VALUE;
|
|
295
334
|
const greeks = optionGreeksForColumn(row, column);
|
|
296
335
|
switch (column.field) {
|
|
297
336
|
case "last":
|
|
298
|
-
return contract.lastPrice > 0 ? formatOptionPrice(contract.lastPrice, column.width) :
|
|
337
|
+
return contract.lastPrice > 0 ? formatOptionPrice(contract.lastPrice, column.width) : MISSING_VALUE;
|
|
299
338
|
case "bid":
|
|
300
339
|
case "ask": {
|
|
301
340
|
const quote = optionQuoteSide(contract, column.field);
|
|
302
|
-
return quote == null ?
|
|
341
|
+
return quote == null ? MISSING_VALUE : formatOptionPrice(quote, column.width);
|
|
303
342
|
}
|
|
304
343
|
case "spread":
|
|
305
344
|
return formatSpreadPercent(contract);
|
|
@@ -323,7 +362,7 @@ function formatOptionContractCell(
|
|
|
323
362
|
case "extrinsicPerYear":
|
|
324
363
|
return formatCarryPercent(column.side === "call" ? row.callExtrinsicPerYear : row.putExtrinsicPerYear);
|
|
325
364
|
case "costOfSpot":
|
|
326
|
-
return column.side === "put" ? formatCostOfSpot(row.putCostOfSpot) :
|
|
365
|
+
return column.side === "put" ? formatCostOfSpot(row.putCostOfSpot) : MISSING_VALUE;
|
|
327
366
|
case "strike":
|
|
328
367
|
return formatStrikeLabel(contract.strike);
|
|
329
368
|
}
|
|
@@ -3,7 +3,8 @@ import { Box, Text, useUiCapabilities } from "../../../ui";
|
|
|
3
3
|
import { usePaneAppConfig, usePaneSettingValue, usePaneTicker, useUpdatePaneSettings } from "../../../state/app/context";
|
|
4
4
|
import { colors, priceColor } from "../../../theme/colors";
|
|
5
5
|
import { isPlainKey } from "../../../utils/keyboard";
|
|
6
|
-
import { formatCompact, formatPercentRaw } from "../../../utils/format";
|
|
6
|
+
import { MISSING_VALUE, formatCompact, formatPercentRaw } from "../../../utils/format";
|
|
7
|
+
import { formatShortDate } from "../../../utils/datetime-format";
|
|
7
8
|
import { formatMarketPrice, formatSignedMarketPrice, liveQuoteFormatOptions } from "../../../market-data/market/format";
|
|
8
9
|
import { getRegularSessionDisplay } from "../../../market-data/market/status";
|
|
9
10
|
import { chainOptionContract, formatExpDate, formatStrikeLabel, optionContractName, resolveOptionsTarget } from "../../../utils/options";
|
|
@@ -33,6 +34,7 @@ import {
|
|
|
33
34
|
type QueryBarFilter,
|
|
34
35
|
type DataTableVisibleRange,
|
|
35
36
|
} from "../../../components";
|
|
37
|
+
import { createDataTableCsv } from "../../../components/data-table/export";
|
|
36
38
|
import { statGridWithin } from "../../../components/ui/stat-grid";
|
|
37
39
|
import { useShortcut } from "../../../react/input";
|
|
38
40
|
import { useOptionalDialog, type AlertContext } from "../../../ui/dialog";
|
|
@@ -49,8 +51,10 @@ import { useOptionsCatalogue } from "./expiry-catalogue";
|
|
|
49
51
|
import { calculateOptionGreeks, calculateOptionsSummary, IV_FILLED_DETAIL, IV_FILLED_NOTE, IV_FILLED_SHORT, solveChainVolatilities, type OptionsSummary } from "./analytics";
|
|
50
52
|
import {
|
|
51
53
|
DEFAULT_OPTION_FIELD_IDS,
|
|
54
|
+
OPTION_FIELD_DEFS,
|
|
52
55
|
buildStrikeList,
|
|
53
56
|
createOptionColumns,
|
|
57
|
+
fitOptionFieldIds,
|
|
54
58
|
findNearestStrikeIndex,
|
|
55
59
|
formatIv,
|
|
56
60
|
optionColumnColor,
|
|
@@ -113,7 +117,7 @@ function sentenceCase(text: string): string {
|
|
|
113
117
|
}
|
|
114
118
|
|
|
115
119
|
function formatRatio(value: number | null | undefined): string {
|
|
116
|
-
return value == null || !Number.isFinite(value) ?
|
|
120
|
+
return value == null || !Number.isFinite(value) ? MISSING_VALUE : value.toFixed(2);
|
|
117
121
|
}
|
|
118
122
|
|
|
119
123
|
/** The minimal record the chain needs for a symbol that is bound but not saved in any list. */
|
|
@@ -134,7 +138,7 @@ function spotItem(
|
|
|
134
138
|
modelSpot: OptionModelSpot | null,
|
|
135
139
|
): StatItem {
|
|
136
140
|
const quote = underlying?.quote;
|
|
137
|
-
if (!quote || !Number.isFinite(quote.price)) return { id: "spot", label: "Spot", value:
|
|
141
|
+
if (!quote || !Number.isFinite(quote.price)) return { id: "spot", label: "Spot", value: MISSING_VALUE };
|
|
138
142
|
const options = liveQuoteFormatOptions(quote, quote.currency, assetCategory, underlying?.quoteMetadata?.instrumentType);
|
|
139
143
|
const stamp = modelSpot ? modelSpotStamp(modelSpot) : null;
|
|
140
144
|
if (modelSpot && stamp) {
|
|
@@ -171,11 +175,11 @@ function optionsSummaryItems({ spot, summary, enrichment, currency, ivRank }: {
|
|
|
171
175
|
ivRank?: { stats: IvStats | null } | null;
|
|
172
176
|
}): StatItem[] {
|
|
173
177
|
// The chain columns draw an empty IV as a dash; a summary figure reads "--" like its neighbours.
|
|
174
|
-
const iv = (value: number | null | undefined) => value == null || !(value > 0) ?
|
|
175
|
-
const whole = (value: number | null | undefined) => value == null ?
|
|
178
|
+
const iv = (value: number | null | undefined) => value == null || !(value > 0) ? MISSING_VALUE : formatIv(value);
|
|
179
|
+
const whole = (value: number | null | undefined) => value == null ? MISSING_VALUE : String(Math.round(value));
|
|
176
180
|
const rank = ivRank?.stats ?? null;
|
|
177
181
|
const move = (amount: number | null | undefined, percent: number | null | undefined): Pick<StatItem, "value" | "detail"> =>
|
|
178
|
-
amount == null || percent == null ? { value:
|
|
182
|
+
amount == null || percent == null ? { value: MISSING_VALUE } : { value: `${amount.toFixed(2)} ${currency}`.trim(), detail: `${percent.toFixed(2)}%` };
|
|
179
183
|
const points = (value: number | null | undefined) => value == null ? null : `${value >= 0 ? "+" : ""}${(value * 100).toFixed(2)}`;
|
|
180
184
|
const skew = points(enrichment?.skew25);
|
|
181
185
|
const slope = points(enrichment?.termSlope);
|
|
@@ -189,13 +193,13 @@ function optionsSummaryItems({ spot, summary, enrichment, currency, ivRank }: {
|
|
|
189
193
|
{ id: "iv-hv", label: "IV/HV", value: formatRatio(summary?.impliedHistoricalRatio) },
|
|
190
194
|
...(ivRank ? [{
|
|
191
195
|
id: "ivr", label: "IVR", value: whole(rank?.rank),
|
|
192
|
-
detail: rank ? `pctl ${whole(rank.percentile)} · ${rank.date
|
|
196
|
+
detail: rank ? `pctl ${whole(rank.percentile)} · ${formatShortDate(rank.date, { year: false, utc: true })}` : undefined,
|
|
193
197
|
}] : []),
|
|
194
198
|
{ id: "straddle", label: "Straddle", ...move(enrichment?.expectedMove.straddle, enrichment?.expectedMove.straddlePercent) },
|
|
195
199
|
{ id: "sigma", label: "1σ fit", ...move(enrichment?.expectedMove.sigma, enrichment?.expectedMove.sigmaPercent) },
|
|
196
|
-
{ id: "skew", label: "Skew", value: skew == null ?
|
|
197
|
-
{ id: "slope", label: "Slope", value: slope == null ?
|
|
198
|
-
{ id: "volume", label: "Volume", value: summary?.expirationVolume == null ?
|
|
200
|
+
{ id: "skew", label: "Skew", value: skew == null ? MISSING_VALUE : `${skew} pp`, detail: "25d P-C" },
|
|
201
|
+
{ id: "slope", label: "Slope", value: slope == null ? MISSING_VALUE : `${slope} ${slopeAnnualized ? "pp/y" : "pp"}`, detail: slopeTo },
|
|
202
|
+
{ id: "volume", label: "Volume", value: summary?.expirationVolume == null ? MISSING_VALUE : formatCompact(summary.expirationVolume, { fixedDecimals: true }) },
|
|
199
203
|
{ id: "pc-volume", label: "P/C vol", value: formatRatio(summary?.putCallVolumeRatio) },
|
|
200
204
|
{ id: "pc-oi", label: "P/C OI", value: formatRatio(summary?.putCallOpenInterestRatio) },
|
|
201
205
|
];
|
|
@@ -267,8 +271,14 @@ export function OptionsView({ width, height, focused, nestedInTabs = false, ivRa
|
|
|
267
271
|
const dailyHistoryEntry = dailyHistoryRequest ? historyEntries.get(buildChartKey(dailyHistoryRequest)) ?? null : null;
|
|
268
272
|
const dailyHistory = useResolvedEntryValue(dailyHistoryEntry);
|
|
269
273
|
const [chainRefreshMinutes] = usePaneSettingValue<string>("chainRefreshMinutes", "");
|
|
274
|
+
const { nativePaneChrome } = useUiCapabilities();
|
|
270
275
|
const [storedOptionFieldIds] = usePaneSettingValue<OptionFieldId[]>("optionColumnIds", DEFAULT_OPTION_FIELD_IDS);
|
|
271
276
|
const optionFieldIds = useMemo(() => resolveOptionFieldIds(storedOptionFieldIds), [storedOptionFieldIds]);
|
|
277
|
+
// The terminal chain keeps both sides on screen, giving up fields to fit (the
|
|
278
|
+
// table's width less its scrollbar); the desktop's table scrolls as it did.
|
|
279
|
+
const chainWidth = Math.max(1, width - 3);
|
|
280
|
+
const shownFieldIds = useMemo(() => nativePaneChrome ? optionFieldIds : fitOptionFieldIds(optionFieldIds, chainWidth),
|
|
281
|
+
[chainWidth, nativePaneChrome, optionFieldIds]);
|
|
272
282
|
const [storedStrikeWindow] = usePaneSettingValue<unknown>(STRIKE_WINDOW_SETTING, ALL_STRIKES);
|
|
273
283
|
const strikeWindow = useMemo(() => resolveStrikeWindow(storedStrikeWindow), [storedStrikeWindow]);
|
|
274
284
|
const strikeWindowText = strikeWindowValue(strikeWindow);
|
|
@@ -336,7 +346,6 @@ export function OptionsView({ width, height, focused, nestedInTabs = false, ivRa
|
|
|
336
346
|
// tab list asks the web host to reveal the active tab and can move the date
|
|
337
347
|
// being clicked before mouse-up, cancelling selection of an offscreen expiry.
|
|
338
348
|
const expirationPickRef = useRef<(value: string) => void>(() => {});
|
|
339
|
-
const { nativePaneChrome } = useUiCapabilities();
|
|
340
349
|
const selectedExpirationIndex = selectedExpiration == null ? -1 : expirationDates.indexOf(selectedExpiration);
|
|
341
350
|
const strikeWindowOptions = useMemo(() => {
|
|
342
351
|
const presets = STRIKE_WINDOW_PRESETS.map(({ value, label, short, description }) => ({ value, label, short, description }));
|
|
@@ -359,6 +368,7 @@ export function OptionsView({ width, height, focused, nestedInTabs = false, ivRa
|
|
|
359
368
|
id: "expiration",
|
|
360
369
|
label: "Exp",
|
|
361
370
|
inline: true,
|
|
371
|
+
scrolls: true,
|
|
362
372
|
value: String(selectedExpiration),
|
|
363
373
|
// The dates either side name the key that steps to them: a terminal
|
|
364
374
|
// label prefix, a desktop tooltip.
|
|
@@ -637,7 +647,7 @@ export function OptionsView({ width, height, focused, nestedInTabs = false, ivRa
|
|
|
637
647
|
.filter(Boolean).join(" · ");
|
|
638
648
|
// How IV was solved is said while the chain shows a figure that was not: a strike with no two-sided
|
|
639
649
|
// out-of-the-money quote has its IV read off the neighbouring strikes, and its cell leads with "~".
|
|
640
|
-
const ivFilledShown =
|
|
650
|
+
const ivFilledShown = shownFieldIds.includes("iv") && rows.some((row) => row.impliedVolatilityFilled && row.impliedVolatility != null);
|
|
641
651
|
// A report of the pane (`gloom fn OMON`) says it too.
|
|
642
652
|
useRemoteUiNode(ivFilledShown ? {
|
|
643
653
|
role: "report-notice",
|
|
@@ -650,6 +660,21 @@ export function OptionsView({ width, height, focused, nestedInTabs = false, ivRa
|
|
|
650
660
|
...(ivFilledShown ? [{ id: "iv-filled", parts: [{ text: IV_FILLED_NOTE, tone: "muted" as const }],
|
|
651
661
|
title: IV_FILLED_DETAIL, variants: [[{ text: IV_FILLED_SHORT, tone: "muted" as const }]] }] : []),
|
|
652
662
|
] }), [basisText, shortBasisText, ivFilledShown]);
|
|
663
|
+
// Fields the terminal chain gave up for width, counted so a narrow chain does
|
|
664
|
+
// not read as all there is; hover names them. It leads the footer, so a
|
|
665
|
+
// crowded row gives up the contract under the cursor before it.
|
|
666
|
+
const hiddenFields = OPTION_FIELD_DEFS.filter((field) => optionFieldIds.includes(field.id) && !shownFieldIds.includes(field.id))
|
|
667
|
+
.map((field) => field.label).join(", ");
|
|
668
|
+
usePaneFooter("options-fit", () => {
|
|
669
|
+
const count = hiddenFields ? hiddenFields.split(", ").length : 0;
|
|
670
|
+
return { order: -1, info: count ? [{
|
|
671
|
+
id: "options-hidden-fields",
|
|
672
|
+
capture: true,
|
|
673
|
+
parts: [{ text: `${count} ${count === 1 ? "field" : "fields"} hidden`, tone: "muted" as const }],
|
|
674
|
+
title: `Too narrow for ${hiddenFields}: a wider pane shows them, and Export CSV keeps them.`,
|
|
675
|
+
variants: [[{ text: `${count} hidden`, tone: "muted" as const }]],
|
|
676
|
+
}] : [] };
|
|
677
|
+
}, [hiddenFields]);
|
|
653
678
|
// Figures that summarise the whole expiry move at most once a second, so a
|
|
654
679
|
// busy stream reads as a steady strip rather than flicker.
|
|
655
680
|
// A new expiry, a refreshed snapshot or the underlying price arriving or
|
|
@@ -702,10 +727,10 @@ export function OptionsView({ width, height, focused, nestedInTabs = false, ivRa
|
|
|
702
727
|
),
|
|
703
728
|
[optionQuoteEntries, optionQuoteFreshness, optionQuoteTargets],
|
|
704
729
|
);
|
|
705
|
-
const optionColumns = useMemo<OptionColumn[]>(() => createOptionColumns(
|
|
730
|
+
const optionColumns = useMemo<OptionColumn[]>(() => createOptionColumns(shownFieldIds).map((column) => ({
|
|
706
731
|
...column,
|
|
707
732
|
headerColor: optionColumnColor(column, colors.panel),
|
|
708
|
-
})), [
|
|
733
|
+
})), [shownFieldIds]);
|
|
709
734
|
|
|
710
735
|
const selectedRow = rows[selectedStrikeIdx] ?? null;
|
|
711
736
|
const selectedContractAvailable = !selectedContract || (selectedContract.side === "call"
|
|
@@ -870,7 +895,7 @@ export function OptionsView({ width, height, focused, nestedInTabs = false, ivRa
|
|
|
870
895
|
quoteCoverage: optionQuoteCoverage,
|
|
871
896
|
reference: selectedReference,
|
|
872
897
|
savedAt: chainSavedAt,
|
|
873
|
-
spreadColumnVisible:
|
|
898
|
+
spreadColumnVisible: shownFieldIds.includes("spread"),
|
|
874
899
|
});
|
|
875
900
|
|
|
876
901
|
useEffect(() => {
|
|
@@ -986,10 +1011,12 @@ export function OptionsView({ width, height, focused, nestedInTabs = false, ivRa
|
|
|
986
1011
|
// cell wide enough for all of it, and otherwise takes a row of its own so no
|
|
987
1012
|
// figure is squeezed. Sized for four-digit days, so the band does not
|
|
988
1013
|
// reflow as the chain's as-of arrives or the expiry steps.
|
|
989
|
-
|
|
1014
|
+
// Dated as the expiry strip dates it ("13 Nov '26"), never the ISO day a report carries.
|
|
1015
|
+
const expiryLabel = selectedExpiration == null ? "" : formatExpDate(selectedExpiration);
|
|
1016
|
+
const expiryItem: StatItem = { id: "expiry", label: "Expiry", value: expiryLabel, detail: `(${expiryDays})` };
|
|
990
1017
|
const cellColumns = Math.max(figureColumns, Math.ceil((figures.length + 1) / statRowBudget));
|
|
991
1018
|
const expiryCells = Math.max(...figures.map((item) => item.label.length), expiryItem.label.length) + 1
|
|
992
|
-
+
|
|
1019
|
+
+ expiryLabel.length + 2 + "(9999d)".length;
|
|
993
1020
|
const expiryInline = Math.floor((statWidth - 2 * (cellColumns - 1)) / cellColumns) >= expiryCells;
|
|
994
1021
|
const statColumns = expiryInline ? cellColumns : figureColumns;
|
|
995
1022
|
const statItems = [expiryInline ? expiryItem : { ...expiryItem, wide: true }, ...figures];
|
|
@@ -1040,6 +1067,10 @@ export function OptionsView({ width, height, focused, nestedInTabs = false, ivRa
|
|
|
1040
1067
|
headerScrollId="options-table-header-scroll"
|
|
1041
1068
|
bodyScrollId="options-table-body-scroll"
|
|
1042
1069
|
columns={optionColumns}
|
|
1070
|
+
// A field the terminal gave up for width is still in the export.
|
|
1071
|
+
exportCsv={shownFieldIds.length < optionFieldIds.length
|
|
1072
|
+
? () => createDataTableCsv({ columns: createOptionColumns(optionFieldIds), items: rows, renderCell })
|
|
1073
|
+
: undefined}
|
|
1043
1074
|
// Calls and puts mirror each other around the strike; Settings orders their fields.
|
|
1044
1075
|
columnReorder={false}
|
|
1045
1076
|
items={rows}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
1
2
|
import type { HeadlessBundleResult, HeadlessPaneDefinition, HeadlessPaneEntry } from "../../../types/plugin";
|
|
2
3
|
import { parsePublicTickerKey } from "../../../utils/exchanges";
|
|
3
4
|
import { effectiveBinomialSteps, valueBinomialOption, solveBinomialImpliedVolatility } from "./binomial";
|
|
@@ -6,14 +7,14 @@ import type { OptionCalcDraft } from "./model";
|
|
|
6
7
|
import { solveImpliedVolatility, valueOption, type OptionValuation } from "../shared/volatility";
|
|
7
8
|
import { createCalculatorSurfaceDependencies, loadCalculatorSurfaceVol, type CalculatorSurfaceVol } from "./surface";
|
|
8
9
|
|
|
9
|
-
const number = (value: number) => Number.isFinite(value) ? value.toFixed(6) :
|
|
10
|
+
const number = (value: number) => Number.isFinite(value) ? value.toFixed(6) : MISSING_VALUE;
|
|
10
11
|
const metric = (label: string, value: number, suffix = ""): HeadlessPaneEntry => ({ label, value, formatted: `${number(value)}${suffix}` });
|
|
11
12
|
|
|
12
13
|
/** What was typed for each input, by option key: the CLI's strings, a pane's settings. */
|
|
13
14
|
type EnteredInputs = Readonly<Record<string, unknown>>;
|
|
14
15
|
const PLAIN_DECIMAL = /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)$/;
|
|
15
16
|
/** A computed number without float noise or padding: 73.15, 30, 60. */
|
|
16
|
-
const plain = (value: number) => Number.isFinite(value) ? String(Number(value.toPrecision(12))) :
|
|
17
|
+
const plain = (value: number) => Number.isFinite(value) ? String(Number(value.toPrecision(12))) : MISSING_VALUE;
|
|
17
18
|
|
|
18
19
|
/**
|
|
19
20
|
* An input echoed as it was entered: the typed text when it was a plain
|
|
@@ -9,7 +9,7 @@ import { useAppSelector, usePaneInstance, usePaneStateValue } from "../../../sta
|
|
|
9
9
|
import { colors } from "../../../theme/colors";
|
|
10
10
|
import type { PaneProps } from "../../../types/plugin";
|
|
11
11
|
import { Box, ScrollBox, Text } from "../../../ui";
|
|
12
|
-
import { formatNumber } from "../../../utils/format";
|
|
12
|
+
import { MISSING_VALUE, formatNumber } from "../../../utils/format";
|
|
13
13
|
import { isPlainKey } from "../../../utils/keyboard";
|
|
14
14
|
import { OPTIONS_CALCULATOR_PANE_ID, describeDraftProblem, draftFromParams, reconcileOptionCalcDraft, updateOptionCalcDraft, type OptionCalcDraft } from "./model";
|
|
15
15
|
import { buildQuoteKey, resolveEntryData } from "../../../market-data/selectors";
|
|
@@ -42,7 +42,7 @@ const IV_SOURCE_OPTIONS = [
|
|
|
42
42
|
];
|
|
43
43
|
|
|
44
44
|
function formatSigned(value: number | undefined, decimals: number): string {
|
|
45
|
-
if (value == null) return
|
|
45
|
+
if (value == null) return MISSING_VALUE;
|
|
46
46
|
return `${value > 0 ? "+" : ""}${formatNumber(value, decimals)}`;
|
|
47
47
|
}
|
|
48
48
|
|
|
@@ -172,7 +172,7 @@ export function OptionsCalculatorPane({ focused, width, height }: PaneProps) {
|
|
|
172
172
|
suffix: "d",
|
|
173
173
|
onValue: (value) => updateDraft({ daysToExpiry: Math.max(0, value) }),
|
|
174
174
|
},
|
|
175
|
-
{ id: "volatility", label: surfaceSource ? "Fit IV" : "Vol", value: effectiveDraft.volatility, valueText: surfaceSource && surface?.volatility == null ?
|
|
175
|
+
{ id: "volatility", label: surfaceSource ? "Fit IV" : "Vol", value: effectiveDraft.volatility, valueText: surfaceSource && surface?.volatility == null ? MISSING_VALUE : undefined, percent: true, onValue: (value) => updateDraft({ volatility: Math.max(0, value), volSource: "input" }) },
|
|
176
176
|
{ id: "rate", label: "Rate", value: draft.rate, percent: true, allowNegative: true, onValue: (value) => updateDraft({ rate: value }) },
|
|
177
177
|
{ id: "dividendYield", label: "Div yld", value: draft.dividendYield, percent: true, onValue: (value) => updateDraft({ dividendYield: value }) },
|
|
178
178
|
{
|
|
@@ -355,14 +355,14 @@ export function OptionsCalculatorPane({ focused, width, height }: PaneProps) {
|
|
|
355
355
|
<Box flexDirection={pairMetrics ? "row" : "column"} paddingX={1}>
|
|
356
356
|
<KeyValueRow
|
|
357
357
|
label="Model"
|
|
358
|
-
value={valuation ? formatNumber(valuation.price, 4) :
|
|
358
|
+
value={valuation ? formatNumber(valuation.price, 4) : MISSING_VALUE}
|
|
359
359
|
detail="per unit"
|
|
360
360
|
color={colors.textBright}
|
|
361
361
|
width={metricWidth}
|
|
362
362
|
/>
|
|
363
363
|
<KeyValueRow
|
|
364
364
|
label="Implied IV"
|
|
365
|
-
value={implied.volatility != null ? `${formatNumber(implied.volatility * 100, 2)}%` :
|
|
365
|
+
value={implied.volatility != null ? `${formatNumber(implied.volatility * 100, 2)}%` : MISSING_VALUE}
|
|
366
366
|
detail={implied.volatility != null ? draft.marketPriceSource === "mid" ? "from mid"
|
|
367
367
|
: draft.marketPriceSource === "last" ? "from last" : "from input" : undefined}
|
|
368
368
|
color={implied.volatility != null ? colors.positive : colors.textDim}
|
|
@@ -373,11 +373,11 @@ export function OptionsCalculatorPane({ focused, width, height }: PaneProps) {
|
|
|
373
373
|
<Box flexDirection="column" paddingX={1}>
|
|
374
374
|
<Box flexDirection={pairMetrics ? "row" : "column"}>
|
|
375
375
|
<KeyValueRow label="Delta" value={formatSigned(valuation?.delta, 4)} width={metricWidth} />
|
|
376
|
-
<KeyValueRow label="Gamma" value={valuation ? formatNumber(valuation.gamma, 4) :
|
|
376
|
+
<KeyValueRow label="Gamma" value={valuation ? formatNumber(valuation.gamma, 4) : MISSING_VALUE} width={trailingMetricWidth} />
|
|
377
377
|
</Box>
|
|
378
378
|
<Box flexDirection={pairMetrics ? "row" : "column"}>
|
|
379
379
|
<KeyValueRow label="Theta" value={formatSigned(valuation?.thetaPerDay, 4)} detail="per day" width={metricWidth} />
|
|
380
|
-
<KeyValueRow label="Vega" value={valuation ? formatNumber(valuation.vegaPerPoint, 4) :
|
|
380
|
+
<KeyValueRow label="Vega" value={valuation ? formatNumber(valuation.vegaPerPoint, 4) : MISSING_VALUE} detail="per vol pt" width={trailingMetricWidth} />
|
|
381
381
|
</Box>
|
|
382
382
|
<KeyValueRow label="Rho" value={formatSigned(valuation?.rhoPerPoint, 4)} detail="per rate pt" width={metricWidth} />
|
|
383
383
|
</Box>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
1
2
|
import type { HeadlessPaneDefinition, HeadlessPaneEntry } from "../../../types/plugin";
|
|
2
3
|
import { formatStrikeLabel } from "../../../utils/options";
|
|
3
4
|
import { expirationOptionSeconds, expiryIsoDate, OPTION_EXPIRATION_FORMAT, OPTION_EXPIRATION_PLACEHOLDER } from "../../../utils/option-expiry";
|
|
@@ -33,17 +34,17 @@ import {
|
|
|
33
34
|
|
|
34
35
|
const METHODOLOGY = "https://gloom.sh/docs/options-positioning";
|
|
35
36
|
const UNIT_TEXT = "$ of dealer delta per 1% move";
|
|
36
|
-
const strike = (value: unknown) => typeof value === "number" ? formatStrikeLabel(value) :
|
|
37
|
+
const strike = (value: unknown) => typeof value === "number" ? formatStrikeLabel(value) : MISSING_VALUE;
|
|
37
38
|
const count = (value: unknown) => formatCount(typeof value === "number" ? value : null);
|
|
38
39
|
const coinCount = (value: unknown) => formatContracts(typeof value === "number" ? value : null, true);
|
|
39
40
|
const change = (value: unknown) => formatCountChange(typeof value === "number" ? value : null);
|
|
40
41
|
const gamma = (value: unknown) => formatGamma(typeof value === "number" ? value : null);
|
|
41
42
|
const failure = (error: unknown) => error instanceof Error ? error : new Error(String(error));
|
|
42
|
-
const time = (value: string | null) => value ? formatUtcTime(value) :
|
|
43
|
-
const level = (value: number | null, spot: number | null, none =
|
|
43
|
+
const time = (value: string | null) => value ? formatUtcTime(value) : MISSING_VALUE;
|
|
44
|
+
const level = (value: number | null, spot: number | null, none = MISSING_VALUE) =>
|
|
44
45
|
value == null ? none : `${formatLevel(value)}, ${formatDistance(value, spot)} vs spot`;
|
|
45
46
|
const wall = (value: number | null, spot: number | null) =>
|
|
46
|
-
value == null ?
|
|
47
|
+
value == null ? MISSING_VALUE : `${formatStrikeLabel(value)}, ${formatDistance(value, spot)} vs spot`;
|
|
47
48
|
|
|
48
49
|
/**
|
|
49
50
|
* What the report opens with: spot, the instant gamma is evaluated at and
|
|
@@ -81,7 +82,7 @@ function summary(openInterest: OpenInterestPayload, dealer: GammaPayload | null)
|
|
|
81
82
|
{ label: "Spot", value: spot, formatted: formatPositioningSpot(spot, spotAsOf, venue, spotBasis) },
|
|
82
83
|
...(dealer && gammaTimes ? [{ label: "Gamma at", value: dealer.gammaAsOf ?? null, formatted: gammaTimes }]
|
|
83
84
|
: dealer ? [{ label: "Quotes as of", value: dealer.quotesAsOf, formatted: time(dealer.quotesAsOf) }] : []),
|
|
84
|
-
{ label: "Open interest as of", value: oiAsOf ?? openInterest.oiDate, formatted: oiAsOf ? `${time(oiAsOf)}, live` : openInterest.oiDate ??
|
|
85
|
+
{ label: "Open interest as of", value: oiAsOf ?? openInterest.oiDate, formatted: oiAsOf ? `${time(oiAsOf)}, live` : openInterest.oiDate ?? MISSING_VALUE },
|
|
85
86
|
...(contract ? [{ label: "Contract", value: contract, formatted: `${contract.size} ${contract.unit}; OI counts ${contract.unit}` }] : []),
|
|
86
87
|
...(settles ? [{ label: "Expiries settle", value: settles, formatted: `${settles}, the day each expiry names` }] : []),
|
|
87
88
|
];
|
|
@@ -182,7 +183,7 @@ export const optionsPositioningHeadless = (initialTab: PositioningTab): Headless
|
|
|
182
183
|
// Each expiry's walls, from the all-expiries gamma; absent from older servers.
|
|
183
184
|
const expiryWalls = allExpiries instanceof Error ? null : wallsByExpiry(allExpiries);
|
|
184
185
|
const settles = openInterest.expiries.some((row) => settlementTime(row.expiresAt));
|
|
185
|
-
const oiStamp = openInterest.venue && openInterest.oiAsOf ? `${time(openInterest.oiAsOf)}, live` : openInterest.oiDate ??
|
|
186
|
+
const oiStamp = openInterest.venue && openInterest.oiAsOf ? `${time(openInterest.oiAsOf)}, live` : openInterest.oiDate ?? MISSING_VALUE;
|
|
186
187
|
const gammaShown = dealer instanceof Error || !dealer.total ? null : dealer;
|
|
187
188
|
const scope = dealer instanceof Error ? null : dealer.expiry ? expiryLabel(dealer.expiry) : "all expiries";
|
|
188
189
|
const walls = gammaShown ? gammaWalls(gammaShown.strikes) : null;
|
|
@@ -217,7 +218,7 @@ export const optionsPositioningHeadless = (initialTab: PositioningTab): Headless
|
|
|
217
218
|
...(gammaColumn ? { netGamma: expiryGamma?.get(row.date) ?? null, netGammaUnit: GAMMA_UNIT } : {}),
|
|
218
219
|
})) },
|
|
219
220
|
{ title: `Strikes · ${openInterest.expiry
|
|
220
|
-
? expiryWithTimeLabel(openInterest.expiries.find((row) => row.date === openInterest.expiry) ?? { date: openInterest.expiry }) :
|
|
221
|
+
? expiryWithTimeLabel(openInterest.expiries.find((row) => row.date === openInterest.expiry) ?? { date: openInterest.expiry }) : MISSING_VALUE}`, columns: [
|
|
221
222
|
{ key: "strike", header: "Strike", format: strike },
|
|
222
223
|
{ key: "callOI", header: `Call OI${unit}`, format: contracts },
|
|
223
224
|
...(changes ? [{ key: "callChange", header: "Call chg", format: change }] : []),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { formatCompact, formatCompactAmount } from "../../../utils/format";
|
|
1
|
+
import { MISSING_VALUE, formatCompact, formatCompactAmount } from "../../../utils/format";
|
|
2
2
|
import { formatExpDate, formatStrikeLabel } from "../../../utils/options";
|
|
3
3
|
import { formatUtcTime } from "../../../utils/utc-time";
|
|
4
4
|
import {
|
|
@@ -90,23 +90,23 @@ export const isCoinContract = (contract: { unit: string } | null | undefined) =>
|
|
|
90
90
|
/** A count of contracts: whole for a US listing's, to tenths for a coin's (Deribit's 0.1 BTC step). */
|
|
91
91
|
export function formatContracts(value: number | null | undefined, coin: boolean): string {
|
|
92
92
|
if (!coin) return formatCount(value);
|
|
93
|
-
return value == null || !Number.isFinite(value) ?
|
|
93
|
+
return value == null || !Number.isFinite(value) ? MISSING_VALUE : value.toLocaleString("en-US", { maximumFractionDigits: 1 });
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
export function formatCount(value: number | null | undefined): string {
|
|
97
|
-
return value == null || !Number.isFinite(value) ?
|
|
97
|
+
return value == null || !Number.isFinite(value) ? MISSING_VALUE : Math.round(value).toLocaleString("en-US");
|
|
98
98
|
}
|
|
99
99
|
export function formatCountChange(value: number | null | undefined): string {
|
|
100
|
-
if (value == null || !Number.isFinite(value)) return
|
|
100
|
+
if (value == null || !Number.isFinite(value)) return MISSING_VALUE;
|
|
101
101
|
const rounded = Math.round(value);
|
|
102
102
|
return rounded === 0 ? "0" : `${rounded > 0 ? "+" : "-"}${Math.abs(rounded).toLocaleString("en-US")}`;
|
|
103
103
|
}
|
|
104
104
|
export function formatRatio(value: number | null | undefined): string {
|
|
105
|
-
return value == null || !Number.isFinite(value) ?
|
|
105
|
+
return value == null || !Number.isFinite(value) ? MISSING_VALUE : value.toFixed(2);
|
|
106
106
|
}
|
|
107
107
|
/** A price level (spot, the gamma flip) written as OMON and OVDV write spot. */
|
|
108
108
|
export function formatLevel(value: number | null | undefined): string {
|
|
109
|
-
return value == null || !Number.isFinite(value) ?
|
|
109
|
+
return value == null || !Number.isFinite(value) ? MISSING_VALUE : formatModelSpotPrice(value);
|
|
110
110
|
}
|
|
111
111
|
/**
|
|
112
112
|
* The spot of a positioning answer as the options panes stamp theirs: the
|
|
@@ -145,7 +145,7 @@ export function positioningSpotDetail(spot: number | null | undefined, spotAsOf:
|
|
|
145
145
|
/** The spot as a report says it: `770.88 pre-market Wed 21 Oct 09:35 UTC`, `770.10 last Wed 21 Oct 14:05 UTC`, `7,722.60 close Tue 27 Oct`. */
|
|
146
146
|
export function formatPositioningSpot(spot: number | null | undefined, spotAsOf: string | null | undefined, venue?: string, basis?: "close"): string {
|
|
147
147
|
const at = spotAsOf ? Date.parse(spotAsOf) : Number.NaN;
|
|
148
|
-
if (spot == null || !Number.isFinite(spot)) return
|
|
148
|
+
if (spot == null || !Number.isFinite(spot)) return MISSING_VALUE;
|
|
149
149
|
if (venue) return Number.isFinite(at) ? `${formatLevel(spot)} ${venue} index ${formatUtcTime(new Date(at).toISOString())}` : formatLevel(spot);
|
|
150
150
|
return Number.isFinite(at) ? `${formatLevel(spot)} ${modelSpotLabel(positioningModelSpot(spot, at, basis))}` : formatLevel(spot);
|
|
151
151
|
}
|
|
@@ -197,17 +197,17 @@ export function gammaTimesFigure(gammaAsOf: string | null | undefined, quotesAsO
|
|
|
197
197
|
|
|
198
198
|
/** Where a level sits against spot: +0.6%. */
|
|
199
199
|
export function formatDistance(level: number | null | undefined, spot: number | null | undefined): string {
|
|
200
|
-
if (level == null || spot == null || !(spot > 0)) return
|
|
200
|
+
if (level == null || spot == null || !(spot > 0)) return MISSING_VALUE;
|
|
201
201
|
const percent = (level / spot - 1) * 100;
|
|
202
202
|
const fixed = Math.abs(percent).toFixed(1);
|
|
203
203
|
return `${/[1-9]/.test(fixed) ? (percent > 0 ? "+" : "-") : ""}${fixed}%`;
|
|
204
204
|
}
|
|
205
205
|
/** Dollars of dealer delta per 1% move, signed: +1.22B. */
|
|
206
206
|
export function formatGamma(value: number | null | undefined): string {
|
|
207
|
-
return value == null ?
|
|
207
|
+
return value == null ? MISSING_VALUE : formatCompactAmount(value, { signed: true });
|
|
208
208
|
}
|
|
209
209
|
export function formatPayout(value: number | null | undefined): string {
|
|
210
|
-
return value == null ?
|
|
210
|
+
return value == null ? MISSING_VALUE : formatCompact(value);
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
/** Both sides, or blank when either was not reported. A reported zero stays zero. */
|
|
@@ -35,7 +35,7 @@ import { useThemeColors } from "../../../theme/theme-context";
|
|
|
35
35
|
import type { ResolvedSeries } from "../../../time-series/types";
|
|
36
36
|
import type { PaneProps } from "../../../types/plugin";
|
|
37
37
|
import { Box, Text } from "../../../ui";
|
|
38
|
-
import { formatCompact } from "../../../utils/format";
|
|
38
|
+
import { MISSING_VALUE, formatCompact } from "../../../utils/format";
|
|
39
39
|
import { formatStrikeLabel } from "../../../utils/options";
|
|
40
40
|
import { parsePublicTickerKey } from "../../../utils/exchanges";
|
|
41
41
|
import { isPlainKey } from "../../../utils/keyboard";
|
|
@@ -334,7 +334,7 @@ function OptionsPositioningView({ width, height, focused, symbol }: PaneProps &
|
|
|
334
334
|
usePaneNoticeFooter({ registrationId: "options-positioning:notices", focused, notices });
|
|
335
335
|
|
|
336
336
|
const expiryFilter = (value: string, options: { value: string; label: string }[], onChange: (value: string) => void): QueryBarFilter => ({
|
|
337
|
-
id: "expiry", label: "Exp", inline: true, value, onChange,
|
|
337
|
+
id: "expiry", label: "Exp", inline: true, scrolls: true, value, onChange,
|
|
338
338
|
options: options.map((option, index) => ({
|
|
339
339
|
...option,
|
|
340
340
|
hint: index === options.findIndex((entry) => entry.value === value) - 1 ? EXPIRY_PREVIOUS_KEY
|
|
@@ -369,7 +369,7 @@ function OptionsPositioningView({ width, height, focused, symbol }: PaneProps &
|
|
|
369
369
|
] : [], [colors.negative, colors.positive, strikeChart, strikeWindow]);
|
|
370
370
|
const callTotal = expiries.find((row) => row.date === shownExpiry);
|
|
371
371
|
const strikeFigures = useMemo<StatItem[]>(() => !callTotal ? [] : [
|
|
372
|
-
{ id: "max-pain", label: "Max pain", value: maxPain == null ?
|
|
372
|
+
{ id: "max-pain", label: "Max pain", value: maxPain == null ? MISSING_VALUE : formatStrikeLabel(maxPain), color: colors.warning,
|
|
373
373
|
detail: maxPain == null ? undefined : `${formatDistance(maxPain, spot)} vs spot` },
|
|
374
374
|
{ id: "spot", label: "Spot", value: formatLevel(spot), ...spotStamp },
|
|
375
375
|
{ id: "pc", label: "P/C OI", value: formatRatio(callTotal.putCallRatio) },
|
|
@@ -463,7 +463,7 @@ function OptionsPositioningView({ width, height, focused, symbol }: PaneProps &
|
|
|
463
463
|
case "callWall":
|
|
464
464
|
case "putWall": {
|
|
465
465
|
const strike = expiryWalls?.get(row.date)?.[column.id] ?? null;
|
|
466
|
-
return { text: strike == null ?
|
|
466
|
+
return { text: strike == null ? MISSING_VALUE : formatStrikeLabel(strike), value: strike, color: colors.textMuted };
|
|
467
467
|
}
|
|
468
468
|
case "putCallRatio": return { text: formatRatio(row.putCallRatio), value: row.putCallRatio };
|
|
469
469
|
case "change": {
|
|
@@ -471,7 +471,7 @@ function OptionsPositioningView({ width, height, focused, symbol }: PaneProps &
|
|
|
471
471
|
return { text: formatCountChange(change), value: change,
|
|
472
472
|
color: change == null || change === 0 ? colors.textMuted : change > 0 ? colors.positive : colors.negative };
|
|
473
473
|
}
|
|
474
|
-
case "maxPain": return { text: row.maxPain == null ?
|
|
474
|
+
case "maxPain": return { text: row.maxPain == null ? MISSING_VALUE : formatStrikeLabel(row.maxPain), value: row.maxPain, color: colors.warning };
|
|
475
475
|
case "distance": return {
|
|
476
476
|
text: formatDistance(row.maxPain, spot),
|
|
477
477
|
value: row.maxPain == null || spot == null ? null : Number(((row.maxPain / spot - 1) * 100).toFixed(4)),
|
|
@@ -521,7 +521,7 @@ function OptionsPositioningView({ width, height, focused, symbol }: PaneProps &
|
|
|
521
521
|
{ id: "flip", label: "Flip", value: formatLevel(gammaData.flip),
|
|
522
522
|
detail: gammaData.flip == null ? "none within 15%" : `${formatDistance(gammaData.flip, gammaSpot)} vs spot` },
|
|
523
523
|
...([["call-wall", "Call wall", walls.callWall], ["put-wall", "Put wall", walls.putWall]] as const).map(([id, label, strike]) => ({
|
|
524
|
-
id, label, value: strike == null ?
|
|
524
|
+
id, label, value: strike == null ? MISSING_VALUE : formatStrikeLabel(strike),
|
|
525
525
|
detail: strike == null ? undefined : `${formatDistance(strike, gammaSpot)} vs spot`,
|
|
526
526
|
})),
|
|
527
527
|
...(band ? [{ id: "band", label: "Dealer range", value: `${formatGamma(band.low)} to ${formatGamma(band.high)}`,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
1
2
|
import type { StatItem } from "../../../components";
|
|
2
3
|
import type { HeadlessPaneEntry } from "../../../types/headless";
|
|
3
4
|
import { formatHedgePrice } from "./hedge";
|
|
@@ -89,8 +90,8 @@ function distanceText(collar: Collar, price: number): string {
|
|
|
89
90
|
|
|
90
91
|
/** Why there is no floor or cap: no shares, or not the shares the contracts cover. */
|
|
91
92
|
function uncoveredText(collar: Collar): string {
|
|
92
|
-
if (collar.shares === 0) return
|
|
93
|
-
return
|
|
93
|
+
if (collar.shares === 0) return `${MISSING_VALUE} (no shares held: the options alone)`;
|
|
94
|
+
return `${MISSING_VALUE} (${collar.shares.toLocaleString("en-US")} shares held; the contracts cover ${collar.coveredShares.toLocaleString("en-US")})`;
|
|
94
95
|
}
|
|
95
96
|
|
|
96
97
|
/** `342.80 per share (345 put - 2.20 debit), 10.4% below spot 382.71`. */
|
|
@@ -133,9 +134,9 @@ export function collarStatItems(collar: Collar): StatItem[] {
|
|
|
133
134
|
return [
|
|
134
135
|
{ id: "collar-premium", label: "Net premium", value: formatHedgePrice(Math.abs(collar.netPremium)),
|
|
135
136
|
detail: collar.netPremium === 0 ? "zero cost" : `${premiumWord(collar)} per share` },
|
|
136
|
-
{ id: "collar-floor", label: "Floor", value: collar.floor == null ?
|
|
137
|
+
{ id: "collar-floor", label: "Floor", value: collar.floor == null ? MISSING_VALUE : formatHedgePrice(collar.floor),
|
|
137
138
|
detail: collar.floor == null ? uncovered : shortDistance(collar, collar.floor) },
|
|
138
|
-
{ id: "collar-cap", label: "Cap", value: collar.cap == null ?
|
|
139
|
+
{ id: "collar-cap", label: "Cap", value: collar.cap == null ? MISSING_VALUE : formatHedgePrice(collar.cap),
|
|
139
140
|
detail: collar.cap == null ? uncovered : shortDistance(collar, collar.cap) },
|
|
140
141
|
{ id: "collar-shares", label: "Shares", value: collar.shares.toLocaleString("en-US"),
|
|
141
142
|
detail: collar.shares === collar.coveredShares ? "covered" : `of ${collar.coveredShares.toLocaleString("en-US")}` },
|