Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/HKUDS/Vibe-Trading
/ functions
Functions
15,301 in github.com/HKUDS/Vibe-Trading
⨍
Functions
15,301
◇
Types & classes
1,852
↳
Endpoints
104
↓ 940 callers
Method
get
Retrieve a tool by name.
agent/src/agent/tools.py:64
↓ 445 callers
Method
execute
(self, *args, **kwargs)
agent/tests/test_qveris_tool.py:146
↓ 346 callers
Method
get
(self, tool_name: str)
agent/tests/test_tool_timeout.py:18
↓ 299 callers
Function
set
(id, value)
wiki/main.js:131
↓ 297 callers
Method
read_text
(self, filename: str)
agent/tests/test_cli_update.py:96
↓ 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:306
↓ 204 callers
Method
split
(_line: str)
agent/src/channels/feishu.py:1069
↓ 192 callers
Method
json
(self)
agent/tests/test_cli_runtime.py:97
↓ 168 callers
Method
update
Update an existing hypothesis. Args: hypothesis_id: Registry identifier. title: Optional replacement title.
agent/src/hypotheses/registry.py:214
↓ 154 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:108
↓ 151 callers
Method
run
(self, **__)
agent/tests/test_cli_live.py:637
↓ 148 callers
Method
add
Save a new memory entry and update the index.
agent/src/memory/persistent.py:475
↓ 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:62
↓ 135 callers
Function
ts_mean
Rolling mean per column, warmup → NaN.
agent/src/factors/base.py:179
↓ 130 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:52
↓ 123 callers
Method
fetch
(self, codes, start_date, end_date, fields=None, interval="1D")
agent/tests/test_risk_xray.py:360
↓ 119 callers
Method
now
(cls, tz: dt.tzinfo | None = None)
agent/tests/test_mcp_alpha_zoo_contract.py:211
↓ 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:147
↓ 117 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:168
↓ 98 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:503
↓ 91 callers
Method
map
Translate one Vibe-Trading event into ``openbb_ai`` SSE objects. Args: event_type: The session-bus event type. data:
agent/src/openbb_bridge/event_mapper.py:50
↓ 90 callers
Method
sleep
(self, seconds)
agent/tests/test_ibkr_local.py:82
↓ 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:255
↓ 70 callers
Method
get
Return a cached entry if fresh, else ``None``.
agent/src/api/live_routes.py:197
↓ 69 callers
Function
reset_env_config
Clear the cached :class:`EnvConfig` singleton. Acquires the same lock used by :func:`get_env_config` so the reset is atomic with respect to c
agent/src/config/accessor.py:79
↓ 68 callers
Method
can_execute
(self, symbol, direction, bar)
agent/tests/test_risk_xray.py:335
↓ 62 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
↓ 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:93
↓ 59 callers
Function
make_series
Build a series from ``(date, amount, kind)`` triples.
agent/tests/quantlib/test_fundmath.py:67
↓ 55 callers
Method
validate_final_answer
Validate identity assertions and numeric price claims. Args: content: Candidate assistant answer. Returns: A
agent/src/agent/grounding.py:974
↓ 52 callers
Function
_run
Execute the tool and decode its JSON return value.
agent/tests/test_prediction_market_tool.py:163
↓ 51 callers
Function
_install
Patch the tool's HTTP entry point with a routing stub.
agent/tests/test_prediction_market_tool.py:156
↓ 51 callers
Method
filter
Select flows by kind. Args: kind: A single kind label or an iterable of labels. Labels are normalized, so ``"Capi
agent/src/entities/cashflow.py:350
↓ 47 callers
Method
get
(self, alpha_id: str)
agent/src/factors/registry.py:282
↓ 46 callers
Method
search
Call ``POST /search``.
agent/src/tools/qveris_tool.py:293
↓ 44 callers
Method
close
Close the file handle.
agent/src/agent/trace.py:181
↓ 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:265
↓ 44 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:131
↓ 44 callers
Function
ts_min
Rolling min per column, warmup → NaN.
agent/src/factors/base.py:200
↓ 43 callers
Function
ts_std
Rolling sample std (ddof=1) per column, warmup → NaN.
agent/src/factors/base.py:186
↓ 42 callers
Function
_get_registry
()
agent/mcp_server.py:330
↓ 42 callers
Function
_make_artifact
( *, name: str = "test_factor", universe: str = "CSI300", artifact_type: ArtifactType = Artifa
agent/tests/test_strategy_store.py:49
↓ 42 callers
Method
parse
Keep raw-response ``parse()`` streams behind the same proxy.
agent/src/providers/llm.py:140
↓ 41 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:13
↓ 41 callers
Function
ts_max
Rolling max per column, warmup → NaN.
agent/src/factors/base.py:193
↓ 39 callers
Function
_write_csv
Write a fixture file and return its path.
agent/tests/test_entities_spine.py:41
↓ 38 callers
Function
bs_price
Price a European option with the Black-Scholes-Merton formula. Args: S: Underlying spot price. K: Strike price. T: Time t
agent/src/quantlib/options.py:161
↓ 38 callers
Method
find
Resolve a memory by exact title, then by on-disk filename stem.
agent/src/memory/persistent.py:313
↓ 37 callers
Method
model_dump
Expose the Pydantic method expected by LangChain's converter.
agent/src/providers/llm.py:92
↓ 37 callers
Method
write
Write a trace record, flushed and fsynced for crash safety. ``flush`` alone only moves bytes into the OS page cache; a host crash or
agent/src/agent/trace.py:92
↓ 36 callers
Function
get_playbook
Load a single playbook by slug. Args: slug: Playbook slug (its filename stem). directory: Search only this directory instead of t
agent/src/scheduled_research/playbooks.py:379
↓ 36 callers
Method
search
(self, query, *, limit=20, session_id=None)
agent/tests/test_qveris_mcp.py:107
↓ 35 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:149
↓ 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:261
↓ 35 callers
Method
set
(name: string, value: string | null)
desktop/electron/src/secure-credentials.ts:106
↓ 33 callers
Function
calc_metrics
Full set of performance metrics. Args: equity_curve: Equity time series (index=timestamp, values=equity). trades: Completed round
agent/backtest/metrics.py:458
↓ 33 callers
Method
raise_for_status
(self)
agent/tests/test_cli_runtime.py:94
↓ 32 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
↓ 31 callers
Method
clear
Clear the buffered events and notify subscribers for a session. Subscriber queues receive a ``session_cleared`` sentinel event so the
agent/src/session/events.py:236
↓ 31 callers
Method
is_available
(self)
agent/tests/test_ui_services.py:291
↓ 30 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:186
↓ 29 callers
Function
calc_bars_per_year
Number of bars per year for annualisation. Args: interval: Bar size (1m / 5m / 15m / 30m / 1H / 4H / 1D), case-insensitive li
agent/backtest/metrics.py:150
↓ 29 callers
Method
put
Store a sanitized copy (no ``config`` key, no secrets).
agent/src/api/live_routes.py:208
↓ 29 callers
Method
wait
Block until ``bucket`` is allowed to fire again, then record the slot. The *reserved fire time* — jitter included — is what gets stored, so t
agent/backtest/loaders/_http.py:73
↓ 28 callers
Method
calc_commission
(self, size, price, direction, is_open)
agent/tests/test_risk_xray.py:341
↓ 28 callers
Function
cn
(...inputs: ClassValue[])
frontend/src/lib/utils.ts:4
↓ 28 callers
Method
to_dict
Serialize the session to a dictionary. Returns: A JSON-serializable dictionary.
agent/src/session/models.py:167
↓ 28 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
↓ 28 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:113
↓ 27 callers
Function
_make_engine
(**overrides)
agent/tests/test_china_futures_engine.py:56
↓ 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:558
↓ 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
round_size
(self, raw_size, price)
agent/tests/test_risk_xray.py:338
↓ 26 callers
Function
_paper_config
(**extra: Any)
agent/tests/test_mt5_connector.py:209
↓ 26 callers
Function
_w
(**kwargs)
agent/tests/test_factor_costs.py:21
↓ 26 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:159
↓ 26 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
↓ 26 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:179
↓ 26 callers
Method
place_order
(self, config, **kwargs)
agent/tests/test_sdk_order_gate.py:285
↓ 26 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:303
↓ 25 callers
Function
_client
Build a TestClient with runtime root redirected under tmp_path.
agent/tests/test_longbridge_runtime.py:32
↓ 25 callers
Function
_engine
(**overrides)
agent/tests/test_korea_equity_engine.py:31
↓ 25 callers
Function
_info_table
Render an information-table XML document from row dicts. Issuer names are XML-escaped because real filings carry ampersands (``National Fire
agent/tests/test_institutional_holdings_tool.py:42
↓ 25 callers
Function
_make_engine
(**overrides)
agent/tests/test_crypto_engine.py:42
↓ 25 callers
Function
_response
Build a minimal stand-in for a ``requests.Response``. Args: text: Body used by the XML path. payload: Object returned by ``.json(
agent/tests/test_research_papers_tool.py:164
↓ 25 callers
Method
apply
(self, w: np.ndarray, codes: Sequence[str])
agent/backtest/constraints.py:60
↓ 25 callers
Method
build_config
(self, profile_config, overrides)
agent/tests/test_etoro_live_actions.py:23
↓ 25 callers
Function
load_cashflows
Load an irregular dated cash-flow file into a ``CashFlowSeries``. The file needs a date column and an amount column. Currency and kind may co
agent/src/entities/ingest.py:316
↓ 25 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
↓ 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
Function
_open_market
An unsettled binary market as gamma serializes it.
agent/tests/test_prediction_market_tool.py:31
↓ 24 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:426
↓ 24 callers
Function
_run
(**kwargs: Any)
agent/tests/test_orderbook_depth_tool.py:56
↓ 24 callers
Method
apply_slippage
(self, price, direction)
agent/tests/test_risk_xray.py:344
↓ 24 callers
Function
call
(tool, **kwargs)
agent/tests/test_quantlib_tool.py:23
↓ 24 callers
Method
ingest_tool_result
Consume the full untruncated tool result and persist its evidence. Args: tool_name: Executed tool name. arguments: Ex
agent/src/agent/grounding.py:939
↓ 24 callers
Method
request
( self, method: str, path: str, *, params: Mapping[str, Any] | None =
agent/src/trading/connectors/etoro/client.py:225
↓ 23 callers
Function
_assets
(n=200)
agent/tests/quantlib/test_factormodel.py:26
↓ 23 callers
Function
_install
Monkeypatch ``_fetch_raw_book`` to return ``book`` and record call args.
agent/tests/test_orderbook_depth_tool.py:44
next →
1–100 of 15,301, ranked by callers