Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/HKUDS/Vibe-Trading
/ functions
Functions
26,887 in github.com/HKUDS/Vibe-Trading
⨍
Functions
26,887
◇
Types & classes
2,943
↳
Endpoints
204
↓ 1 callers
Function
_asset_to_dict
(item: Any)
agent/src/trading/connectors/tiger/sdk.py:659
↓ 1 callers
Function
_assign_flows_to_periods
Bucket external flows into the intervals between valuations. With :data:`FLOW_TIMING_END` interval ``k`` covers ``(d[k-1], d[k]]``, so a flow
agent/src/quantlib/performance.py:452
↓ 1 callers
Function
_assumption_lines
Return the "Key Assumptions" bullet lines, or an honest empty-state line.
agent/src/quantlib/valuation/artifact.py:1537
↓ 1 callers
Method
_astream_with_usage_fallback
(self, *args: Any, **kwargs: Any)
agent/src/providers/llm.py:676
↓ 1 callers
Function
_at
Return ``series[index]`` when in range, else ``None``.
agent/backtest/loaders/finnhub_loader.py:127
↓ 1 callers
Function
_at
Return ``series[index]`` when in range, else ``None``.
agent/backtest/loaders/yahoo_client.py:269
↓ 1 callers
Function
_at
Return ``seq[idx]`` as a stripped string, or ``None`` when out of range/empty.
agent/src/tools/institutional_holdings_tool.py:1669
↓ 1 callers
Function
_at
Return ``seq[idx]`` as a stripped string, or ``None`` when out of range/empty.
agent/src/tools/sec_filings_tool.py:377
↓ 1 callers
Function
_attach_rates
(cfg: EtoroConfig, instruments: list[dict[str, Any]])
agent/src/trading/connectors/etoro/instruments.py:427
↓ 1 callers
Function
_attach_sector
Add a synthetic sector tag DataFrame in-place (returns new dict).
agent/tests/factors/test_lookahead.py:94
↓ 1 callers
Function
_attach_sector_column
Attach PIT SW2021 L1 industry labels as ``sector`` for a CN universe. The csi300 counterpart of the sp500 Wikipedia-GICS attach: labels come
agent/src/tools/alpha_bench_tool.py:817
↓ 1 callers
Function
_attach_valuation_columns
Attach ``val:*`` columns for a CN universe from tushare ``daily_basic``. Daily market data keyed by ``trade_date`` — PIT-safe by construction, no
agent/src/tools/alpha_bench_tool.py:768
↓ 1 callers
Function
_attachment_envelope
Mirrors prependUploadedAttachments (frontend/src/lib/attachments.ts:11-21).
agent/tests/test_session_auto_title_wrapped_prompt.py:48
↓ 1 callers
Function
_attribution_benchmark_returns_from_equity
Convert a benchmark equity curve into daily returns. The first bar's return is defined as 0.0 (the curve's first value is the first observati
agent/src/api/attribution_core.py:221
↓ 1 callers
Function
_attribution_brinson_asset_class_mode
Asset-class Brinson against an explicit benchmark. Symbols are grouped by asset class; the benchmark is 100% in the benchmark ticker's own cl
agent/src/api/attribution_core.py:656
↓ 1 callers
Function
_attribution_brinson_invested_cash_mode
Invested/cash fallback Brinson when class-level returns are unavailable.
agent/src/api/attribution_core.py:733
↓ 1 callers
Function
_attribution_brinson_section
Build the Brinson-Fachler section in symbol, asset_class, or fallback mode. Args: run_dir: Root directory of the run. codes: Conf
agent/src/api/attribution_core.py:575
↓ 1 callers
Function
_attribution_brinson_symbol_mode
Symbol-mode Brinson: each configured symbol is its own sector. Portfolio weights come from the last ``positions.csv`` row; benchmark weights
agent/src/api/attribution_core.py:613
↓ 1 callers
Function
_attribution_downsample
Even-stride downsample a series, always pinning the last point. Args: rows: Series points in chronological order. max_points: Max
agent/src/api/attribution_core.py:106
↓ 1 callers
Function
_attribution_equal_weight_returns
Equal-weight daily mean of the configured codes' close-to-close returns. Used as the auto-benchmark series when ``equity.csv`` carries no ``b
agent/src/api/attribution_core.py:279
↓ 1 callers
Function
_attribution_factor_section
Build the factor section: full-sample OLS plus rolling and cumulative series. Args: dates: Equity-curve dates aligned with ``portfolio_re
agent/src/api/attribution_core.py:361
↓ 1 callers
Function
_attribution_iso_dates
Normalize timestamp cells to ``YYYY-MM-DD`` date-part strings.
agent/src/api/attribution_core.py:83
↓ 1 callers
Function
_attribution_load_equity
Load dates, portfolio returns, and benchmark equity from ``equity.csv``. Args: run_dir: Root directory of the run. Returns:
agent/src/api/attribution_core.py:173
↓ 1 callers
Function
_attribution_load_json
Load a JSON object from disk if present, not a symlink, and dict-shaped.
agent/src/api/attribution_core.py:157
↓ 1 callers
Function
_attribution_ols
Ordinary least squares of ``y`` on ``x`` with an intercept. Returns ``{"alpha", "beta", "r_squared", "alpha_t_stat"}`` where ``alpha_t_stat``
agent/src/api/attribution_core.py:328
↓ 1 callers
Function
_attribution_or_zero
Compute attribution if the journal is available, else return zeros.
agent/src/shadow_account/backtester.py:566
↓ 1 callers
Function
_attribution_round_values
Recursively round every float in a JSON-ready structure.
agent/src/api/attribution_core.py:129
↓ 1 callers
Function
_audit_live_cancel
Write a live-action audit record for a live order cancellation (best-effort).
agent/src/trading/service.py:1261
↓ 1 callers
Function
_audit_rows_from_payload
Parse MCP completion audit rows.
agent/mcp_server.py:503
↓ 1 callers
Function
_auth_headers
(cfg: UpbitConfig, params: Mapping[str, Any] | None)
agent/src/trading/connectors/upbit/sdk.py:558
↓ 1 callers
Function
_authorization_required
Return whether a connector failure explicitly asks for OAuth renewal.
agent/src/portfolio/service.py:135
↓ 1 callers
Method
_authorize_private_company_skill
Keep private-company routing symmetric with locked listing evidence.
agent/src/agent/grounding/identity.py:954
↓ 1 callers
Method
_authorize_websocket_handshake
(self, connection: Any, query: dict[str, list[str]])
agent/src/channels/websocket.py:436
↓ 1 callers
Function
_await_stopped
Let the cancelled driver run its teardown.
agent/tests/test_api_live_runtime.py:385
↓ 1 callers
Function
_await_ticks
Let the scheduler loop actually run, so "it is still alive" is meaningful.
agent/tests/test_api_live_runtime.py:376
↓ 1 callers
Function
_backtest_summary
(config: Mapping[str, Any])
agent/backtest/run_card.py:281
↓ 1 callers
Function
_backtest_timeout_seconds
Return the configured backtest subprocess timeout. The backtest is a write-style tool, so the agent-loop timeout does not cancel it. The sub
agent/src/tools/backtest_tool.py:23
↓ 1 callers
Function
_backtests_of
Backtests a turn left: the run itself and its direct sub-directories. A turn root that holds an archive manifest is a copy of one of its sub-
agent/src/tools/backtest_runs_tool.py:62
↓ 1 callers
Function
_bad_request_error
Build a ProviderStreamError mimicking a deterministic 400 rejection. Returns: ProviderStreamError whose original exception carries status
agent/tests/test_agent_loop_stream_retry.py:97
↓ 1 callers
Function
_bad_request_error
Build a ProviderStreamError mimicking a deterministic 400 rejection. Returns: ProviderStreamError whose original exception carries status
agent/tests/test_swarm_worker_stream_retry.py:174
↓ 1 callers
Function
_balance_detail_to_dict
(item: Any)
agent/src/trading/connectors/okx/sdk.py:702
↓ 1 callers
Function
_baostock_available
True if the baostock package is importable.
agent/backtest/loaders/valuation_loader.py:117
↓ 1 callers
Function
_bar_date
Extract date from bar, handling various column names.
agent/backtest/engines/india_equity.py:112
↓ 1 callers
Function
_bar_epoch
Epoch (UTC-naive seconds) for a Kite candle timestamp. Kite timestamps are IST. Intraday candles are real instants, so the UTC epoch is exact
agent/src/trading/connectors/zerodha/sdk.py:274
↓ 1 callers
Function
_bar_fingerprint
D3 bar fingerprint over the continuous 5m bars actually used. Payload is a list sorted by (symbol, day, label) so symbol input order and dict
agent/src/tools/paper_trade/data_5m.py:431
↓ 1 callers
Method
_bar_missing
(self, day: str, sym_data: data.SymbolData)
agent/src/tools/paper_trade/engine.py:370
↓ 1 callers
Function
_bar_returns
Per-bar simple returns for the given bars (previous bar may be any regime). The anchor bar (``index - 1``) is deliberately outside ``bar_indices`
agent/src/strategy_discovery/evidence_harness.py:332
↓ 1 callers
Function
_bar_to_dict
(bar: Any)
agent/src/trading/connectors/ibkr/local.py:793
↓ 1 callers
Function
_bar_to_dict
(item: Any)
agent/src/trading/connectors/tiger/sdk.py:715
↓ 1 callers
Function
_bar_to_dict
(item: Any)
agent/src/trading/connectors/longbridge/sdk.py:931
↓ 1 callers
Function
_bar_to_dict
(item: Any)
agent/src/trading/connectors/alpaca/sdk.py:944
↓ 1 callers
Function
_bar_to_dict
(item: Any)
agent/src/trading/connectors/toss/sdk.py:673
↓ 1 callers
Function
_bar_to_dict
(row: Mapping[str, Any])
agent/src/trading/connectors/futu/sdk.py:1341
↓ 1 callers
Function
_bar_to_dict
(item: Any)
agent/src/trading/connectors/kis/sdk.py:954
↓ 1 callers
Method
_bar_untradable
(self, day: str, sym_data: data.SymbolData)
agent/src/tools/paper_trade/engine.py:375
↓ 1 callers
Function
_bars
(symbol: str, rows: list[dict[str, Any]])
agent/tests/test_grounding_role_hardening.py:57
↓ 1 callers
Method
_base_price
Resolve the KRX base price (기준가격) for *symbol* on this bar. Both sources are strictly historical, so neither leaks the decision bar's
agent/backtest/engines/korea_equity.py:230
↓ 1 callers
Function
_base_url
Return the raw-api endpoint URL (env-overridable).
agent/backtest/loaders/gildata_loader.py:107
↓ 1 callers
Function
_baseline_panel
Synthetic, reproducible OHLCV+amount+sector panel. Returns wide DataFrames with ``index = DatetimeIndex`` and ``columns = [SYM0..SYM9]`` so e
agent/tests/factors/test_lookahead.py:47
↓ 1 callers
Method
_batch_execute
Execute tools with read/write batching. Consecutive readonly tools run in parallel via ThreadPoolExecutor. Write tools run serially b
agent/src/agent/tool_lifecycle.py:393
↓ 1 callers
Function
_begin_registration
Start the device-code flow. Returns device_code, qr_url, interval, expire_in.
agent/src/channels/feishu.py:448
↓ 1 callers
Method
_begin_resolution
Enter unresolved state before the resolver executes.
agent/src/agent/grounding/identity.py:672
↓ 1 callers
Function
_bench_close
Benchmark close fallback: cross-sectional mean of `close`.
agent/src/factors/zoo/gtja191/alpha_182.py:62
↓ 1 callers
Function
_bench_close
Benchmark close fallback: cross-sectional mean of `close`.
agent/src/factors/zoo/gtja191/alpha_181.py:62
↓ 1 callers
Function
_bench_close
Benchmark close fallback: cross-sectional mean of `close`.
agent/src/factors/zoo/gtja191/alpha_149.py:62
↓ 1 callers
Function
_bench_one_alpha
Compute IC stats for one alpha. Returns a dict, may raise SkipAlpha / RegistryError.
agent/src/tools/alpha_bench_tool.py:995
↓ 1 callers
Function
_benford_conforming_sample
Build a list whose leading-digit distribution tracks Benford's law.
agent/tests/test_financial_rigor_tool.py:180
↓ 1 callers
Method
_bind_account
Resolve the account this order may trade, or the reason it may not. A broker whose one login reaches several accounts (Robinhood) trades
agent/src/live/order_guard.py:620
↓ 1 callers
Function
_body
(symbol, bars)
agent/tests/test_fmp_daily_aliases.py:11
↓ 1 callers
Function
_bound_socket
Hold *port* bound but NOT listening (connect attempts are refused).
agent/tests/test_websocket_connection_test.py:41
↓ 1 callers
Function
_bounded
Scale each row by its largest magnitude. Centering and squared norms can overflow for large inputs (market caps) and underflow into a false z
agent/src/quantlib/combination.py:106
↓ 1 callers
Function
_bounded_fraction
Validate a (0, 1] fraction from config, rejecting bools and junk.
agent/backtest/constraints.py:35
↓ 1 callers
Function
_bracket_content_hash
Mirror ``_validate_bracket_artifact``'s canonical hashing exactly.
agent/tests/test_ccxt_perpetual_loader.py:83
↓ 1 callers
Function
_break
(index: int, seq: int | None, reason: str, detail: str)
agent/src/governance/ledger.py:267
↓ 1 callers
Function
_breakeven_caveat
Run-level caveat that nulls the breakeven, or ``None``. ``max_concurrent`` comes from the entry/exit pairs in ``trades.csv``: above 1 the bre
agent/src/strategy_discovery/evidence_harness.py:233
↓ 1 callers
Function
_broker_for
Resolve the canonical broker namespace for a live-broker server. A server keyed by a known broker name uses that key; a server detected only
agent/src/live/registry.py:96
↓ 1 callers
Function
_broker_overview
()
agent/src/trading/capability_matrix.py:91
↓ 1 callers
Method
_broker_quote_price
Read a USD price for ``symbol`` from the broker's quote tool. Calls the ungated read path (never the guard) for the mapped quote tool
agent/src/live/order_guard.py:333
↓ 1 callers
Function
_bs_price_and_greeks
Compute Black-Scholes price and Greeks. Thin adapter over :mod:`src.quantlib.options`, which owns the one implementation of this formula in t
agent/src/tools/options_pricing_tool.py:43
↓ 1 callers
Function
_budget_verdicts
(case: HarnessCase, bundle: ArtifactBundle)
agent/evals/harness/assertions.py:526
↓ 1 callers
Method
_build
(self, S: float, hv: float, ts: pd.Timestamp, expiry: str)
agent/src/skills/options-strategy/example_signal_engine.py:117
↓ 1 callers
Function
_build_anthropic
Build the native Anthropic Messages API adapter. Uses a temperature-safe subclass so models that deprecate the `temperature` field (e.g. clau
agent/src/providers/llm.py:1234
↓ 1 callers
Function
_build_api
Build a Tushare pro API client from the configured token. Raises: RuntimeError: If ``TUSHARE_TOKEN`` is unset or a placeholder.
agent/backtest/loaders/industry_loader.py:93
↓ 1 callers
Function
_build_api
Build a Tushare pro API client from the configured token. Raises: RuntimeError: If ``TUSHARE_TOKEN`` is unset or a placeholder.
agent/backtest/loaders/valuation_loader.py:82
↓ 1 callers
Method
_build_attachment_path
(self, event: MatrixMediaEvent, attachment_type: str, filename: str, mime: str
agent/src/channels/matrix.py:860
↓ 1 callers
Function
_build_benchmark_table
Build a benchmark comparison table from metrics dict. Args: m: Metrics dictionary (from _read_metrics or result dict). Returns:
agent/cli/_legacy.py:1351
↓ 1 callers
Method
_build_button_blocks
Build Slack Block Kit blocks with action buttons.
agent/src/channels/slack.py:632
↓ 1 callers
Method
_build_channel_kwargs
Build adapter-specific constructor kwargs for channels that need services.
agent/src/channels/manager.py:180
↓ 1 callers
Function
_build_checks
Turn the extracted claims into pass/fail reproduction gates. Every check is assembled purely from fields that were actually extracted; an uns
agent/src/tools/research_papers_tool.py:805
↓ 1 callers
Function
_build_client_version
Encode semantic version as 0x00MMNNPP (major/minor/patch in one uint32).
agent/src/channels/weixin.py:61
↓ 1 callers
Function
_build_constraint
(spec: Mapping[str, Any])
agent/backtest/constraints.py:138
↓ 1 callers
Method
_build_context
Build context dict for ``_calc_weights``. Default: covariance only. Override to add means, vols, etc. Return None to skip the date.
agent/backtest/optimizers/base.py:117
↓ 1 callers
Function
_build_dead_cards
(entry: dict[str, Any])
agent/scripts/w4a_patch_blog.py:157
↓ 1 callers
Function
_build_env
Create a Jinja2 environment with mandatory autoescape on.
wiki/scripts/build_alpha_library.py:354
↓ 1 callers
Function
_build_ephemeral
Construct a throwaway adapter instance to validate *section*. Mirrors ``ChannelManager._build_channel`` construction. Raises the frozen 422 `
agent/src/api/channels_config_routes.py:346
↓ 1 callers
Function
_build_filter
Compose the Eastmoney ``filter`` clause for the query. Args: code: Bare 6-digit code, or ``None`` for a market-wide calendar. sta
agent/src/tools/lockup_expiry_tool.py:93
↓ 1 callers
Function
_build_frontend_cmd
Return the ordered list of subprocess invocations needed to build the frontend. On Windows we explicitly pin ``--package=typescript`` / ``--packa
agent/cli/_legacy.py:6365
↓ 1 callers
Function
_build_history_from_trace
Build conversation history from trace.jsonl.
agent/cli/_legacy.py:1588
↓ 1 callers
Method
_build_image_segment
(self, ref: str)
agent/src/channels/napcat.py:465
↓ 1 callers
Method
_build_inbound_metadata
Build metadata for inbound Discord messages.
agent/src/channels/discord.py:750
← previous
next →
5,301–5,400 of 26,887, ranked by callers