Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/HKUDS/Vibe-Trading
/ functions
Functions
16,853 in github.com/HKUDS/Vibe-Trading
⨍
Functions
16,853
◇
Types & classes
2,089
↳
Endpoints
112
↓ 8 callers
Function
_parse_candles
Convert a TickerAll candles body into an ascending OHLCV frame, trimmed to the window. Args: payload: Decoded JSON body (a list, or ``{ca
agent/backtest/loaders/tickerall_loader.py:397
↓ 8 callers
Function
_parse_period
Return (start_date, end_date) as YYYY-MM-DD strings.
agent/src/tools/alpha_bench_tool.py:80
↓ 8 callers
Function
_patch_ddgs
(monkeypatch, text_impl)
agent/tests/test_web_search_tool.py:36
↓ 8 callers
Function
_patch_gate
(monkeypatch, *, mandate, halted=False)
agent/tests/test_etoro_live_actions.py:98
↓ 8 callers
Function
_price_frame
Build a tz-naive trade_date-indexed OHLCV frame like a loader returns.
agent/tests/test_shadow_account.py:965
↓ 8 callers
Function
_rejects_unc
Raise ValueError if `p` starts with a UNC share prefix.
agent/src/tools/path_utils.py:40
↓ 8 callers
Function
_request
(messages)
agent/tests/test_openbb_bridge/test_adapter.py:73
↓ 8 callers
Method
_request
Send a JSON request with spacing and 429 Retry-After handling.
agent/src/tools/qveris_tool.py:239
↓ 8 callers
Function
_resolve_console
Return the shared CLI console, or a caller-supplied override.
agent/cli/commands/chat.py:23
↓ 8 callers
Function
_run
(**kw)
agent/tests/test_options_pricing_degenerate.py:20
↓ 8 callers
Function
_run
( monkeypatch, tmp_path: Path, llm: _ScriptedChatLLM, event_callback=None, max_iterations:
agent/tests/test_swarm_worker_content_filter.py:64
↓ 8 callers
Function
_run
(capsys: pytest.CaptureFixture[str], args: argparse.Namespace)
agent/tests/factors/test_alpha_compare.py:172
↓ 8 callers
Method
_scan_entries
Scan all .md files (except MEMORY.md) and parse frontmatter.
agent/src/memory/persistent.py:226
↓ 8 callers
Function
_schedule
(symbol: str = "BTC-USDT-PERP", version: str = "abc123", coefficient: float | None = None)
agent/tests/test_perpetual_risk.py:31
↓ 8 callers
Function
_seed_state
Write a durable last-known runtime_state.json for ``broker`` directly.
agent/tests/test_runtime_reconcile.py:52
↓ 8 callers
Function
_trading_dates
(count: int, start: str = "2024-01-01")
agent/tests/test_attribution_api.py:41
↓ 8 callers
Function
_unsupported_etoro
(profile: TradingProfile, capability: str)
agent/src/trading/service.py:551
↓ 8 callers
Function
_write_csv
(path: Path, header: List[str], rows: List[List[Any]])
agent/tests/test_attribution_api.py:33
↓ 8 callers
Function
_write_md
Write a dummy .md file with basic frontmatter.
agent/tests/memory/test_hierarchy.py:17
↓ 8 callers
Function
agent_artifact_dir
Return the canonical artifacts directory for one agent within a run. The single source of truth for this path — shared with the retry loop in
agent/src/swarm/worker.py:341
↓ 8 callers
Function
analyze_trade_journal
Parse a trade journal and return a JSON analysis. Args: file_path: Path to CSV/Excel file. analysis_type: "full" | "profile" | "b
agent/src/tools/trade_journal_tool.py:411
↓ 8 callers
Function
benjamini_hochberg
Control the false discovery rate across many simultaneous tests. Bonferroni controls the probability of *any* false positive and is far too s
agent/src/quantlib/multipletesting.py:375
↓ 8 callers
Function
carino_link
Link single-period Brinson results into a residual-free multi-period attribution. Every period's effects are scaled by ``k_t / k`` and summed. Be
agent/src/quantlib/attribution.py:347
↓ 8 callers
Function
cmd_live_authorize
Bootstrap the OAuth handshake for a live broker channel (desktop only). Builds the broker's MCP tool wrappers, which forces a connection and — wh
agent/cli/_legacy.py:3409
↓ 8 callers
Function
cmd_live_status
Show auth state, active mandate, and halt state for live channels. Read-only: it loads the mandate via :func:`src.live.mandate.store.load_mandate
agent/cli/_legacy.py:3598
↓ 8 callers
Function
compute_importance
Compute importance via Ebbinghaus-inspired decay formula.
agent/src/memory/persistent.py:80
↓ 8 callers
Method
create
(self, *args: Any, **kwargs: Any)
agent/src/providers/llm.py:185
↓ 8 callers
Function
cross_sectional_factor_returns
Regress one date's asset returns on their exposures. The coefficients are that date's factor returns. Weighting is by square-root market cap
agent/src/quantlib/factormodel.py:298
↓ 8 callers
Function
estimate_tokens
Rough token count estimate (~4 chars/token). Args: messages: Message list. Returns: Estimated token count.
agent/src/agent/loop.py:238
↓ 8 callers
Function
fixed_slippage
Apply a constant basis-point slippage to a fill price. The cheapest model, and adequate whenever the order is small enough that it does not m
agent/src/quantlib/impact.py:150
↓ 8 callers
Function
format_grounding_block
Render *grounding* as a markdown block ready to splice into a prompt. Returns the empty string if no symbol has any data — callers can use th
agent/src/swarm/grounding.py:231
↓ 8 callers
Method
get_artifact
(self, artifact_id)
agent/tests/test_strategy_discovery_facade.py:145
↓ 8 callers
Function
get_default_registry
Return a process-wide cached ``Registry`` for the bundled zoo. Thread-safe. First call builds and caches; subsequent calls return the same in
agent/src/factors/registry.py:435
↓ 8 callers
Method
get_session
Read a session. Args: session_id: Session ID. Returns: The Session instance, or None when it does not exist.
agent/src/session/store.py:79
↓ 8 callers
Function
hose_round_down
Quantize *price* down onto the HOSE tick grid.
agent/backtest/engines/vietnam_equity.py:111
↓ 8 callers
Method
is_duplicate
Check if a memory with similar content was recently written. Uses a 30-second sliding window to catch rapid-fire duplicates from retr
agent/src/memory/persistent.py:457
↓ 8 callers
Function
is_qveris_configured
Return whether QVeris paid routing should be visible.
agent/src/tools/qveris_tool.py:143
↓ 8 callers
Function
is_runner_alive
Report whether a runner's heartbeat is fresh enough to call it alive. Args: runner_id: The runner to check. now_ms: Reference tim
agent/src/live/runtime/liveness.py:127
↓ 8 callers
Function
kupiec_pof
Test whether the breach *count* matches the model's claimed level. The Kupiec proportion-of-failures test compares the realised breach rate a
agent/src/quantlib/var_backtest.py:329
↓ 8 callers
Method
list
Load all hypotheses from storage.
agent/src/hypotheses/registry.py:367
↓ 8 callers
Function
live_root
Return the root directory for all live-channel state. Returns: ``<runtime_root>/live``. The directory is NOT created here; callers
agent/src/live/paths.py:23
↓ 8 callers
Function
main
CLI entrypoint returning a process exit code. Behaviour: * Interactive entry (no subcommand, or ``chat`` + TTY): show banner, run onbo
agent/cli/main.py:1325
↓ 8 callers
Method
market
Build a market-session trigger for a known market key. Args: market: A key into :data:`MARKET_SPECS` (e.g. ``"us_equity"``).
agent/src/live/runtime/triggers.py:178
↓ 8 callers
Function
monte_carlo_gbm
Simulate price paths under geometric Brownian motion. Each step applies ``(mu - 0.5 * sigma**2) * dt + sigma * sqrt(dt) * Z`` in log space, s
agent/src/quantlib/risk.py:329
↓ 8 callers
Function
parametric_var
Value at Risk under a fitted normal distribution. Cheap and smooth, but it sees only a mean and a variance, so it misses fat tails. The direc
agent/src/quantlib/risk.py:176
↓ 8 callers
Function
parse_verdict_section
Parse the ``## Verdict`` tail of a terminal briefing. Returns: ``(parse_state, items)``. ``no_verdict_section`` when no such heading
agent/src/scheduled_research/verdict.py:103
↓ 8 callers
Function
preferred_return_amount
Preferred return owed to LPs, accrued per contribution from its own date. Accruing each draw separately matters: a fund that called half its capi
agent/src/quantlib/fundmath.py:922
↓ 8 callers
Method
query_events
(self, codes: Iterable[str], *, as_of, feeds=None, scorer=None)
agent/tests/test_rsshub_events_lookahead.py:28
↓ 8 callers
Method
record_bench
Record a bench result. Returns the result ID.
agent/src/strategy_store/store.py:115
↓ 8 callers
Function
redact_tool_result
Redact one tool result for trace persistence and event previews. The single choke point for a tool-result string: callers redact once and han
agent/src/tools/redaction.py:452
↓ 8 callers
Method
render
(self)
agent/cli/ui/rail.py:437
↓ 8 callers
Function
render_signal_engine
Render the SignalEngine Python source for a profile. Args: profile: ShadowProfile carrying the rules to replay. Returns: Pyt
agent/src/shadow_account/codegen.py:97
↓ 8 callers
Method
replay
Replay buffered session events for reconnect recovery. Args: session_id: Session ID. last_event_id: Last event ID rec
agent/src/session/events.py:190
↓ 8 callers
Function
resolve_secid
Map a Vibe-Trading symbol to its Eastmoney secid. Supported suffixes: ``.SH`` / ``.SZ`` / ``.BJ`` (A-share), ``.HK`` (Hong Kong, code zero-pa
agent/backtest/loaders/eastmoney_client.py:208
↓ 8 callers
Method
run_loop
(self)
agent/tests/test_security_auth_api.py:353
↓ 8 callers
Function
run_pattern
Run chart pattern detection on OHLCV data in run_dir. Args: run_dir: Path to the run directory. patterns: Comma-separated pattern
agent/src/tools/pattern_tool.py:323
↓ 8 callers
Function
scale
Per-row L1 normalize so sum of absolute values equals ``a``. Rows whose abs-sum is 0 (or all-NaN) become NaN — never silent zero.
agent/src/factors/base.py:82
↓ 8 callers
Function
scenario
()
agent/tests/test_session_service_lifecycle.py:61
↓ 8 callers
Method
should_transition
Determine if a status transition should occur. Args: current_status: Current artifact status. consecutive_signals: Re
agent/src/strategy_store/decay.py:161
↓ 8 callers
Function
split_sections
Map a markdown document to its heading structure. A section runs from its heading to the next heading of the same or shallower level, so aski
agent/src/agent/skills.py:229
↓ 8 callers
Method
total
Sum the signed amounts. Valuation marks such as NAV are excluded by default: adding a mark to settled cash would overstate what was a
agent/src/entities/cashflow.py:403
↓ 8 callers
Function
translate_cashflows
Convert flows in one or more currencies into ``rate_table``'s currency. Each flow is converted using the FX rate quoted on **that flow's own
agent/src/entities/cashflow.py:684
↓ 8 callers
Method
update_run
Atomically update run state. Args: run: Updated SwarmRun instance. Raises: FileNotFoundError: If the run dir
agent/src/swarm/store.py:205
↓ 8 callers
Function
write_heartbeat
Atomically record a runner's last-tick timestamp. Args: runner_id: The runner writing its heartbeat. now_ms: Timestamp to record,
agent/src/live/runtime/liveness.py:79
↓ 7 callers
Function
_amended_cover
Render a cover page that declares an amendment, exactly as EDGAR nests it. Copied from DZ BANK's live 2020-09-30 amendments: ``isAmendment`` and
agent/tests/test_institutional_holdings_tool.py:108
↓ 7 callers
Function
_bars
Create a dated OHLCV frame ending on the scanner target date.
agent/tests/test_shadow_scanner.py:41
↓ 7 callers
Function
_body
Build a minimal FMP historical-price-full body.
agent/tests/test_fmp_loader.py:16
↓ 7 callers
Function
_bridge
(**overrides)
agent/tests/quantlib/valuation/test_dcf.py:719
↓ 7 callers
Method
_calc_pnl
Realised PnL for a closed position.
agent/backtest/engines/base.py:633
↓ 7 callers
Method
_calc_weights
Equal risk contribution weights.
agent/backtest/optimizers/risk_parity.py:14
↓ 7 callers
Method
_calc_weights
(self, ctx: dict[str, np.ndarray])
agent/tests/test_optimizer_causality.py:26
↓ 7 callers
Function
_call
(obj: Any, name: str, *args: Any, **kwargs: Any)
agent/src/trading/connectors/longbridge/sdk.py:878
↓ 7 callers
Function
_call
(monkeypatch, n, **kw)
agent/tests/test_get_market_data_size.py:37
↓ 7 callers
Method
_channel_key
Normalize channel-like objects and ids to a stable string key.
agent/src/channels/discord.py:351
↓ 7 callers
Function
_check
(intent: OrderIntent, mandate: Mandate, *, positions=None, daily_count=0)
agent/tests/test_mandate_enforcement.py:171
↓ 7 callers
Function
_client
(tmp_path: Path, monkeypatch)
agent/tests/test_goal_api.py:14
↓ 7 callers
Function
_compute_rsi
Relative Strength Index (Wilder smoothing) over *period* bars. Matches the Wilder-EWM convention already used for RSI elsewhere in this codeb
agent/src/tools/technical_indicator_tool.py:104
↓ 7 callers
Method
_connect
Yield one short-lived connection; commit on success, rollback on error.
agent/src/strategy_discovery/evidence_store.py:218
↓ 7 callers
Function
_contribution
Wrap one client contribution of ``size`` in a series. The amount is negated because ``CashFlow`` is holder-perspective: money the client pays
agent/tests/quantlib/test_performance.py:70
↓ 7 callers
Method
_convert_chunk_to_generation_chunk
( # type: ignore[override] self, chunk: dict, default_chunk_class: type,
agent/src/providers/llm.py:545
↓ 7 callers
Function
_detail
(status, artifact_id)
agent/tests/test_sdm_governance_wiring.py:38
↓ 7 callers
Method
_dispatch
(self, argv: list[str])
agent/tests/test_cli_live.py:95
↓ 7 callers
Function
_eastmoney_payload
A suggest payload spanning A-share, HK, and US markets.
agent/tests/test_symbol_search_tool.py:16
↓ 7 callers
Method
_env
Return a minimal Anthropic environment with optional overrides.
agent/tests/test_llm_reasoning_effort.py:354
↓ 7 callers
Function
_err
(msg: str)
agent/src/tools/doc_reader_tool.py:76
↓ 7 callers
Function
_estimate_tokens
Return token usage for a single LLM call, real if available. Prefers the provider-reported counts attached to the response by :func:`ChatLLM.
agent/src/swarm/worker.py:131
↓ 7 callers
Function
_exchange
Build a ccxt ``binance`` client bound to the configured environment.
agent/src/trading/connectors/binance/sdk.py:628
↓ 7 callers
Function
_execute_data_result
Execute one fake MCP tool with a parsed FastMCP result.
agent/tests/test_mcp_client_adapter.py:310
↓ 7 callers
Function
_existing_uploads
(uploads_dir: Path)
agent/tests/test_upload_api.py:27
↓ 7 callers
Function
_extract_data
Return the ``data`` list from an OKX response, or ``[]`` defensively. python-okx returns a dict shaped ``{"code": "0", "data": [...]}`` on succes
agent/src/trading/connectors/okx/sdk.py:658
↓ 7 callers
Function
_factors
(values)
agent/tests/test_alpha_bench_qfq.py:38
↓ 7 callers
Function
_fake_response
(payload: dict, status_ok: bool = True)
agent/tests/test_research_reports_tool.py:64
↓ 7 callers
Function
_first
(obj: Any, names: tuple[str, ...], default: Any = None)
agent/src/trading/connectors/longbridge/sdk.py:762
↓ 7 callers
Function
_fixture
Return the hand-built four-sector single-period attribution. Returns: The :class:`BrinsonResult` for the module-level fixture.
agent/tests/quantlib/test_attribution.py:34
↓ 7 callers
Function
_float_or_none
Convert a Longbridge SDK numeric value (Decimal/int) to float for JSON serialization.
agent/src/trading/connectors/longbridge/sdk.py:770
↓ 7 callers
Function
_get
Perform a read-only GET request against the Trading 212 REST API.
agent/src/trading/connectors/trading212/sdk.py:393
↓ 7 callers
Method
_get_conn
Get or create the SQLite connection (WAL mode).
agent/src/session/search.py:80
↓ 7 callers
Function
_guarded_probe_app
(allowed_hosts)
agent/tests/test_mcp_host_origin_guard.py:137
↓ 7 callers
Function
_import_mcp_server
Import ``agent/mcp_server.py`` without executing ``main()``. Returns: The imported mcp_server module.
agent/tests/test_mcp_new_tools.py:58
↓ 7 callers
Function
_install_fake_ib
(monkeypatch: pytest.MonkeyPatch, ib_cls)
agent/tests/test_ibkr_local.py:357
← previous
next →
601–700 of 16,853, ranked by callers