Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/HKUDS/Vibe-Trading
/ functions
Functions
8,953 in github.com/HKUDS/Vibe-Trading
⨍
Functions
8,953
◇
Types & classes
1,150
↳
Endpoints
64
↓ 754 callers
Method
get
Retrieve a tool by name.
agent/src/agent/tools.py:64
↓ 266 callers
Function
safe_div
Safe division: ``a / (b + eps * sign(b))``. Where ``b == 0`` exactly (or NaN), result is NaN — never silently inf or 0.
agent/src/factors/base.py:305
↓ 244 callers
Method
execute
(self, *args, **kwargs)
agent/tests/test_qveris_tool.py:125
↓ 162 callers
Function
set
(id, value)
wiki/main.js:131
↓ 155 callers
Method
get
(self, tool_name: str)
agent/tests/test_tool_timeout.py:18
↓ 143 callers
Function
rank
Cross-sectional percentile rank per row (axis=1, ties=average, pct=True). NaN inputs stay NaN. An all-NaN row returns an all-NaN row.
agent/src/factors/base.py:61
↓ 135 callers
Function
ts_mean
Rolling mean per column, warmup → NaN.
agent/src/factors/base.py:178
↓ 134 callers
Method
split
(_line: str)
agent/src/channels/feishu.py:1069
↓ 119 callers
Function
ts_corr
Rolling Pearson correlation per column, min_periods=n. Constant series in the window → NaN (no silent zero). Pairs are inner-joined on column
agent/src/factors/base.py:146
↓ 116 callers
Method
get
Return ``(crumb, cookies)``, fetching them on first use or on refresh. Args: force_refresh: Discard any cached crumb/cookies and
agent/backtest/loaders/yahoo_client.py:104
↓ 106 callers
Method
json
(self)
agent/tests/test_cli_runtime.py:97
↓ 104 callers
Method
get
Return a job by id, or ``None`` when it does not exist. Args: job_id: Job identifier. Returns: The matching
agent/src/scheduled_research/store.py:154
↓ 100 callers
Method
update
Update an existing hypothesis. Args: hypothesis_id: Registry identifier. title: Optional replacement title.
agent/src/hypotheses/registry.py:214
↓ 98 callers
Method
add
Save a new memory entry and update the index. Args: name: Memory name (used as filename slug). Empty or whitespace-
agent/src/memory/persistent.py:265
↓ 94 callers
Function
get_env_config
Return the cached :class:`EnvConfig` singleton, creating it on first access. Thread-safe: acquires a lock before checking / creating the instance
agent/src/config/accessor.py:46
↓ 79 callers
Function
delta
First difference at lag ``d``: ``df - df.shift(d)``. Lookahead ban: ``d >= 1`` strictly. Negative lag forbidden.
agent/src/factors/base.py:254
↓ 75 callers
Method
run
(self, **__)
agent/tests/test_cli_live.py:613
↓ 75 callers
Method
sleep
(self, seconds)
agent/tests/test_ibkr_local.py:82
↓ 74 callers
Method
execute
Run entry script and collect logs and artifacts. Args: entry_script: Entry script path. run_dir: Current run director
agent/src/core/runner.py:305
↓ 72 callers
Method
fetch
(self, codes, start_date, end_date)
agent/tests/test_run_card.py:279
↓ 62 callers
Function
ts_rank
Rolling rank (last value's rank within the n-window), per column. Warmup (first ``n-1`` rows per column) returns NaN. Result is a percentile
agent/src/factors/base.py:92
↓ 53 callers
Function
build_registry
Build the tool registry via auto-discovery, optionally enriched with MCP tools. Local tools are discovered and registered first. When ``agent_con
agent/src/tools/__init__.py:66
↓ 48 callers
Method
can_execute
(self, symbol, direction, bar)
agent/tests/test_equity_regression.py:15
↓ 47 callers
Method
get
(self, alpha_id: str)
agent/src/factors/registry.py:282
↓ 44 callers
Function
decay_linear
Linear decay-weighted moving average, weights ``n, n-1, ..., 1`` normalized. Warmup (first ``n-1`` rows) → NaN. Uses numpy ``sliding_window_
agent/src/factors/base.py:264
↓ 44 callers
Function
ts_min
Rolling min per column, warmup → NaN.
agent/src/factors/base.py:199
↓ 42 callers
Function
ts_std
Rolling sample std (ddof=1) per column, warmup → NaN.
agent/src/factors/base.py:185
↓ 41 callers
Function
ts_max
Rolling max per column, warmup → NaN.
agent/src/factors/base.py:192
↓ 38 callers
Function
_get_registry
()
agent/mcp_server.py:97
↓ 35 callers
Method
replace_goal
Supersede the current goal and create a new active goal. Args: session_id: Owning session id. objective: Research obj
agent/src/goal/store.py:257
↓ 35 callers
Method
search
Call ``POST /search``.
agent/src/tools/qveris_tool.py:264
↓ 33 callers
Method
clear
Clear the buffered events for a session. Args: session_id: Session ID.
agent/src/session/events.py:232
↓ 27 callers
Method
cancel
Cancel the current loop. Sets a thread-safe flag polled at every iteration boundary, per LLM stream chunk, and between tool batches,
agent/src/agent/loop.py:554
↓ 27 callers
Function
cn
(...inputs: ClassValue[])
frontend/src/lib/utils.ts:4
↓ 27 callers
Method
fetch
Fetch crypto OHLCV via OKX public API. Args: codes: Symbols like ``["BTC-USDT", "ETH-USDT"]``. start_date: Start date
agent/backtest/loaders/okx.py:53
↓ 27 callers
Function
load_agent_config
Load structured agent config from disk with safe fallback. Args: config_path: Optional explicit config path. When omitted, the default
agent/src/config/loader.py:28
↓ 27 callers
Method
raise_for_status
(self)
agent/tests/test_cli_runtime.py:94
↓ 27 callers
Method
upsert
Insert or replace a job by id. Validates the schedule string before persisting. Args: job: The job to store. Ra
agent/src/scheduled_research/store.py:137
↓ 26 callers
Function
_make_engine
(**overrides)
agent/tests/test_china_futures_engine.py:56
↓ 25 callers
Method
create_run
Create the directory structure for a new run and write initial state. Args: run: SwarmRun instance. Returns:
agent/src/swarm/store.py:157
↓ 25 callers
Function
extract_shadow_profile
Extract a ShadowProfile from a broker journal file. Args: journal_path: CSV/Excel exported from a supported broker. min_support:
agent/src/shadow_account/extractor.py:64
↓ 25 callers
Method
load_run
Load the state for a given run. Args: run_id: Run identifier. Returns: SwarmRun instance, or None if not fou
agent/src/swarm/store.py:177
↓ 25 callers
Method
round_size
(self, raw_size, price)
agent/tests/test_equity_regression.py:18
↓ 25 callers
Function
validate_date_range
Validate that start_date <= end_date. Args: start_date: Start date string (YYYY-MM-DD). end_date: End date string (YYYY-MM-DD).
agent/backtest/loaders/base.py:31
↓ 24 callers
Function
_frame
(rows: list[list[float]], dates: int | None = None)
agent/tests/factors/test_base.py:32
↓ 24 callers
Method
_handle_message
Handle an incoming message: check permissions, issue pairing codes in DMs, or forward to bus.
agent/src/channels/base.py:179
↓ 24 callers
Method
find
Resolve a memory by exact title, then by on-disk filename stem. Stem fallback accepts both the full ``{type}_{slug}`` form and the ba
agent/src/memory/persistent.py:209
↓ 24 callers
Method
is_available
(self)
agent/tests/test_registry.py:87
↓ 23 callers
Function
_make_engine
(**overrides)
agent/tests/test_china_a_engine.py:50
↓ 23 callers
Function
_reload_base_with_bottleneck
Reload base.py with bottleneck enabled or disabled.
agent/tests/test_factor_operators.py:21
↓ 23 callers
Method
calc_commission
(self, size, price, direction, is_open)
agent/tests/test_equity_regression.py:21
↓ 23 callers
Method
close
Close the file handle.
agent/src/agent/trace.py:155
↓ 22 callers
Function
_make_engine
(**overrides)
agent/tests/test_crypto_engine.py:37
↓ 22 callers
Function
_make_engine
(**overrides)
agent/tests/test_forex_engine.py:38
↓ 22 callers
Method
_parse_response
Convert a LangChain AIMessage (or AIMessageChunk) to ``LLMResponse``. Single source for reasoning: ``additional_kwargs["reasoning_content"]``
agent/src/providers/chat.py:340
↓ 22 callers
Function
_store
(tmp_path: Path)
agent/tests/test_goal_store.py:21
↓ 22 callers
Function
get_console
Return the shared console instance. Returns: The single :class:`Console` everyone in ``agent/cli`` writes to.
agent/cli/theme.py:191
↓ 22 callers
Function
load_mandate
Load the committed mandate for ``broker`` from the protected store. Reads ``<runtime_root>/live/<broker>/mandate.json`` (written 0600 by the
agent/src/live/mandate/store.py:42
↓ 22 callers
Method
read
Read trace.jsonl records. Args: dir_path: Directory containing ``trace.jsonl``. resolve_offloads: Whether to read sid
agent/src/agent/trace.py:185
↓ 21 callers
Function
cached_loader_fetch
Fetch one DataFrame through the opt-in local cache. Convenience wrapper over :func:`loader_cache_get` / :func:`loader_cache_put` for the comm
agent/backtest/loaders/base.py:366
↓ 21 callers
Method
get_goal_snapshot
Return a JSON-safe goal snapshot.
agent/src/goal/store.py:583
↓ 20 callers
Function
_make_engine
(**overrides)
agent/tests/test_global_futures_engine.py:47
↓ 20 callers
Function
_run_visitor
Parse *source*, run the visitor, return (violations, warnings).
tools/test_ci_env_var_gate.py:32
↓ 20 callers
Method
done
(self)
agent/tests/test_api_live_runtime.py:199
↓ 20 callers
Method
run_dir
Return the directory path for a given run. Args: run_id: Run identifier. Returns: Path to the run directory.
agent/src/swarm/store.py:133
↓ 20 callers
Function
vwap
Market-aware VWAP-equivalent reference price. - ``equity_cn``: ``(amount * 1000) / (volume * 100 + 1)`` — Tushare's ``daily.amount`` is in
agent/src/factors/base.py:320
↓ 19 callers
Function
_local_client
Return a TestClient that simulates a loopback caller.
agent/tests/test_security_auth_api.py:19
↓ 19 callers
Function
build_mcp_tool_wrappers
Build local tool wrappers for a configured MCP server. Args: server_name: Logical server name from config. server_config: Validat
agent/src/tools/mcp.py:110
↓ 18 callers
Function
get_runtime_root
Return the runtime root directory for user-level agent state. Args: config_path: Optional explicit config file path. When provided, the
agent/src/config/paths.py:10
↓ 18 callers
Method
is_allowed
Check sender permission: star > allowlist > pairing store > deny.
agent/src/channels/base.py:165
↓ 18 callers
Method
list_criteria
Return criteria for a goal.
agent/src/goal/store.py:477
↓ 18 callers
Method
on_bar
Per-bar market-rule hook (funding fees, liquidation, etc.). Default: no-op. Override in subclass as needed.
agent/backtest/engines/base.py:331
↓ 18 callers
Function
ts_argmax
Rolling argmax (0-based index into the window), warmup → NaN. Uses ``bottleneck.move_argmax`` when available (~350x faster). Correction: ``bn
agent/src/factors/base.py:220
↓ 17 callers
Function
_base_run
(run_id: str = "r", *, timeout: int = 300, retries: int = 0)
agent/tests/test_swarm_status_hydration.py:45
↓ 17 callers
Function
_build_runner
Build a runner wired entirely to the tracker stubs, with overrides.
agent/tests/test_runtime_runner.py:145
↓ 17 callers
Method
apply_slippage
(self, price, direction)
agent/tests/test_equity_regression.py:24
↓ 17 callers
Function
broker_dir
Return the per-broker state directory under the live root. Args: broker: Broker key, e.g. ``"robinhood"``. Normalized to lower-case and
agent/src/live/paths.py:33
↓ 17 callers
Method
run
Run the ReAct loop synchronously. Args: user_message: User message. history: Prior conversation messages.
agent/src/agent/loop.py:563
↓ 17 callers
Function
validate_schedule
Raise ``ValueError`` when *schedule* is malformed. Args: schedule: Either a positive integer string (interval-ms) or a simpli
agent/src/scheduled_research/models.py:35
↓ 16 callers
Function
_seed
Populate a tmp memory dir with one entry per type.
agent/tests/test_cli_memory.py:14
↓ 16 callers
Method
append_evidence
Append traceable evidence after stale-goal validation. Args: session_id: Owning session id. goal_id: Goal being mutat
agent/src/goal/store.py:598
↓ 16 callers
Method
create
Create and persist a new hypothesis. Args: title: Short hypothesis title. thesis: Research thesis or rationale.
agent/src/hypotheses/registry.py:158
↓ 16 callers
Function
get_media_dir
Return a media directory for *channel_name* under the VT uploads root. Inbound media must land inside ``~/.vibe-trading/uploads`` — one of the
agent/src/channels/utils.py:16
↓ 16 callers
Method
search
(self, query, *, limit)
agent/tests/test_qveris_routes.py:99
↓ 16 callers
Function
ts_argmin
Rolling argmin (0-based index into the window), warmup → NaN. Uses ``bottleneck.move_argmin`` when available (~350x faster). Correction: ``bn
agent/src/factors/base.py:237
↓ 16 callers
Method
write
Write a trace record. Args: entry: Trace entry; a ``ts`` field is added automatically.
agent/src/agent/trace.py:77
↓ 16 callers
Function
write_live_action
Fan a redacted live-action record out to up to three sinks (SPEC §5). The record is redacted via :func:`src.tools.redaction.redact_payload` FIRST
agent/src/live/audit.py:182
↓ 15 callers
Function
_engine
(**overrides)
agent/tests/test_india_equity_engine.py:23
↓ 15 callers
Function
_make_bar
Build a minimal bar Series for testing.
agent/tests/test_china_a_engine.py:32
↓ 15 callers
Method
addEventListener
(type: string, handler: ESHandler)
frontend/src/hooks/__tests__/useSSE.test.ts:19
↓ 15 callers
Function
classify_tool
Classify one remote tool via the 3-tier precedence ladder. The curated map is authoritative: when it names the tool, its class is returned re
agent/src/live/classification.py:52
↓ 15 callers
Function
commit_mandate
Write a mandate — the ONLY code path that activates live-trading authority. Re-validates that ``proposal_id`` is live and that the resolved profi
agent/src/live/mandate/commit.py:312
↓ 15 callers
Method
emit
Build and publish an event in one step. Args: session_id: Session ID. event_type: Event type. data: Event
agent/src/session/events.py:127
↓ 15 callers
Method
get_current_snapshot
Return the current goal plus ledger rows for a session.
agent/src/goal/store.py:575
↓ 15 callers
Method
place_order
(self, config, **kwargs)
agent/tests/test_sdk_order_gate.py:257
↓ 14 callers
Function
_align
Build aligned date index, close matrix, target-position matrix, return matrix. Signal is shifted by 1 bar (next-bar-open semantics) then normalis
agent/backtest/engines/base.py:78
↓ 14 callers
Function
_build_args
Build a Namespace pre-populated with sane defaults that ``_registry`` and handlers expect to read.
agent/tests/test_cli_hypothesis.py:47
↓ 14 callers
Function
_make_bar
(close: float = 60000.0, open_: float | None = None)
agent/tests/test_crypto_engine.py:33
↓ 14 callers
Function
dispatch
Dispatch ``alpha <sub>`` to the matching handler. Returns the exit code; ``cli.py`` propagates it via ``_coerce_exit_code``.
agent/src/factors/cli_handlers.py:966
↓ 14 callers
Function
halt_flag_set
Return whether live trading is halted — a pure filesystem check. This is the authoritative kill-switch check the enforcement gate calls before
agent/src/live/halt.py:135
next →
1–100 of 8,953, ranked by callers