gloomberb 0.16.4 → 0.16.5
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/README.md +14 -91
- package/package.json +4 -1
- package/src/{plugins/builtin/cloud → account}/auth-form.tsx +9 -9
- package/src/{plugins/builtin/cloud → account}/auth-model.ts +4 -4
- package/src/account/billing.ts +57 -0
- package/src/{plugins/builtin/cloud → account}/device-signin-dialog.tsx +18 -12
- package/src/{plugins/builtin/cloud → account}/device-signin.ts +2 -2
- package/src/{plugins/builtin/cloud → account}/email-auth-attempt.ts +2 -2
- package/src/account/session.ts +16 -0
- package/src/{plugins/builtin/cloud → account}/upgrade-dialog.tsx +16 -15
- package/src/{plugins/builtin/cloud → account}/upgrade-personalization.ts +7 -7
- package/src/{plugins/builtin/cloud → account}/upgrade-tickers.ts +6 -6
- package/src/{plugins/builtin/cloud → account}/verification-panel.tsx +6 -6
- package/src/api-client/data.ts +24 -2
- package/src/api-client/earnings.ts +6 -0
- package/src/api-client/futures-curve.ts +56 -0
- package/src/api-client/index.ts +4 -1
- package/src/api-client/market-discovery.ts +10 -1
- package/src/api-client/paths.ts +7 -0
- package/src/api-client/research-activity.ts +15 -10
- package/src/api-client/types.ts +17 -1
- package/src/api-client/yield-curves.ts +8 -0
- package/src/app/global-shortcuts.ts +15 -1
- package/src/app/pane-runtime/ticker-open-runtime.ts +7 -3
- package/src/architecture/core-builtin-allowlist.json +4 -13
- package/src/brokers/signed-in/sign-in-dialog.tsx +11 -5
- package/src/capabilities/chart-series.ts +11 -1
- package/src/cli/commands/crypto-hints.ts +7 -0
- package/src/cli/commands/fred-series.ts +61 -0
- package/src/cli/commands/market.ts +407 -104
- package/src/cli/commands/news-hints.ts +62 -0
- package/src/cli/commands/news-search.ts +53 -0
- package/src/cli/commands/options-leaps.ts +5 -2
- package/src/cli/commands/overview.ts +93 -20
- package/src/cli/commands/remote.ts +2 -1
- package/src/cli/commands/search.ts +82 -9
- package/src/cli/commands/system.ts +55 -8
- package/src/cli/commands/ticker.ts +88 -11
- package/src/cli/context.ts +45 -14
- package/src/cli/desktop-pane-shot.ts +59 -7
- package/src/cli/earnings-calendar.ts +71 -0
- package/src/cli/freshness.ts +18 -7
- package/src/cli/glossary.ts +429 -0
- package/src/cli/history-rows.ts +48 -7
- package/src/cli/index-roots.ts +7 -0
- package/src/cli/index.ts +21 -7
- package/src/cli/known-gaps.ts +27 -0
- package/src/cli/listing-arg.ts +417 -56
- package/src/cli/not-a-ticker.ts +12 -5
- package/src/cli/pane-functions/access-gate.ts +5 -0
- package/src/cli/pane-functions/capabilities.ts +3 -2
- package/src/cli/pane-functions/catalog.ts +35 -5
- package/src/cli/pane-functions/data.ts +12 -8
- package/src/cli/pane-functions/discovery.ts +1 -0
- package/src/cli/pane-functions/dom.ts +20 -6
- package/src/cli/pane-functions/freshness.ts +363 -43
- package/src/cli/pane-functions/function-help.ts +12 -5
- package/src/cli/pane-functions/headless.ts +45 -17
- package/src/cli/pane-functions/index.ts +63 -10
- package/src/cli/pane-functions/market-session.ts +22 -8
- package/src/cli/pane-functions/options.ts +63 -22
- package/src/cli/pane-functions/report-notices.ts +25 -7
- package/src/cli/pane-functions/report.ts +15 -8
- package/src/cli/pane-functions/resolver.ts +49 -12
- package/src/cli/pane-functions/screenshot.ts +110 -23
- package/src/cli/report-tables.ts +3 -0
- package/src/cli/result.ts +4 -1
- package/src/cli/staged-tickers.ts +52 -0
- package/src/cli/symbol-args.ts +9 -0
- package/src/cli/symbol-list.ts +172 -0
- package/src/cli/ticker-resolution.ts +223 -30
- package/src/cli/types.ts +5 -0
- package/src/components/chart/composite/axis-overlays.tsx +6 -2
- package/src/components/chart/composite/composite-chart.tsx +40 -6
- package/src/components/chart/composite/legend.tsx +49 -2
- package/src/components/chart/composite/panel-surface.tsx +44 -17
- package/src/components/chart/composite/price-axis-labels.tsx +3 -1
- package/src/components/command-bar/panel/index.tsx +11 -3
- package/src/components/command-bar/panel/runtime.ts +3 -0
- package/src/components/command-bar/panel/types.ts +2 -0
- package/src/components/command-bar/routes/root/provider-search.ts +4 -3
- package/src/components/command-bar/routes/ticker-search/results.ts +12 -11
- package/src/components/command-bar/routes/ticker-search/route.ts +4 -3
- package/src/components/command-bar/workflow/tickers.ts +23 -4
- package/src/components/layout/detached-pane-shell.tsx +9 -0
- package/src/components/layout/floating-pane.tsx +3 -0
- package/src/components/layout/header.tsx +20 -5
- package/src/components/layout/pane/content.tsx +7 -13
- package/src/components/layout/pane/footer/index.tsx +6 -2
- package/src/components/layout/pane/footer/model.ts +35 -1
- package/src/components/layout/pane/header.tsx +24 -1
- package/src/components/layout/pane/index.tsx +12 -2
- package/src/components/layout/pane/sidebar.tsx +78 -10
- package/src/components/layout/shell/active-drag.ts +21 -5
- package/src/components/layout/shell/drag/index.ts +39 -9
- package/src/components/layout/shell/drag/live.ts +61 -51
- package/src/components/layout/shell/drag/runtime.ts +54 -12
- package/src/components/layout/shell/index.tsx +25 -7
- package/src/components/layout/shell/menu.ts +5 -0
- package/src/components/layout/shell/native/pointer-runtime.ts +3 -1
- package/src/components/layout/shell/pane/layers.tsx +192 -45
- package/src/components/layout/shell/terminal-pointer-runtime.ts +24 -0
- package/src/components/markdown-text.tsx +62 -20
- package/src/components/metric-treemap/heat-surface.tsx +10 -1
- package/src/components/onboarding/account-step/form-panel.tsx +1 -1
- package/src/components/onboarding/account-step/index.tsx +1 -1
- package/src/components/onboarding/account-step/qr-panel.tsx +1 -1
- package/src/components/onboarding/account-step/signed-in-panel.tsx +1 -1
- package/src/components/onboarding/onboarding-keyboard.ts +1 -1
- package/src/components/onboarding/onboarding-wizard.tsx +2 -2
- package/src/components/onboarding/use-onboarding-upgrade.ts +3 -3
- package/src/components/onboarding/wizard-account.ts +2 -2
- package/src/components/pane-template-wizard.tsx +9 -1
- package/src/components/price-selector-dialog.tsx +11 -2
- package/src/components/sign-in-gate.tsx +3 -3
- package/src/components/ticker/list-table-view.tsx +24 -1
- package/src/components/ui/action-row.tsx +2 -1
- package/src/components/ui/button.tsx +7 -1
- package/src/components/ui/choice-dialog.tsx +6 -4
- package/src/components/ui/confirm-dialog.tsx +28 -18
- package/src/components/ui/data-table/index.tsx +17 -6
- package/src/components/ui/data-table/opentui/index.tsx +37 -6
- package/src/components/ui/data-table/types.ts +12 -0
- package/src/components/ui/dialog-actions.tsx +64 -0
- package/src/components/ui/display.tsx +17 -3
- package/src/components/ui/frame.tsx +35 -2
- package/src/components/ui/icon.tsx +2 -0
- package/src/components/ui/text-prompt-dialog.tsx +11 -9
- package/src/data/cached-query.ts +2 -0
- package/src/data/config/store/normalize.ts +7 -2
- package/src/data/ticker-repository.ts +5 -0
- package/src/data/ticker-store.ts +15 -0
- package/src/docs/content.ts +215 -0
- package/src/docs/load.ts +139 -0
- package/src/docs/requests.ts +39 -0
- package/src/docs/snapshot.chunk.ts +8 -0
- package/src/docs/snapshot.json +7416 -0
- package/src/docs/topics.ts +216 -0
- package/src/i18n/es.ts +61 -4
- package/src/i18n/ja.ts +61 -4
- package/src/i18n/ko.ts +61 -4
- package/src/i18n/zh-cn.ts +61 -4
- package/src/i18n/zh-tw.ts +61 -4
- package/src/layout/desks.ts +1 -1
- package/src/layout/pane-manager/dock-tree.ts +18 -0
- package/src/layout/pane-manager/index.ts +1 -0
- package/src/market-data/coordinator/chart.ts +10 -4
- package/src/market-data/coordinator/index.ts +6 -3
- package/src/{plugins/builtin/futures/contracts.ts → market-data/futures-board.ts} +81 -28
- package/src/market-data/futures-contract.ts +151 -0
- package/src/market-data/hooks.tsx +10 -2
- package/src/market-data/market/format.ts +39 -21
- package/src/market-data/market/freshness.ts +81 -18
- package/src/market-data/market/status.ts +19 -23
- package/src/market-data/published-apac-sessions.ts +23 -1
- package/src/market-data/quotes/contributions.ts +3 -0
- package/src/market-data/quotes/metadata.ts +7 -24
- package/src/market-data/quotes/resolution.ts +2 -0
- package/src/market-data/quotes/screener-live-quotes.ts +5 -4
- package/src/market-data/result-types.ts +2 -0
- package/src/plugins/builtin/account-management/model.ts +1 -56
- package/src/plugins/builtin/account-management/pane.tsx +6 -4
- package/src/plugins/builtin/account-management/password-dialog.tsx +1 -1
- package/src/plugins/builtin/alerts/cli.ts +313 -47
- package/src/plugins/builtin/alerts/events-pane.tsx +45 -7
- package/src/plugins/builtin/alerts/events.ts +23 -2
- package/src/plugins/builtin/alerts/history-pane.tsx +7 -2
- package/src/plugins/builtin/alerts/history.ts +2 -0
- package/src/plugins/builtin/alerts/index.tsx +41 -9
- package/src/plugins/builtin/alerts/pane.tsx +8 -0
- package/src/plugins/builtin/alerts/research-builder.ts +8 -3
- package/src/plugins/builtin/alerts/research-rules.ts +18 -2
- package/src/plugins/builtin/alerts/scheduled-check.ts +122 -0
- package/src/plugins/builtin/alerts/scheduled-sources.ts +25 -0
- package/src/plugins/builtin/alerts/scheduled.ts +254 -0
- package/src/plugins/builtin/alerts/targets.ts +92 -0
- package/src/plugins/builtin/analytics/index.tsx +4 -2
- package/src/plugins/builtin/analytics/risk-headless.ts +30 -12
- package/src/plugins/builtin/analytics/risk-math.ts +91 -27
- package/src/plugins/builtin/analytics/risk-model.ts +35 -5
- package/src/plugins/builtin/analytics/risk-pane.tsx +15 -8
- package/src/plugins/builtin/attention/index.tsx +2 -0
- package/src/plugins/builtin/attention/pane.tsx +3 -1
- package/src/plugins/builtin/attention/series.ts +26 -0
- package/src/plugins/builtin/awards/index.tsx +2 -0
- package/src/plugins/builtin/awards/pane.tsx +3 -1
- package/src/plugins/builtin/awards/series.ts +29 -0
- package/src/plugins/builtin/bond-calculator/model.ts +2 -1
- package/src/plugins/builtin/catalysts/pane.tsx +3 -1
- package/src/plugins/builtin/cds/client.ts +70 -13
- package/src/plugins/builtin/cds/headless.ts +116 -19
- package/src/plugins/builtin/cds/index.tsx +3 -1
- package/src/plugins/builtin/cds/model.ts +193 -31
- package/src/plugins/builtin/cds/pane.tsx +56 -14
- package/src/plugins/builtin/cds/series.ts +19 -0
- package/src/plugins/builtin/central-bank-rates/index.tsx +2 -0
- package/src/plugins/builtin/central-bank-rates/series.ts +42 -0
- package/src/plugins/builtin/chart-composer/catalog-inventory.ts +192 -255
- package/src/plugins/builtin/chart-composer/data-catalog-pane.tsx +84 -46
- package/src/plugins/builtin/chart-composer/editor.tsx +5 -4
- package/src/plugins/builtin/chart-composer/field-series.ts +40 -0
- package/src/plugins/builtin/chart-composer/headless.ts +8 -3
- package/src/plugins/builtin/chart-composer/index.tsx +9 -2
- package/src/plugins/builtin/chart-composer/series-catalog.ts +58 -50
- package/src/plugins/builtin/chart-composer/series-expression.ts +18 -10
- package/src/plugins/builtin/chart-composer/use-series-catalog.ts +59 -3
- package/src/plugins/builtin/chart-composer/user-series.ts +84 -0
- package/src/plugins/builtin/chat/content/new-dm-dialog.tsx +10 -2
- package/src/plugins/builtin/chat/controller/index.ts +2 -0
- package/src/plugins/builtin/cloud/askg/controller.ts +111 -19
- package/src/plugins/builtin/cloud/askg/executor.ts +57 -3
- package/src/plugins/builtin/cloud/askg/manifest.ts +32 -7
- package/src/plugins/builtin/cloud/askg/model.ts +27 -8
- package/src/plugins/builtin/cloud/askg/protocol.ts +10 -1
- package/src/plugins/builtin/cloud/askg/tool-display.ts +3 -0
- package/src/plugins/builtin/cloud/askg/undo.ts +2 -0
- package/src/plugins/builtin/cloud/auth-actions.tsx +1 -1
- package/src/plugins/builtin/cloud/auth-commands.ts +1 -1
- package/src/plugins/builtin/cloud/auth-dialog.tsx +3 -3
- package/src/plugins/builtin/cloud/company-picker.tsx +1 -1
- package/src/plugins/builtin/cloud/mcp-connect/dialog.tsx +3 -0
- package/src/plugins/builtin/cloud/terminal-relay/engine.ts +77 -9
- package/src/plugins/builtin/cloud/terminal-relay/manifest.ts +6 -1
- package/src/plugins/builtin/cloud/terminal-relay/policy.ts +9 -0
- package/src/plugins/builtin/cloud/terminal-relay/prompts.tsx +35 -11
- package/src/plugins/builtin/cloud/thesis/exposure.ts +1 -1
- package/src/plugins/builtin/cloud/thesis/prompts.tsx +2 -1
- package/src/plugins/builtin/company-attention/app-rank.tsx +1 -1
- package/src/plugins/builtin/company-attention/headless.ts +19 -5
- package/src/plugins/builtin/company-attention/index.tsx +2 -0
- package/src/plugins/builtin/company-attention/model.ts +26 -7
- package/src/plugins/builtin/company-attention/pane.tsx +12 -9
- package/src/plugins/builtin/company-attention/series.ts +52 -0
- package/src/plugins/builtin/company-kpis/pane.tsx +4 -2
- package/src/plugins/builtin/composite-plugins.ts +19 -13
- package/src/plugins/builtin/cot/index.tsx +3 -1
- package/src/plugins/builtin/cot/model.ts +40 -11
- package/src/plugins/builtin/cot/series.ts +27 -0
- package/src/plugins/builtin/credit-boards/index.tsx +2 -0
- package/src/plugins/builtin/credit-boards/series.ts +66 -0
- package/src/plugins/builtin/credit-conditions/index.tsx +2 -0
- package/src/plugins/builtin/credit-conditions/series.ts +26 -0
- package/src/plugins/builtin/credit-documents/headless.ts +31 -1
- package/src/plugins/builtin/credit-documents/pane.tsx +3 -1
- package/src/plugins/builtin/crypto-board/headless.ts +2 -3
- package/src/plugins/builtin/crypto-board/index.tsx +2 -0
- package/src/plugins/builtin/crypto-board/model.ts +12 -0
- package/src/plugins/builtin/crypto-board/pane.tsx +19 -12
- package/src/plugins/builtin/crypto-board/series.ts +48 -0
- package/src/plugins/builtin/custom-view/live-quotes.ts +2 -2
- package/src/plugins/builtin/debt-maturities/index.tsx +2 -0
- package/src/plugins/builtin/debt-maturities/series.ts +45 -0
- package/src/plugins/builtin/dividend-yield/headless.ts +2 -2
- package/src/plugins/builtin/dividend-yield/index.tsx +2 -0
- package/src/plugins/builtin/dividend-yield/series.ts +20 -0
- package/src/plugins/builtin/docs/blocks.tsx +181 -0
- package/src/plugins/builtin/docs/index.tsx +68 -0
- package/src/plugins/builtin/docs/pane.tsx +426 -0
- package/src/plugins/builtin/docs/targets.ts +72 -0
- package/src/plugins/builtin/docs/use-docs.ts +60 -0
- package/src/plugins/builtin/doe/index.tsx +2 -0
- package/src/plugins/builtin/doe/series.ts +62 -0
- package/src/plugins/builtin/earnings/client.ts +3 -2
- package/src/plugins/builtin/earnings/format.ts +1 -5
- package/src/plugins/builtin/earnings/headless.ts +58 -6
- package/src/plugins/builtin/earnings/history-model.ts +15 -1
- package/src/plugins/builtin/earnings/history-table.ts +13 -2
- package/src/plugins/builtin/earnings/history.tsx +7 -3
- package/src/plugins/builtin/econ/fred-catalog.ts +189 -0
- package/src/plugins/builtin/econ/fred-series-map.ts +0 -46
- package/src/plugins/builtin/econ/index.tsx +2 -0
- package/src/plugins/builtin/econ-statistics/defs.ts +5 -0
- package/src/plugins/builtin/econ-statistics/headless.ts +19 -4
- package/src/plugins/builtin/econ-statistics/stats.ts +1 -0
- package/src/plugins/builtin/equity-screener/pane.tsx +4 -11
- package/src/plugins/builtin/exposure/holdings.ts +1 -1
- package/src/plugins/builtin/exposure/pane.tsx +3 -1
- package/src/plugins/builtin/fear-greed/index.tsx +4 -0
- package/src/plugins/builtin/fear-greed/series.ts +52 -0
- package/src/plugins/builtin/futures/index.tsx +43 -3
- package/src/plugins/builtin/futures/model.ts +1 -1
- package/src/plugins/builtin/futures/returns.ts +1 -1
- package/src/plugins/builtin/futures/series.ts +13 -0
- package/src/plugins/builtin/futures/table.tsx +1 -1
- package/src/plugins/builtin/futures/use-front-returns.ts +1 -1
- package/src/plugins/builtin/futures-curve/client.ts +12 -3
- package/src/plugins/builtin/futures-curve/headless.ts +70 -9
- package/src/plugins/builtin/futures-curve/index.tsx +1 -1
- package/src/plugins/builtin/futures-curve/model.ts +66 -11
- package/src/plugins/builtin/futures-curve/pane.tsx +52 -18
- package/src/plugins/builtin/fx-matrix/index.tsx +1 -1
- package/src/plugins/builtin/gpu/board.tsx +13 -10
- package/src/plugins/builtin/gpu/changes.tsx +4 -4
- package/src/plugins/builtin/gpu/client.ts +19 -1
- package/src/plugins/builtin/gpu/equities.tsx +14 -10
- package/src/plugins/builtin/gpu/headless.ts +56 -25
- package/src/plugins/builtin/gpu/history.tsx +3 -3
- package/src/plugins/builtin/gpu/index.tsx +2 -0
- package/src/plugins/builtin/gpu/model.ts +101 -16
- package/src/plugins/builtin/gpu/pane.tsx +28 -12
- package/src/plugins/builtin/gpu/series.ts +38 -0
- package/src/plugins/builtin/help/function-card.tsx +25 -6
- package/src/plugins/builtin/help/index.tsx +17 -8
- package/src/plugins/builtin/holders/beneficial-model.ts +90 -3
- package/src/plugins/builtin/holders/beneficial-report.ts +57 -5
- package/src/plugins/builtin/holders/beneficial-view.tsx +55 -11
- package/src/plugins/builtin/holders/client.ts +22 -3
- package/src/plugins/builtin/holders/format.ts +18 -3
- package/src/plugins/builtin/holders/headless.ts +36 -133
- package/src/plugins/builtin/holders/pane.tsx +11 -4
- package/src/plugins/builtin/holders/report-header.ts +40 -5
- package/src/plugins/builtin/holders/report-rows.ts +240 -0
- package/src/plugins/builtin/insider/client.ts +35 -20
- package/src/plugins/builtin/insider/headless.ts +41 -11
- package/src/plugins/builtin/insider/index.tsx +26 -9
- package/src/plugins/builtin/insider/insider-data.ts +10 -0
- package/src/plugins/builtin/insider/issuer.ts +49 -0
- package/src/plugins/builtin/insider/model.ts +3 -0
- package/src/plugins/builtin/iv-history/client.ts +14 -4
- package/src/plugins/builtin/iv-history/headless.ts +7 -4
- package/src/plugins/builtin/iv-history/index.tsx +2 -0
- package/src/plugins/builtin/iv-history/model.ts +111 -7
- package/src/plugins/builtin/iv-history/screen-pane.tsx +5 -9
- package/src/plugins/builtin/iv-history/series.ts +29 -0
- package/src/plugins/builtin/jobs/headless.ts +28 -3
- package/src/plugins/builtin/jobs/index.tsx +3 -1
- package/src/plugins/builtin/jobs/series.ts +19 -0
- package/src/plugins/builtin/kelly-sizer/pane.tsx +2 -1
- package/src/plugins/builtin/kelly-sizer/portfolio.ts +0 -39
- package/src/plugins/builtin/macro-day/client.ts +44 -3
- package/src/plugins/builtin/macro-day/headless.ts +13 -10
- package/src/plugins/builtin/macro-day/model.ts +56 -10
- package/src/plugins/builtin/macro-day/pane.tsx +30 -20
- package/src/plugins/builtin/market-heatmap/model.ts +19 -11
- package/src/plugins/builtin/market-heatmap/portfolio.ts +2 -2
- package/src/plugins/builtin/market-movers/client.ts +7 -5
- package/src/plugins/builtin/market-movers/index.tsx +3 -2
- package/src/plugins/builtin/market-movers/model.ts +30 -0
- package/src/plugins/builtin/market-movers/screener.ts +31 -0
- package/src/plugins/builtin/market-valuation/chart-series.ts +29 -69
- package/src/plugins/builtin/market-valuation/index.tsx +3 -3
- package/src/plugins/builtin/market-valuation/indicators.ts +0 -5
- package/src/plugins/builtin/members/headless.ts +7 -2
- package/src/plugins/builtin/members/model.ts +31 -3
- package/src/plugins/builtin/members/pane.tsx +3 -6
- package/src/plugins/builtin/mna/headless.ts +15 -3
- package/src/plugins/builtin/money-markets/index.tsx +2 -0
- package/src/plugins/builtin/money-markets/series.ts +41 -0
- package/src/plugins/builtin/notes/cli.ts +12 -7
- package/src/plugins/builtin/options/view.tsx +1 -1
- package/src/plugins/builtin/options-calculator/inputs.ts +2 -1
- package/src/plugins/builtin/options-positioning/client.ts +7 -3
- package/src/plugins/builtin/options-positioning/headless.ts +1 -0
- package/src/plugins/builtin/options-positioning/pane.tsx +2 -2
- package/src/plugins/builtin/options-scenario/client.ts +2 -1
- package/src/plugins/builtin/options-scenario/headless.ts +1 -0
- package/src/plugins/builtin/options-scenario/hedge.ts +2 -1
- package/src/plugins/builtin/perps/client.ts +40 -6
- package/src/plugins/builtin/perps/equity-row.tsx +33 -11
- package/src/plugins/builtin/perps/freshness.ts +66 -0
- package/src/plugins/builtin/perps/headless.ts +45 -30
- package/src/plugins/builtin/perps/index.tsx +18 -1
- package/src/plugins/builtin/perps/model.ts +20 -5
- package/src/plugins/builtin/perps/pane.tsx +76 -20
- package/src/plugins/builtin/perps/series.ts +76 -0
- package/src/plugins/builtin/plugin-marketplace/pane.tsx +67 -61
- package/src/plugins/builtin/plugin-module.ts +3 -0
- package/src/plugins/builtin/portfolio-list/account-metrics.ts +1 -1
- package/src/plugins/builtin/portfolio-list/cli/bulk-symbols.ts +273 -0
- package/src/plugins/builtin/portfolio-list/cli/import-13f.ts +109 -0
- package/src/plugins/builtin/portfolio-list/cli/portfolio-command.ts +331 -65
- package/src/plugins/builtin/portfolio-list/cli/render.ts +200 -31
- package/src/plugins/builtin/portfolio-list/cli/shared.ts +24 -0
- package/src/plugins/builtin/portfolio-list/cli/watchlist-command.ts +120 -47
- package/src/plugins/builtin/portfolio-list/column-values.ts +1 -1
- package/src/plugins/builtin/portfolio-list/grid.tsx +1 -1
- package/src/plugins/builtin/portfolio-list/headless.ts +34 -4
- package/src/plugins/builtin/portfolio-list/imported-from.ts +8 -0
- package/src/plugins/builtin/portfolio-list/live-valuation.ts +6 -2
- package/src/plugins/builtin/portfolio-list/pane/index.tsx +6 -1
- package/src/plugins/builtin/portfolio-list/quick-add/index.tsx +17 -1
- package/src/plugins/builtin/portfolio-list/summary/totals.ts +1 -1
- package/src/plugins/builtin/portfolio-list/table.tsx +7 -1
- package/src/plugins/builtin/power/client.ts +16 -0
- package/src/plugins/builtin/power/evidence.ts +6 -2
- package/src/plugins/builtin/power/headless.ts +71 -7
- package/src/plugins/builtin/power/index.tsx +4 -1
- package/src/plugins/builtin/power/model.ts +72 -1
- package/src/plugins/builtin/power/pane.tsx +32 -9
- package/src/plugins/builtin/rate-path/headless.ts +11 -3
- package/src/plugins/builtin/realized-vol/headless.ts +5 -0
- package/src/plugins/builtin/research/corporate-actions-pane.tsx +5 -2
- package/src/plugins/builtin/research/event-model.ts +68 -24
- package/src/plugins/builtin/research/events-headless.ts +2 -1
- package/src/plugins/builtin/research/headless.ts +2 -1
- package/src/plugins/builtin/seasonality/client.ts +15 -7
- package/src/plugins/builtin/seasonality/headless.ts +36 -12
- package/src/plugins/builtin/seasonality/index.tsx +2 -2
- package/src/plugins/builtin/seasonality/model.ts +119 -0
- package/src/plugins/builtin/seasonality/pane.tsx +108 -37
- package/src/plugins/builtin/series-inventory.ts +91 -0
- package/src/plugins/builtin/shared/cloud-upgrade.ts +1 -1
- package/src/plugins/builtin/shared/command-tab.ts +30 -12
- package/src/plugins/builtin/shared/earnings-report.ts +55 -0
- package/src/plugins/builtin/shared/fred-points.ts +20 -0
- package/src/plugins/builtin/shared/fx-rate-freshness.ts +101 -0
- package/src/plugins/builtin/shared/open-description.ts +29 -0
- package/src/plugins/builtin/shared/report-freshness.ts +9 -0
- package/src/plugins/builtin/shared/series-warning.ts +5 -0
- package/src/plugins/builtin/short-interest/headless.ts +1 -0
- package/src/plugins/builtin/short-interest/index.tsx +2 -0
- package/src/plugins/builtin/short-interest/series.ts +36 -0
- package/src/plugins/builtin/short-interest/watch-headless.ts +1 -0
- package/src/plugins/builtin/short-interest/watch-model.ts +9 -5
- package/src/plugins/builtin/short-volume/headless.ts +1 -0
- package/src/plugins/builtin/short-volume/index.tsx +2 -0
- package/src/plugins/builtin/short-volume/series.ts +23 -0
- package/src/plugins/builtin/social-mentions/index.tsx +2 -0
- package/src/plugins/builtin/social-mentions/series.ts +23 -0
- package/src/plugins/builtin/supply-chain/graph-pane.tsx +3 -2
- package/src/plugins/builtin/supply-chain/pane.tsx +3 -1
- package/src/plugins/builtin/thirteenf/api.ts +1 -0
- package/src/plugins/builtin/thirteenf/data.ts +6 -4
- package/src/plugins/builtin/thirteenf/headless.ts +217 -36
- package/src/plugins/builtin/thirteenf/model.ts +39 -1
- package/src/plugins/builtin/thirteenf/overlap.ts +75 -0
- package/src/plugins/builtin/thirteenf/pane.tsx +10 -1
- package/src/plugins/builtin/thirteenf/report-notes.ts +103 -1
- package/src/plugins/builtin/thirteenf/types.ts +2 -0
- package/src/plugins/builtin/ticker-detail/index.tsx +3 -0
- package/src/plugins/builtin/ticker-detail/overview/components.tsx +1 -1
- package/src/plugins/builtin/ticker-detail/overview/futures-contract.ts +31 -0
- package/src/plugins/builtin/ticker-detail/overview/model.ts +3 -3
- package/src/plugins/builtin/ticker-detail/overview/pane.tsx +2 -1
- package/src/plugins/builtin/ticker-detail/overview-tab.tsx +48 -4
- package/src/plugins/builtin/ticker-detail/quote-monitor/index.tsx +13 -3
- package/src/plugins/builtin/time-sales/headless.ts +1 -0
- package/src/plugins/builtin/treasury-auctions/headless.ts +16 -2
- package/src/plugins/builtin/treasury-auctions/index.tsx +1 -0
- package/src/plugins/builtin/treasury-auctions/model.ts +8 -0
- package/src/plugins/builtin/vol-surface/headless.ts +1 -0
- package/src/plugins/builtin/volatility/index.tsx +2 -0
- package/src/plugins/builtin/volatility/series.ts +84 -0
- package/src/plugins/builtin/world-venue-map/geo-series.ts +26 -1
- package/src/plugins/builtin/world-venue-map/headless.ts +4 -1
- package/src/plugins/builtin/world-venue-map/index.ts +2 -1
- package/src/plugins/builtin/world-venue-map/layered-pane.tsx +8 -4
- package/src/plugins/builtin/world-venue-map/layers.ts +29 -0
- package/src/plugins/builtin/yield-curve/chart.ts +2 -2
- package/src/plugins/builtin/yield-curve/curves.ts +21 -8
- package/src/plugins/builtin/yield-curve/headless.ts +71 -18
- package/src/plugins/builtin/yield-curve/index.tsx +3 -1
- package/src/plugins/builtin/yield-curve/series.ts +86 -0
- package/src/plugins/catalog-browser.ts +2 -1
- package/src/plugins/registry/index.ts +89 -4
- package/src/{plugins/builtin/portfolio-list → portfolio}/position-metrics.ts +6 -6
- package/src/portfolio/position-value.ts +40 -0
- package/src/public/__snapshots__/public-api.test.ts.snap +7 -0
- package/src/public/time-series.ts +17 -0
- package/src/react/auto-refresh.ts +13 -3
- package/src/remote/app-host.tsx +20 -4
- package/src/remote/confirm-change.tsx +85 -0
- package/src/remote/controller-utils.ts +8 -1
- package/src/remote/controller.ts +123 -6
- package/src/remote/pane-screenshot.ts +47 -0
- package/src/remote/schema.ts +62 -0
- package/src/remote/types.ts +30 -0
- package/src/remote/watchlist.ts +306 -0
- package/src/renderers/browser/main.tsx +3 -2
- package/src/renderers/cloudflare/worker.ts +1 -1
- package/src/renderers/dom/data-table/frozen-column.ts +3 -1
- package/src/renderers/dom/data-table/index.tsx +33 -6
- package/src/renderers/dom/data-table/row.tsx +27 -1
- package/src/renderers/dom/desktop/control-styles.ts +63 -1
- package/src/renderers/dom/desktop/controls.tsx +30 -23
- package/src/renderers/dom/desktop/dialog-actions.tsx +170 -0
- package/src/renderers/dom/desktop/icons.tsx +7 -0
- package/src/renderers/dom/dom-ui-host.tsx +3 -0
- package/src/renderers/dom/host/box.tsx +3 -0
- package/src/renderers/dom/host/chart-surface.tsx +6 -2
- package/src/renderers/dom/host/live-frame.ts +6 -2
- package/src/renderers/dom/host/overflow-fade.ts +14 -1
- package/src/renderers/dom/host/size-observer.ts +26 -0
- package/src/renderers/dom/host/surface-3d.tsx +7 -2
- package/src/renderers/dom/host/text.tsx +1 -1
- package/src/renderers/dom/styles.css +61 -0
- package/src/renderers/electrobun/view/cli-pane-shot-entry.tsx +17 -2
- package/src/renderers/electrobun/view/cli-pane-shot-frame.tsx +19 -11
- package/src/renderers/electrobun/view/cli-pane-shot-health.ts +10 -26
- package/src/renderers/electrobun/view/main.tsx +2 -0
- package/src/series/capability.ts +75 -0
- package/src/series/csv.ts +160 -0
- package/src/series/files.ts +107 -0
- package/src/series/registry.ts +198 -0
- package/src/series/resolve.ts +107 -0
- package/src/series/standalone.ts +48 -0
- package/src/series/types.ts +145 -0
- package/src/series/validate.ts +171 -0
- package/src/sources/gloomberb-cloud/index.ts +7 -7
- package/src/sources/gloomberb-cloud/normalizers.ts +1 -0
- package/src/sources/history-result.ts +1 -0
- package/src/sources/listing-symbols.ts +4 -1
- package/src/sources/provider-router/batches.ts +4 -1
- package/src/sources/provider-router/cache.ts +4 -2
- package/src/sources/provider-router/cached-routes.ts +1 -1
- package/src/sources/provider-router/financial-routes.ts +1 -0
- package/src/sources/provider-router/financials.ts +13 -0
- package/src/sources/provider-router/history.ts +43 -25
- package/src/sources/provider-router/search.ts +1 -0
- package/src/sync/core-contributors.ts +1 -0
- package/src/tickers/company-name.ts +75 -0
- package/src/tickers/instrument-kind.ts +25 -0
- package/src/tickers/open-target.ts +3 -2
- package/src/tickers/search/index.ts +45 -7
- package/src/tickers/search/ranking.ts +33 -17
- package/src/tickers/search/types.ts +7 -1
- package/src/tickers/us-listing.ts +34 -0
- package/src/time-series/hooks.ts +9 -0
- package/src/time-series/resolve.ts +95 -16
- package/src/time-series/types.ts +4 -2
- package/src/time-series/use-chart-resolution.ts +32 -0
- package/src/types/config.ts +6 -0
- package/src/types/data-provider.ts +5 -0
- package/src/types/financials.ts +52 -1
- package/src/types/headless.ts +61 -0
- package/src/types/plugin.ts +19 -0
- package/src/types/price-history.ts +7 -0
- package/src/types/ticker.ts +14 -0
- package/src/ui/host.tsx +18 -0
- package/src/ui/live-resize.ts +81 -0
- package/src/ui/live-stretch.ts +121 -0
- package/src/ui/measured-cells.ts +58 -0
- package/src/ui/pane-fill.ts +11 -0
- package/src/utils/basis-points.ts +17 -0
- package/src/utils/cli-output.ts +7 -1
- package/src/utils/concurrency.ts +25 -0
- package/src/utils/crypto-pair.ts +20 -0
- package/src/utils/currency-pair.ts +19 -0
- package/src/utils/decimal-comma.ts +19 -0
- package/src/utils/dom-screenshot-css.ts +265 -0
- package/src/utils/dom-screenshot-rasters.ts +276 -0
- package/src/utils/dom-screenshot.ts +437 -52
- package/src/utils/exchange-rate-snapshot.ts +6 -2
- package/src/utils/exchanges.ts +107 -1
- package/src/utils/format.ts +16 -3
- package/src/utils/fundamentals.ts +66 -0
- package/src/utils/futures-generic.ts +6 -12
- package/src/utils/fx-market-hours.ts +15 -5
- package/src/utils/price-history.ts +99 -42
- package/src/utils/sec-eps-basis.ts +24 -11
- package/src/utils/sec.ts +61 -7
- package/src/utils/utc-time.ts +51 -4
- package/src/plugins/builtin/fx-matrix/freshness.ts +0 -65
- /package/src/{plugins/builtin/cloud → tickers}/starter-symbols.ts +0 -0
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
import { cliStyles, cliTerminalWidth, renderDefinitions, renderSection, wrapText } from "../utils/cli-output";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Plain-words meanings of the rates, auction, energy and perpetual-futures terms the
|
|
5
|
+
* functions show in their rows, headers and footers. `catalog glossary` lists them,
|
|
6
|
+
* `catalog explain <term>` prints one and `fn <function> --explain` follows a
|
|
7
|
+
* report with the ones it shows. Only terms a pane or report actually prints
|
|
8
|
+
* belong here.
|
|
9
|
+
*/
|
|
10
|
+
export interface GlossaryEntry {
|
|
11
|
+
term: string;
|
|
12
|
+
/** The abbreviation a table heads the column with, printed beside the term: `B/C`. */
|
|
13
|
+
short?: string;
|
|
14
|
+
/** Other names a reader may look it up by: `stop-out` for the high yield. */
|
|
15
|
+
aliases: readonly string[];
|
|
16
|
+
/** The functions that show it, by the token `fn` takes. */
|
|
17
|
+
functions: readonly string[];
|
|
18
|
+
/**
|
|
19
|
+
* The labels a report prints when it shows the term, matched whole and
|
|
20
|
+
* case-sensitively by `--explain`; the term and its abbreviation by default.
|
|
21
|
+
* A row type can stand for it: an AUCT Note row's rate is a high yield.
|
|
22
|
+
*/
|
|
23
|
+
shown?: readonly string[];
|
|
24
|
+
/** One or two plain sentences. */
|
|
25
|
+
definition: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const GLOSSARY: readonly GlossaryEntry[] = [
|
|
29
|
+
// Treasury auctions (AUCT).
|
|
30
|
+
{
|
|
31
|
+
term: "Bid-to-cover", short: "B/C", aliases: ["btc", "cover ratio"], functions: ["AUCT"],
|
|
32
|
+
definition: "Dollars bid for every dollar of securities the Treasury sold. A higher ratio means more demand.",
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
term: "Indirect", aliases: ["indirect bidders", "indirect bid", "indirect share"], functions: ["AUCT"],
|
|
36
|
+
definition: "The share of the competitive award won by indirect bidders, who bid through a dealer or broker. "
|
|
37
|
+
+ "They include foreign central banks, so a high share reads as strong outside demand.",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
term: "Direct", aliases: ["direct bidders", "direct bid", "direct share"], functions: ["AUCT"],
|
|
41
|
+
definition: "The share of the competitive award won by direct bidders, who bid for their own account straight to the Treasury.",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
term: "Dealer", aliases: ["primary dealer", "primary dealers", "dealers", "dealer share", "dealer takedown", "takedown"],
|
|
45
|
+
functions: ["AUCT"], shown: ["Dealer", "Primary dealer"],
|
|
46
|
+
definition: "The share of the competitive award left to the primary dealers, the banks that must bid at every auction. "
|
|
47
|
+
+ "Indirect, direct and dealer add up to 100%, so a high dealer share reads as weak demand.",
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
term: "Competitive", aliases: ["competitive bids", "noncompetitive"], functions: ["AUCT"],
|
|
51
|
+
definition: "Bids that name the yield the bidder will accept; they set the auction result. Noncompetitive bids take whatever that result is.",
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
term: "High yield", aliases: ["stop-out", "stop-out yield", "stop-out rate", "high rate"], functions: ["AUCT"],
|
|
55
|
+
shown: ["High yield", "Note", "Bond", "TIPS"],
|
|
56
|
+
definition: "The highest yield the Treasury accepted at a note, bond or TIPS auction, also called the stop-out yield. "
|
|
57
|
+
+ "Every winning bid is filled at it; for TIPS it is a real yield.",
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
term: "Stop-out vs average", aliases: ["stop-out vs avg", "vs avg", "stop-out vs median"], functions: ["AUCT"],
|
|
61
|
+
shown: ["Stop-out vs avg", "Stop-out vs average"],
|
|
62
|
+
definition: "The high (stop-out) yield minus the auction's average/median yield, in basis points; bills compare discount rates. "
|
|
63
|
+
+ "A wider gap means the last accepted bids cleared well above where most of the auction priced.",
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
term: "Tail", aliases: ["tailed", "tailing", "auction tail"], functions: ["AUCT"], shown: ["tail"],
|
|
67
|
+
definition: "How far an auction's high yield cleared above the when-issued yield at the 1 pm bid deadline; a tail reads as weak demand. "
|
|
68
|
+
+ "AUCT cannot show one, as its source has no when-issued yields, so it shows stop-out vs average instead.",
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
term: "When-issued", short: "WI", aliases: ["when issued", "wi yield", "when-issued yield"], functions: ["AUCT"],
|
|
72
|
+
shown: ["when-issued", "When-issued"],
|
|
73
|
+
definition: "Trading in a Treasury security between its announcement and its issue. The when-issued yield at the auction deadline is what a tail is measured against.",
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
term: "Investment rate", aliases: ["bill rate", "coupon equivalent", "bond-equivalent yield"], functions: ["AUCT"],
|
|
77
|
+
shown: ["Investment rate", "Bill", "CMB"],
|
|
78
|
+
definition: "A bill's yield at the highest accepted (stop-out) rate, restated as a bond-equivalent yield so it compares with "
|
|
79
|
+
+ "note yields. It reads higher than the bill's discount rate.",
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
term: "High discount margin", aliases: ["discount margin", "frn margin"], functions: ["AUCT"],
|
|
83
|
+
shown: ["High discount margin", "FRN"],
|
|
84
|
+
definition: "For a floating rate note, the highest spread over the 13-week bill rate the Treasury accepted, in basis points.",
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
term: "Median yield", aliases: ["avg/median yield", "average/median yield", "average yield"], functions: ["AUCT"],
|
|
88
|
+
definition: "Half the accepted competitive bids were at or below this yield. Close to the high yield means the bids were tightly bunched.",
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
term: "Term", aliases: ["reopening", "reopened", "security term"], functions: ["AUCT"],
|
|
92
|
+
definition: "How long the security runs from issue to maturity. A reopening sells more of an older issue, so its term "
|
|
93
|
+
+ "reads short of a round number: 29-Year 10-Month is a reopened 30-year bond.",
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
term: "CUSIP", aliases: ["cusip number"], functions: ["AUCT"],
|
|
97
|
+
definition: "The nine-character code that identifies a US security. A reopening repeats the original issue's CUSIP.",
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
term: "Bill", aliases: ["t-bill", "treasury bill", "bills"], functions: ["AUCT", "BTMM"], shown: ["Bill", "bill"],
|
|
101
|
+
definition: "Treasury debt of a year or less, sold below face value with no coupon; the climb back to face value is the interest.",
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
term: "Note", aliases: ["treasury note", "notes"], functions: ["AUCT"],
|
|
105
|
+
definition: "Treasury debt that runs 2 to 10 years and pays a fixed coupon every six months.",
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
term: "Bond", aliases: ["treasury bond", "bonds", "long bond"], functions: ["AUCT"],
|
|
109
|
+
definition: "Treasury debt that runs 20 or 30 years and pays a fixed coupon every six months.",
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
term: "TIPS", aliases: ["treasury inflation-protected securities", "inflation-protected", "linkers"], functions: ["AUCT", "GC"],
|
|
113
|
+
definition: "Treasury Inflation-Protected Securities. Their principal follows US consumer prices, so their yield is a real yield, after inflation.",
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
term: "FRN", aliases: ["floating rate note", "floater"], functions: ["AUCT"],
|
|
117
|
+
definition: "A two-year Treasury floating rate note: it pays the 13-week bill rate, reset every week, plus a spread fixed when it is first sold.",
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
term: "CMB", aliases: ["cash management bill"], functions: ["AUCT"],
|
|
121
|
+
definition: "Cash management bill: an off-schedule bill the Treasury sells to cover a short-term cash need.",
|
|
122
|
+
},
|
|
123
|
+
// Yield curves (GC).
|
|
124
|
+
{
|
|
125
|
+
term: "Basis point", short: "bp", aliases: ["bps", "basis points"], functions: ["GC", "AUCT", "BTMM", "WIRP"],
|
|
126
|
+
definition: "One hundredth of a percentage point. A yield going from 4.00% to 4.25% has risen 25bp.",
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
term: "2s10s", aliases: ["2s10s spread", "twos tens", "curve slope", "inversion", "inverted curve"], functions: ["GC"],
|
|
130
|
+
definition: "The 10-year yield minus the 2-year yield, in basis points. Below zero the curve is inverted: short-term debt pays more than long-term.",
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
term: "UST", aliases: ["treasury curve", "us treasury curve", "par yield", "par curve"], functions: ["GC"],
|
|
134
|
+
definition: "The US Treasury par yield curve: for each maturity, the coupon a Treasury priced at face value would pay.",
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
term: "Real yield", aliases: ["tips real", "real rate"], functions: ["GC"], shown: ["Real yield", "TIPS real"],
|
|
138
|
+
definition: "A yield after inflation, read from TIPS prices.",
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
term: "Breakeven", aliases: ["breakeven inflation", "breakevens", "bei"], functions: ["GC"],
|
|
142
|
+
definition: "The nominal Treasury yield minus the TIPS real yield at the same maturity: the inflation rate at which both pay the same. "
|
|
143
|
+
+ "It carries risk and liquidity premia, so it is not a forecast.",
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
term: "1Y fwd", aliases: ["forward curve", "forward rate", "one-year forward", "forward"], functions: ["GC"],
|
|
147
|
+
definition: "The curve today's yields price for one year from now. It includes term premia, so it is not a forecast.",
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
term: "Zero-coupon yield", aliases: ["zero curve", "spot rate", "spot curve"], functions: ["GC"],
|
|
151
|
+
definition: "The yield of a single payment at that maturity, with no coupons in between. The Gilt curve is a zero-coupon curve.",
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
term: "Euro AAA", aliases: ["euro area curve", "aaa curve", "ecb curve"], functions: ["GC"],
|
|
155
|
+
definition: "The ECB's euro area yield curve, built from the bonds of AAA-rated euro area governments.",
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
term: "Bund", aliases: ["bunds", "german bund", "german government bond"], functions: ["GC"],
|
|
159
|
+
definition: "A German federal government bond, the benchmark for euro area rates.",
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
term: "Gilt", aliases: ["gilts", "uk gilt"], functions: ["GC"],
|
|
163
|
+
definition: "A UK government bond.",
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
term: "JGB", aliases: ["jgbs", "japanese government bond"], functions: ["GC"],
|
|
167
|
+
definition: "A Japanese government bond.",
|
|
168
|
+
},
|
|
169
|
+
// Money markets (BTMM).
|
|
170
|
+
{
|
|
171
|
+
term: "SOFR", aliases: ["secured overnight financing rate", "repo rate"], functions: ["BTMM", "WIRP"],
|
|
172
|
+
definition: "Secured Overnight Financing Rate: the cost of borrowing cash overnight against Treasuries (repo). The main US dollar benchmark rate.",
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
term: "EFFR", aliases: ["effective fed funds rate", "effective federal funds rate", "fed funds rate", "fed funds"], functions: ["BTMM", "WIRP"],
|
|
176
|
+
shown: ["EFFR", "effr"],
|
|
177
|
+
definition: "Effective federal funds rate: the typical rate banks pay each other for unsecured overnight loans. The Fed steers it inside its target range.",
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
term: "IORB", aliases: ["interest on reserve balances", "interest on reserves"], functions: ["BTMM"],
|
|
181
|
+
definition: "Interest on reserve balances: the rate the Fed pays banks on money they keep at the Fed. It holds fed funds below the top of the target range.",
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
term: "OBFR", aliases: ["overnight bank funding rate"], functions: ["BTMM"],
|
|
185
|
+
definition: "Overnight bank funding rate: like EFFR, but also counting the overnight eurodollar borrowing of US banks.",
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
term: "Overnight RRP", aliases: ["rrp", "on rrp", "reverse repo", "reverse repurchase"], functions: ["BTMM"],
|
|
189
|
+
definition: "Cash that money funds and others lend the Fed overnight through its reverse repo facility. Falling usage means that cash went elsewhere, often into bills.",
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
term: "Treasury account", aliases: ["tga", "treasury general account"], functions: ["BTMM"],
|
|
193
|
+
definition: "The US government's cash account at the Fed. When it grows, money leaves bank reserves.",
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
term: "Bank reserves", aliases: ["reserves", "reserve balances"], functions: ["BTMM"],
|
|
197
|
+
definition: "Money banks hold in their accounts at the Fed, as a weekly average.",
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
term: "Fed assets", aliases: ["fed balance sheet", "balance sheet", "walcl"], functions: ["BTMM"],
|
|
201
|
+
definition: "Everything the Fed owns, mostly Treasuries and mortgage bonds bought to support the economy.",
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
term: "Net liquidity", aliases: ["liquidity"], functions: ["BTMM"],
|
|
205
|
+
definition: "Fed assets minus the Treasury account minus overnight RRP: a rough gauge of the dollars the Fed leaves in markets, not a forecast.",
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
term: "Pctl 1Y", aliases: ["percentile", "1y percentile", "pctl"], functions: ["BTMM", "WIRP"],
|
|
209
|
+
definition: "Where today's value ranks against the past year of the same series: 100 is the highest, 0 the lowest.",
|
|
210
|
+
},
|
|
211
|
+
// US rate path (WIRP).
|
|
212
|
+
{
|
|
213
|
+
term: "FOMC", aliases: ["federal open market committee", "fed meeting", "fomc meeting"], functions: ["WIRP"],
|
|
214
|
+
definition: "The Federal Open Market Committee, which sets the fed funds target range at eight scheduled meetings a year.",
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
term: "Target midpoint", aliases: ["target range", "fed funds target", "midpoint"], functions: ["WIRP"],
|
|
218
|
+
shown: ["Target midpoint", "targetLower", "targetUpper"],
|
|
219
|
+
definition: "The middle of the Fed's fed funds target range, the policy rate a meeting decides.",
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
term: "Implied rate", aliases: ["implied", "futures implied rate"], functions: ["WIRP"],
|
|
223
|
+
definition: "100 minus a futures price: the rate the contract is priced to settle on. For fed funds futures that is the month's average EFFR.",
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
term: "Moves", aliases: ["priced moves", "hikes", "cuts"], functions: ["WIRP"],
|
|
227
|
+
definition: "How many 25bp rate moves are priced by that meeting, counted from today: +1.00 is one hike, -0.50 half a cut.",
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
term: "P(move)", aliases: ["move probability", "probability", "odds"], functions: ["WIRP"],
|
|
231
|
+
definition: "The odds of a 25bp move at that meeting alone, read from the step in the implied rate since the meeting before. Above 100% means more than one move is priced.",
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
term: "Fed funds futures", short: "ZQ", aliases: ["fed funds contracts", "30-day fed funds"], functions: ["WIRP"],
|
|
235
|
+
shown: ["Fed funds contracts"],
|
|
236
|
+
definition: "CME futures that settle on a month's average EFFR. The meeting path is read from them.",
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
term: "SOFR futures", short: "SR3", aliases: ["sofr contracts", "three-month sofr"], functions: ["WIRP"],
|
|
240
|
+
shown: ["SOFR contracts"],
|
|
241
|
+
definition: "CME three-month SOFR futures, settled on SOFR compounded over a quarter. They price rates further out but give no meeting odds.",
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
term: "Following-month", aliases: ["following-month method"], functions: ["WIRP"],
|
|
245
|
+
shown: ["following-month"],
|
|
246
|
+
definition: "A meeting's rate read from the next month's fed funds contract, when that month holds no other meeting.",
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
term: "Monthly-weighted", aliases: ["monthly-weighted method", "calendar weighting"], functions: ["WIRP"],
|
|
250
|
+
shown: ["monthly-weighted"],
|
|
251
|
+
definition: "A meeting's rate read from its own month's contract by weighting the days before and after it, when the next month holds another meeting.",
|
|
252
|
+
},
|
|
253
|
+
// Energy futures (FUT, CTM).
|
|
254
|
+
{
|
|
255
|
+
term: "TTF", aliases: ["title transfer facility", "dutch ttf", "dutch gas", "european gas", "eu gas"], functions: ["FUT", "CTM"],
|
|
256
|
+
shown: ["TTF", "Dutch TTF Gas"],
|
|
257
|
+
definition: "Title Transfer Facility, the Dutch gas hub whose price is Europe's gas benchmark. Its futures quote in euros per MWh.",
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
term: "Henry Hub", aliases: ["henry hub gas", "us gas", "nymex natural gas"], functions: ["FUT", "CTM"],
|
|
261
|
+
definition: "The Louisiana gas hub NYMEX natural gas (NG) delivers at, the US gas benchmark. It quotes in dollars per MMBtu.",
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
term: "MWh", aliases: ["megawatt-hour", "megawatt hour", "eur/mwh", "mwh vs mmbtu"], functions: ["FUT", "CTM"],
|
|
265
|
+
definition: "Megawatt-hour, the energy unit European gas and power are priced in. 1 MWh is about 3.412 MMBtu.",
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
term: "MMBtu", aliases: ["million btu", "million british thermal units", "usd/mmbtu", "mmbtu vs mwh"], functions: ["FUT", "CTM"],
|
|
269
|
+
definition: "Million British thermal units, the unit US gas is priced in. A TTF price in EUR/MWh divided by 3.412 is EUR/MMBtu, comparable to NG once in dollars.",
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
term: "EUA", aliases: ["eu allowance", "eu allowances", "eu ets", "carbon allowance", "carbon allowances", "eu carbon"], functions: ["FUT"],
|
|
273
|
+
definition: "EU Allowance: the right to emit one tonne of CO2 under the EU Emissions Trading System, priced in euros per tonne.",
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
term: "Front month", aliases: ["front-month", "front contract", "continuous contract", "front-month contract"], functions: ["FUT", "CTM"],
|
|
277
|
+
definition: "The nearest contract still trading. FUT quotes each root's front month by its continuous symbol (TTF=F), which rolls to the next contract as one expires.",
|
|
278
|
+
},
|
|
279
|
+
// Perpetual futures (PERP).
|
|
280
|
+
{
|
|
281
|
+
term: "Perpetual", short: "perp", aliases: ["perps", "perpetual future", "perpetual futures", "perpetual swap", "perpetual contract", "perpetual market"],
|
|
282
|
+
functions: ["PERP"],
|
|
283
|
+
definition: "A futures contract with no expiry date, so a position can be held for as long as its margin lasts. "
|
|
284
|
+
+ "The funding rate keeps its price close to the asset it tracks.",
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
term: "Funding rate", aliases: ["funding", "funding payment", "funding fee", "funding 8h"], functions: ["PERP"],
|
|
288
|
+
shown: ["Funding %/int", "Funding 8h", "Paid %/int"],
|
|
289
|
+
definition: "A regular payment between the two sides of a perpetual contract, set to pull its price toward the asset's. "
|
|
290
|
+
+ "Positive means longs pay shorts, negative means shorts pay longs.",
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
term: "Open interest", short: "OI", aliases: ["open interest usd"], functions: ["PERP"],
|
|
294
|
+
definition: "The total value of contracts that are open and not yet closed, counting each buyer and seller pair once, usually in dollars. "
|
|
295
|
+
+ "It rises as new positions open and falls as they close.",
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
term: "Premium", aliases: ["mark premium"], functions: ["PERP"],
|
|
299
|
+
definition: "How far a perpetual's price sits above or below the reference price it tracks, as a percent. "
|
|
300
|
+
+ "Positive means buyers are paying up for the contract; funding pulls it back toward zero.",
|
|
301
|
+
},
|
|
302
|
+
];
|
|
303
|
+
|
|
304
|
+
const ANSI = /\x1b\[[0-9;]*m/g;
|
|
305
|
+
|
|
306
|
+
/** Letters and digits only, lower case: `stop-out`, `Stop Out` and `stopout` are one lookup. */
|
|
307
|
+
function lookupKey(text: string): string {
|
|
308
|
+
return text.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
function words(text: string): string[] {
|
|
312
|
+
return text.toLowerCase().split(/[^a-z0-9]+/).filter(Boolean);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
function names(entry: GlossaryEntry): string[] {
|
|
316
|
+
return [entry.term, ...(entry.short ? [entry.short] : []), ...entry.aliases];
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export interface GlossaryLookup {
|
|
320
|
+
/** The entries the query names: by the term, its abbreviation or an alias. */
|
|
321
|
+
exact: GlossaryEntry[];
|
|
322
|
+
/** The others whose names start a word with each word of the query: `stop-out` finds stop-out vs average. */
|
|
323
|
+
partial: GlossaryEntry[];
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
// Shorter words (the `b` and `c` of `B/C`) would find half the glossary.
|
|
327
|
+
const MIN_PARTIAL_WORD = 3;
|
|
328
|
+
|
|
329
|
+
export function lookupGlossary(query: string): GlossaryLookup {
|
|
330
|
+
const key = lookupKey(query);
|
|
331
|
+
if (!key) return { exact: [], partial: [] };
|
|
332
|
+
const exact = GLOSSARY.filter((entry) => names(entry).some((name) => lookupKey(name) === key));
|
|
333
|
+
const wanted = words(query).filter((word) => word.length >= MIN_PARTIAL_WORD);
|
|
334
|
+
const partial = wanted.length === 0 ? [] : GLOSSARY.filter((entry) => {
|
|
335
|
+
if (exact.includes(entry)) return false;
|
|
336
|
+
const have = names(entry).flatMap(words);
|
|
337
|
+
return wanted.every((word) => have.some((name) => name.startsWith(word)));
|
|
338
|
+
});
|
|
339
|
+
return { exact, partial };
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
function escapeRegExp(text: string): string {
|
|
343
|
+
return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/** The label as a whole token of the text: `bp` in `Chg bp` but not in `+9bp` or `bps`. */
|
|
347
|
+
function showsLabel(text: string, label: string): boolean {
|
|
348
|
+
return new RegExp(`(?<![A-Za-z0-9])${escapeRegExp(label)}(?![A-Za-z0-9])`).test(text);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/** The glossary entries a function's report shows, in glossary order. */
|
|
352
|
+
export function reportGlossary(token: string, reportText: string): GlossaryEntry[] {
|
|
353
|
+
const text = reportText.replace(ANSI, "");
|
|
354
|
+
const upper = token.toUpperCase();
|
|
355
|
+
return GLOSSARY.filter((entry) => entry.functions.includes(upper)
|
|
356
|
+
&& (entry.shown ?? [entry.term, ...(entry.short ? [entry.short] : [])]).some((label) => showsLabel(text, label)));
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
function textWidth(): number {
|
|
360
|
+
return Math.min(cliTerminalWidth() ?? 100, 100);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
function displayTerm(entry: GlossaryEntry): string {
|
|
364
|
+
return entry.short ? `${entry.term} (${entry.short})` : entry.term;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/** Each entry's term and meaning, side by side where the width allows. */
|
|
368
|
+
export function renderGlossaryEntries(entries: readonly GlossaryEntry[]): string[] {
|
|
369
|
+
return renderDefinitions(entries.map((entry) => [displayTerm(entry), entry.definition] as const), {
|
|
370
|
+
width: textWidth(),
|
|
371
|
+
termStyle: cliStyles.bold,
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
/** What `--explain` adds under a report: the terms it shows, or a note that it shows none. */
|
|
376
|
+
export function renderReportGlossary(token: string, entries: readonly GlossaryEntry[]): string {
|
|
377
|
+
if (entries.length === 0) {
|
|
378
|
+
return wrapText(`${token} shows no glossary terms. gloomberb catalog glossary lists every term.`, textWidth())
|
|
379
|
+
.map((line) => cliStyles.muted(line)).join("\n");
|
|
380
|
+
}
|
|
381
|
+
return [renderSection("Terms"), ...renderGlossaryEntries(entries)].join("\n");
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/** Items joined by commas into lines of `width`, never breaking inside an item. */
|
|
385
|
+
function commaLines(items: readonly string[], width: number): string[] {
|
|
386
|
+
const lines: string[] = [];
|
|
387
|
+
let line = "";
|
|
388
|
+
for (const item of items) {
|
|
389
|
+
const next = line ? `${line}, ${item}` : item;
|
|
390
|
+
if (line && next.length + 1 > width) {
|
|
391
|
+
lines.push(`${line},`);
|
|
392
|
+
line = item;
|
|
393
|
+
} else {
|
|
394
|
+
line = next;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
return line ? [...lines, line] : lines;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
/** `catalog glossary`: every term, under the function that shows it first. */
|
|
401
|
+
export function renderGlossaryIndex(): string {
|
|
402
|
+
const groups = new Map<string, string[]>();
|
|
403
|
+
for (const entry of GLOSSARY) {
|
|
404
|
+
const owner = entry.functions[0]!;
|
|
405
|
+
groups.set(owner, [...(groups.get(owner) ?? []), displayTerm(entry)]);
|
|
406
|
+
}
|
|
407
|
+
const width = textWidth();
|
|
408
|
+
const labelWidth = Math.max(...[...groups.keys()].map((owner) => owner.length)) + 4;
|
|
409
|
+
return [
|
|
410
|
+
`${renderSection("Glossary")} ${cliStyles.muted(`(${GLOSSARY.length})`)}`,
|
|
411
|
+
...[...groups].flatMap(([owner, terms]) => commaLines(terms, Math.max(20, width - labelWidth)).map((line, index) => (
|
|
412
|
+
index === 0 ? ` ${cliStyles.command(owner)}${" ".repeat(labelWidth - 2 - owner.length)}${line}` : `${" ".repeat(labelWidth)}${line}`
|
|
413
|
+
))),
|
|
414
|
+
"",
|
|
415
|
+
...wrapText("gloomberb catalog glossary <term> explains one; fn <function> --explain adds the terms a report shows.", width)
|
|
416
|
+
.map((line) => cliStyles.muted(line)),
|
|
417
|
+
].join("\n");
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
/** The JSON form of an entry. */
|
|
421
|
+
export function glossaryRecord(entry: GlossaryEntry): Record<string, unknown> {
|
|
422
|
+
return {
|
|
423
|
+
term: entry.term,
|
|
424
|
+
...(entry.short ? { short: entry.short } : {}),
|
|
425
|
+
aliases: entry.aliases,
|
|
426
|
+
functions: entry.functions,
|
|
427
|
+
definition: entry.definition,
|
|
428
|
+
};
|
|
429
|
+
}
|
package/src/cli/history-rows.ts
CHANGED
|
@@ -8,6 +8,9 @@ import {
|
|
|
8
8
|
RANGE_HISTORY_RESOLUTION,
|
|
9
9
|
type ManualChartResolution,
|
|
10
10
|
} from "../time-series/resolution";
|
|
11
|
+
import { classifyInstrumentType } from "../tickers/instrument-kind";
|
|
12
|
+
import { isRoundTheClockCoin } from "../utils/crypto-pair";
|
|
13
|
+
import { currencyPairCode } from "../utils/currency-pair";
|
|
11
14
|
import { currencyUnitLabel } from "../utils/currency-units";
|
|
12
15
|
import { getPricePointTimestamp } from "../utils/price-history";
|
|
13
16
|
import { pricePointIntegrityFlags, pricePointValues } from "../utils/price-history-integrity";
|
|
@@ -196,15 +199,16 @@ export interface HistoryUnit {
|
|
|
196
199
|
}
|
|
197
200
|
|
|
198
201
|
/**
|
|
199
|
-
* What the prices are in. An FX pair is named by its
|
|
200
|
-
* USD
|
|
201
|
-
* in the currency its quote states, a sub-unit
|
|
202
|
-
* unit is unknown rather than guessed from the
|
|
202
|
+
* What the prices are in. An FX pair is named by its listing (ZAR=X is ZAR per
|
|
203
|
+
* USD; EURUSD=X, EUR/USD and EURUSD:CCY are USD per EUR), an index is in
|
|
204
|
+
* points, and anything else is in the currency its quote states, a sub-unit
|
|
205
|
+
* named as such. Without one the unit is unknown rather than guessed from the
|
|
206
|
+
* exchange.
|
|
203
207
|
*/
|
|
204
|
-
export function historyUnit(
|
|
205
|
-
const pair =
|
|
208
|
+
export function historyUnit(listing: string, quote: { currency?: string; instrumentType?: string } | null | undefined): HistoryUnit {
|
|
209
|
+
const pair = currencyPairCode(listing.trim().toUpperCase());
|
|
206
210
|
if (pair) {
|
|
207
|
-
const [base, counter] =
|
|
211
|
+
const [base, counter] = [pair.slice(0, 3), pair.slice(3)];
|
|
208
212
|
return { kind: "pair", currency: counter, unit: `${counter} per ${base}` };
|
|
209
213
|
}
|
|
210
214
|
if (quote?.instrumentType?.trim().toUpperCase() === "INDEX") return { kind: "points", currency: null, unit: "index points" };
|
|
@@ -259,6 +263,43 @@ export function historyNotes(
|
|
|
259
263
|
return notes;
|
|
260
264
|
}
|
|
261
265
|
|
|
266
|
+
/** Gaps listed by date before the rest are only counted. */
|
|
267
|
+
const LISTED_GAPS = 3;
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* "No bar for 2026-10-10": the days a coin, which trades every day, has no
|
|
271
|
+
* daily bar for between its first and last bar. Days before the first bar are
|
|
272
|
+
* before the listing. A market that closes skips weekends and holidays, so its
|
|
273
|
+
* gaps say nothing and get no note.
|
|
274
|
+
*/
|
|
275
|
+
export function historyGapNote(
|
|
276
|
+
rows: readonly Pick<HistoryRow, "date" | "interval">[],
|
|
277
|
+
market: { listing: string; exchange?: string; instrumentType?: string },
|
|
278
|
+
): string | null {
|
|
279
|
+
const everyDay = isRoundTheClockCoin(market.listing, market.exchange)
|
|
280
|
+
|| classifyInstrumentType(market.instrumentType) === "crypto";
|
|
281
|
+
if (!everyDay || rows[0]?.interval !== "1d") return null;
|
|
282
|
+
const days = new Set(rows.map((row) => Date.parse(`${row.date.slice(0, 10)}T00:00:00Z`)).filter(Number.isFinite));
|
|
283
|
+
const sorted = [...days].sort((left, right) => left - right);
|
|
284
|
+
const gaps: Array<[number, number]> = [];
|
|
285
|
+
for (const [index, day] of sorted.slice(1).entries()) {
|
|
286
|
+
const previous = sorted[index]!;
|
|
287
|
+
if (day - previous > DAY_MS) gaps.push([previous + DAY_MS, day - DAY_MS]);
|
|
288
|
+
}
|
|
289
|
+
if (!gaps.length) return null;
|
|
290
|
+
const date = (time: number) => new Date(time).toISOString().slice(0, 10);
|
|
291
|
+
const length = (gaps: Array<[number, number]>) => gaps.reduce((count, [from, to]) => count + (to - from) / DAY_MS + 1, 0);
|
|
292
|
+
// The latest gaps by date, the rest as a count.
|
|
293
|
+
const shown = gaps.slice(-LISTED_GAPS);
|
|
294
|
+
const earlier = length(gaps) - length(shown);
|
|
295
|
+
const listed = [
|
|
296
|
+
...earlier > 0 ? [`${earlier} earlier ${earlier === 1 ? "day" : "days"}`] : [],
|
|
297
|
+
...shown.map(([from, to]) => from === to ? date(from) : `${date(from)} to ${date(to)}`),
|
|
298
|
+
];
|
|
299
|
+
const list = listed.length > 1 ? `${listed.slice(0, -1).join(", ")} and ${listed.at(-1)}` : listed[0];
|
|
300
|
+
return `${length(gaps) === 1 ? "No bar" : "No bars"} for ${list}`;
|
|
301
|
+
}
|
|
302
|
+
|
|
262
303
|
/** "37 of 251 bars have high below open or close in the source data; ...", or null when every bar agrees. */
|
|
263
304
|
export function historyFlagNote(rows: readonly Pick<HistoryRow, "flag">[]): string | null {
|
|
264
305
|
const flagged = rows.filter((row) => row.flag);
|
package/src/cli/index-roots.ts
CHANGED
|
@@ -49,3 +49,10 @@ export function indexRootTryLine(root: IndexRoot, command = "quote"): string {
|
|
|
49
49
|
export function indexRootAlsoLine(root: IndexRoot, command = "quote"): string {
|
|
50
50
|
return `also ${root.symbol} ${root.name} (gloomberb ${command} ${root.symbol})`;
|
|
51
51
|
}
|
|
52
|
+
|
|
53
|
+
/** Cboe's Treasury yield indices: 13-week bill, 5-, 10- and 30-year notes. Each level is a yield in percent. */
|
|
54
|
+
const YIELD_INDEX_SYMBOLS: ReadonlySet<string> = new Set(["^IRX", "^FVX", "^TNX", "^TYX"]);
|
|
55
|
+
|
|
56
|
+
export function isYieldIndexSymbol(symbol: string): boolean {
|
|
57
|
+
return YIELD_INDEX_SYMBOLS.has(symbol.trim().toUpperCase());
|
|
58
|
+
}
|
package/src/cli/index.ts
CHANGED
|
@@ -19,10 +19,11 @@ import {
|
|
|
19
19
|
TABLE_SECTION_OPTION,
|
|
20
20
|
type CliHelpEntry,
|
|
21
21
|
} from "./help";
|
|
22
|
-
import { parsePaneFunctionArgs } from "./pane-functions/options";
|
|
22
|
+
import { parsePaneFunctionArgs, SHOT_SIZE_LIMITS } from "./pane-functions/options";
|
|
23
23
|
import { checkCliCommandOptions } from "./command-options";
|
|
24
24
|
import { asUsageError, fail, inferCliErrorOptions, printCliError } from "./errors";
|
|
25
|
-
import { setCliColorEnabledOverride, setCliWidthOverride } from "../utils/cli-output";
|
|
25
|
+
import { cliStyles, setCliColorEnabledOverride, setCliWidthOverride } from "../utils/cli-output";
|
|
26
|
+
import { setDisplayTimeZone } from "../utils/utc-time";
|
|
26
27
|
import { search, searchCandidatesForCli, buildSearchReport } from "./commands/search";
|
|
27
28
|
import { ticker } from "./commands/ticker";
|
|
28
29
|
import { requireOneArg, takeOption } from "./commands/command-utils";
|
|
@@ -37,6 +38,8 @@ import { listPlugins, updatePlugins } from "./commands/plugins";
|
|
|
37
38
|
import { installListedPlugin, removePlugin } from "../plugins/installer";
|
|
38
39
|
import { runPaneCatalog, runPaneFunction, runPaneScreenshot } from "./pane-functions";
|
|
39
40
|
|
|
41
|
+
const { width: SHOT_WIDTH, height: SHOT_HEIGHT } = SHOT_SIZE_LIMITS;
|
|
42
|
+
|
|
40
43
|
function createCoreCliCommands(
|
|
41
44
|
helpEntries: () => CliHelpEntry[],
|
|
42
45
|
lookupCommand: (token: string) => CliCommandDef | null,
|
|
@@ -121,15 +124,21 @@ function createCoreCliCommands(
|
|
|
121
124
|
{
|
|
122
125
|
name: "catalog",
|
|
123
126
|
aliases: ["functions", "capabilities"],
|
|
124
|
-
description: "Find market functions to run with fn or capture with shot",
|
|
127
|
+
description: "Find market functions to run with fn or capture with shot, or look up a term",
|
|
125
128
|
help: {
|
|
126
129
|
group: CLI_COMMAND_GROUPS.functions,
|
|
127
|
-
usage: ["catalog [query] [--all] [--bot-safe]"],
|
|
130
|
+
usage: ["catalog [query] [--all] [--bot-safe]", "catalog glossary [term]", "catalog explain <term>"],
|
|
128
131
|
options: [
|
|
129
132
|
{ flags: "--all", description: "List every match instead of the first 25" },
|
|
130
133
|
{ flags: "--bot-safe, --botsafe", description: "Only functions with a verified unattended report" },
|
|
131
134
|
],
|
|
132
|
-
|
|
135
|
+
sections: [{
|
|
136
|
+
title: "Glossary",
|
|
137
|
+
lines: [
|
|
138
|
+
"catalog glossary lists the rates, auction, energy and perpetual-futures terms the functions show, such as bid-to-cover, SOFR, TTF or funding rate; with a term, or as catalog explain <term>, it prints what that term means. A search names the terms it matches too.",
|
|
139
|
+
],
|
|
140
|
+
}],
|
|
141
|
+
examples: ["catalog", "catalog options", "catalog HP", "catalog glossary stop-out"],
|
|
133
142
|
},
|
|
134
143
|
execute: async (args, ctx) => {
|
|
135
144
|
await runPaneCatalog(args, ctx);
|
|
@@ -145,6 +154,7 @@ function createCoreCliCommands(
|
|
|
145
154
|
options: [
|
|
146
155
|
{ flags: "--<option> <value>", description: "A function setting; gloomberb catalog <function> lists them" },
|
|
147
156
|
{ flags: "--require-bot-safe", description: "Fail unless the function has a verified, complete report" },
|
|
157
|
+
{ flags: "--explain", description: "Follow the report with what its terms mean (text and JSON; CSV keeps the rows)" },
|
|
148
158
|
{
|
|
149
159
|
...TABLE_SECTION_OPTION,
|
|
150
160
|
description: `${TABLE_SECTION_OPTION.description} (CALLS keeps --section for the transcript part)`,
|
|
@@ -158,6 +168,7 @@ function createCoreCliCommands(
|
|
|
158
168
|
"fn WEI --csv --section europe > europe.csv",
|
|
159
169
|
"fn 13F AAPL --view=ticker-holdings",
|
|
160
170
|
"fn OVME --spot 100 --strike 100 --days 30 --volatility 25",
|
|
171
|
+
"fn AUCT --explain",
|
|
161
172
|
],
|
|
162
173
|
},
|
|
163
174
|
execute: async (args, ctx) => {
|
|
@@ -174,8 +185,8 @@ function createCoreCliCommands(
|
|
|
174
185
|
usage: ["shot <function> [argument] [options]"],
|
|
175
186
|
options: [
|
|
176
187
|
{ flags: "--output <path>", description: "PNG to write; defaults to gloomberb-<function>-<argument>.png in this folder" },
|
|
177
|
-
{ flags: "--width <px>", description:
|
|
178
|
-
{ flags: "--height <px>", description:
|
|
188
|
+
{ flags: "--width <px>", description: `Layout width, ${SHOT_WIDTH.min} to ${SHOT_WIDTH.max} (default 1280). The PNG is drawn at twice the size: ${SHOT_WIDTH.min * 2} to ${SHOT_WIDTH.max * 2} px wide` },
|
|
189
|
+
{ flags: "--height <px>", description: `Layout height, ${SHOT_HEIGHT.min} to ${SHOT_HEIGHT.max} (default 720), so ${SHOT_HEIGHT.min * 2} to ${SHOT_HEIGHT.max * 2} px tall` },
|
|
179
190
|
{ flags: "--theme <id>", description: "Render with another theme, such as amber or colorblind; gloomberb config themes lists them" },
|
|
180
191
|
{ flags: "--scale <n>", description: "Text scale from 0.5 to 4 (default 1)" },
|
|
181
192
|
{ flags: "--watermark <label>", description: "Label drawn in the pane title bar" },
|
|
@@ -224,6 +235,7 @@ function createCoreCliCommands(
|
|
|
224
235
|
if (!ref) {
|
|
225
236
|
fail("Usage: gloomberb install <user/repo>");
|
|
226
237
|
}
|
|
238
|
+
console.error(cliStyles.warning("Runs with your full permissions. Read the source first."));
|
|
227
239
|
await installListedPlugin(ref);
|
|
228
240
|
},
|
|
229
241
|
},
|
|
@@ -317,6 +329,8 @@ function listedCommands(registry: CliCommandRegistry) {
|
|
|
317
329
|
|
|
318
330
|
async function createRegistry(options: DispatchCliOptions = {}): Promise<CliCommandRegistry> {
|
|
319
331
|
const config = await loadCliConfigIfAvailable();
|
|
332
|
+
// Every time a command prints follows the reader's zone from here on.
|
|
333
|
+
setDisplayTimeZone(config?.timezone);
|
|
320
334
|
let registry: CliCommandRegistry | null = null;
|
|
321
335
|
const coreCommands = createCoreCliCommands(
|
|
322
336
|
() => listedCommands(registry!).map(({ command, source }) => ({ command, source })),
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Data people look for that no source here carries yet, each with the nearest
|
|
3
|
+
* thing the app does quote. `search` and `catalog` answer a query that names
|
|
4
|
+
* one with this line instead of pointing at each other. One entry per gap;
|
|
5
|
+
* every proxy named is a listing `gloomberb quote` answers (checked
|
|
6
|
+
* 2026-10-11: CO2:LSE is the physical EUA ETC, while a bare CO2 is a Brent
|
|
7
|
+
* future).
|
|
8
|
+
*/
|
|
9
|
+
const KNOWN_GAPS: ReadonlyArray<{ terms: readonly string[]; message: string }> = [
|
|
10
|
+
{
|
|
11
|
+
terms: ["EUA", "EUAs", "EU ETS", "EU allowance", "EU allowances", "EU carbon", "carbon", "carbon allowance", "carbon allowances",
|
|
12
|
+
"carbon price", "carbon prices", "carbon credits", "emission allowances", "emissions allowances"],
|
|
13
|
+
message: "No EU carbon price (EUA) yet. Proxies: CO2:LSE, KRBN.",
|
|
14
|
+
},
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
/** Letters and digits only, lower case: `EU-ETS`, `eu ets` and `EUETS` are one lookup. */
|
|
18
|
+
function lookupKey(text: string): string {
|
|
19
|
+
return text.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** The line for a query that names a known gap as a whole ("carbon allowances", "EUA"), else null. */
|
|
23
|
+
export function knownGapMessage(query: string): string | null {
|
|
24
|
+
const key = lookupKey(query);
|
|
25
|
+
if (!key) return null;
|
|
26
|
+
return KNOWN_GAPS.find((gap) => gap.terms.some((term) => lookupKey(term) === key))?.message ?? null;
|
|
27
|
+
}
|