MCPcopy Create free account

hub / github.com/HKUDS/Vibe-Trading / functions

Functions8,953 in github.com/HKUDS/Vibe-Trading

↓ 9 callersFunction_obj_get
(obj: Any, name: str, default: Any = None)
agent/src/trading/connectors/ibkr/local.py:502
↓ 9 callersFunction_patch_gate
(monkeypatch, *, mandate, halted=False)
agent/tests/test_sdk_order_gate.py:77
↓ 9 callersFunction_profile
Build a minimal ShadowProfile for scanner tests.
agent/tests/test_shadow_scanner.py:14
↓ 9 callersFunction_provider
(payload: str = _RSS)
agent/tests/test_rsshub_events_provider.py:68
↓ 9 callersFunction_readers
Build the three injected READ callables from fabricated snapshots.
agent/tests/test_runtime_reconcile.py:36
↓ 9 callersFunction_remote_client
Return a TestClient that simulates a non-loopback caller.
agent/tests/test_security_auth_api.py:14
↓ 9 callersFunction_reset_crumb
Clear the process-wide crumb cache so each test handshakes fresh.
agent/tests/test_yahoo_client.py:43
↓ 9 callersFunction_row
(**overrides: Any)
agent/tests/factors/test_bench_strict.py:123
↓ 9 callersFunction_rows_to_frame
Build the OHLCV frame from chart rows, clipped to the inclusive window. For daily-and-coarser intervals the DatetimeIndex is normalized to midnig
agent/backtest/loaders/yahoo_loader.py:108
↓ 9 callersFunction_run_dir
(base: Path)
agent/tests/test_autopilot_phase3.py:49
↓ 9 callersFunction_stub_panel
(monkeypatch: pytest.MonkeyPatch, n_rows: int = 80, n_cols: int = 8)
agent/tests/factors/test_bench_strict.py:203
↓ 9 callersFunction_to_yfinance_symbol
Convert project symbols into yfinance symbols. Args: code: Project symbol, for example ``AAPL.US`` or ``700.HK``. Returns: y
agent/backtest/loaders/yfinance_loader.py:42
↓ 9 callersMethodappend_event
Append an event to events.jsonl. Args: run_id: Run identifier. event: Event to append. Raises: F
agent/src/swarm/store.py:244
↓ 9 callersFunctionbuild_llm
Construct a ChatOpenAI instance. Args: model_name: Model name; defaults to LANGCHAIN_MODEL_NAME. callbacks: Optional LangChain ca
agent/src/providers/llm.py:570
↓ 9 callersFunctioncalc_bars_per_year
Number of bars per year for annualisation. Args: interval: Bar size (1m / 5m / 15m / 30m / 1H / 4H / 1D). source: Data source (tu
agent/backtest/metrics.py:34
↓ 9 callersFunctionemit_progress
Publish a structured progress event from a tool. Silently no-ops when called outside an active tool context (e.g. during unit tests that invo
agent/src/agent/progress.py:89
↓ 9 callersFunctionfind_peaks_valleys
Detect peaks and valleys in a price series. Args: close: Closing price series. window: Half-window size; effective window is 2*wi
agent/src/tools/pattern_tool.py:23
↓ 9 callersFunctionget_loader_cls_with_fallback
Return a loader *class* for *source*, falling back if unavailable. Args: source: Requested data source name. Returns: A Data
agent/backtest/loaders/registry.py:179
↓ 9 callersMethodindex_message
(self, session_id: str, role: str, content: str)
agent/tests/test_session_service_mcp.py:19
↓ 9 callersFunctionlast_tick
Return a runner's last recorded heartbeat timestamp. Args: runner_id: The runner to read. Returns: The last-tick timestamp i
agent/src/live/runtime/liveness.py:103
↓ 9 callersFunctionload_config
Load Binance settings from ``~/.vibe-trading/binance.json``.
agent/src/trading/connectors/binance/sdk.py:185
↓ 9 callersFunctionload_config
()
agent/src/trading/connectors/dhan/sdk.py:153
↓ 9 callersFunctionload_config
()
agent/src/trading/connectors/shoonya/sdk.py:140
↓ 9 callersFunctionload_config
Load Alpaca settings from ``~/.vibe-trading/alpaca.json``.
agent/src/trading/connectors/alpaca/sdk.py:138
↓ 9 callersFunctionload_config
Load Futu settings from ``~/.vibe-trading/futu.json``.
agent/src/trading/connectors/futu/sdk.py:191
↓ 9 callersFunctionload_config
Load OKX settings from ``~/.vibe-trading/okx.json``.
agent/src/trading/connectors/okx/sdk.py:154
↓ 9 callersFunctionload_qveris_config
Load QVeris config with environment overrides applied.
agent/src/tools/qveris_tool.py:69
↓ 9 callersFunctionsafe_filename
Replace unsafe path characters with underscores.
agent/src/channels/utils.py:84
↓ 9 callersFunctionsafe_path
Resolve `p` under `workdir` and ensure it stays inside. Args: p: User-supplied path (relative or absolute). ``~`` expansion is
agent/src/tools/path_utils.py:35
↓ 9 callersMethodsave
Atomically persist the job set. Write sequence (durable even under SIGKILL): temp file in the same dir → ``os.fsync`` the temp fd → `
agent/src/live/runtime/jobstore.py:124
↓ 9 callersMethodsend_message
Send a message to a session and trigger execution. Args: session_id: Session ID. content: Message content.
agent/src/session/service.py:85
↓ 9 callersMethodto_dict
Return a JSON-serializable profile snapshot.
agent/src/trading/types.py:46
↓ 9 callersFunctiontrip_halt
Trip the kill switch by writing a sentinel file. Writing is atomic (same-directory temp file + ``os.replace``) so a partial write can never l
agent/src/live/halt.py:72
↓ 9 callersFunctionts_cov
Rolling sample covariance per column, min_periods=n.
agent/src/factors/base.py:165
↓ 9 callersFunctionwin_rate_and_stats
Win rate and P&L statistics from completed trades. Args: trades: Completed round-trip trades. Returns: Dict with win_rate, p
agent/backtest/metrics.py:49
↓ 9 callersFunctionwrite_run_card
Write JSON and Markdown run cards for a backtest run. Args: run_dir: Directory where run_card.json and run_card.md are written. c
agent/backtest/run_card.py:25
↓ 8 callersFunction_assert_host
Fail closed when the resolved host does not match the declared environment. The host is the authoritative discriminator: testnet keys cannot reac
agent/src/trading/connectors/binance/sdk.py:634
↓ 8 callersFunction_assert_profile
Fail closed when the account does not match the declared environment.
agent/src/trading/connectors/tiger/sdk.py:589
↓ 8 callersFunction_bar
(close: float = 100.0, pre_close: float | None = None)
agent/tests/test_india_equity_engine.py:29
↓ 8 callersFunction_body
实体长度(绝对值)。 Args: o: 开盘价序列。 c: 收盘价序列。 Returns: 每根K线的实体长度。
agent/src/skills/candlestick/example_signal_engine.py:22
↓ 8 callersFunction_build_agent
Build an AgentLoop with a real (but empty) registry and a stub LLM.
agent/tests/test_agent_loop_terminal_state.py:104
↓ 8 callersFunction_build_parser
Build the CLI parser with subcommands and compatibility flags.
agent/cli/_legacy.py:4353
↓ 8 callersMethod_calc_equity
Total equity = free cash + sum(margin + unrealised) per position. Uses vectorized numpy path when _calc_pnl/_calc_margin are not over
agent/backtest/engines/base.py:564
↓ 8 callersFunction_classify_deliverable
Hybrid output contract. Return a short reason string when the worker did NOT produce a substantive deliverable, else ``None``. Content-sanity
agent/src/swarm/worker.py:876
↓ 8 callersMethod_close_position
Close position, record trade, return capital.
agent/backtest/engines/base.py:676
↓ 8 callersFunction_df
(records: list[TradeRecord])
agent/tests/test_trade_journal.py:50
↓ 8 callersMethod_execute_run
Core orchestration loop (runs in background thread). Steps: 1. Update run status to running 2. Initialize TaskStore,
agent/src/swarm/runtime.py:211
↓ 8 callersMethod_fetch_daily_frame
Fetch and normalize one daily OHLCV frame, routing by symbol type.
agent/backtest/loaders/tushare.py:135
↓ 8 callersMethod_fetch_minutes
Intraday bars via stk_mins. Args: codes: Stock codes. start_date: Start date (YYYY-MM-DD). end_date: End
agent/backtest/loaders/tushare.py:229
↓ 8 callersFunction_first
(obj: Any, names: tuple[str, ...], default: Any = None)
agent/src/trading/connectors/okx/sdk.py:649
↓ 8 callersFunction_is_a_share
(code: str)
agent/backtest/loaders/baostock_loader.py:23
↓ 8 callersFunction_is_error_result
Did a tool call return a top-level error envelope? Parses the result as JSON and checks for a top-level ``status == "error"``. A nested ``sta
agent/src/swarm/worker.py:852
↓ 8 callersFunction_is_etf_listed
Detect exchange-listed ETF / LOF symbols (e.g. 510050.SH, 159915.SZ).
agent/backtest/loaders/_symbol_utils.py:12
↓ 8 callersFunction_make_bar
( close: float = 5000.0, pre_close: float | None = None, pct_chg: float | None = None, open_:
agent/tests/test_global_futures_engine.py:33
↓ 8 callersFunction_make_kline_df
Build a minimal Futu kline DataFrame mirroring request_history_kline output.
agent/tests/test_futu_loader.py:51
↓ 8 callersFunction_overrides
(kwargs: dict[str, Any])
agent/src/tools/trading_connector_tool.py:78
↓ 8 callersFunction_patch_ddgs
(monkeypatch, text_impl)
agent/tests/test_web_search_tool.py:36
↓ 8 callersFunction_rec
(dt: str, symbol: str, side: str, qty: float, price: float, fee: float = 0.0)
agent/tests/test_trade_journal.py:36
↓ 8 callersFunction_rejects_unc
Raise ValueError if `p` starts with a UNC share prefix.
agent/src/tools/path_utils.py:29
↓ 8 callersMethod_request
Send a JSON request with spacing and 429 Retry-After handling.
agent/src/tools/qveris_tool.py:210
↓ 8 callersFunction_require_futu
()
agent/src/trading/connectors/futu/sdk.py:643
↓ 8 callersFunction_resolve_console
Return the shared CLI console, or a caller-supplied override.
agent/cli/commands/chat.py:23
↓ 8 callersFunction_rolling_correlation_matrix
Compute correlation matrix for multiple price series. Args: price_series: Mapping of asset code -> DataFrame with a ``close`` column.
agent/backtest/correlation.py:35
↓ 8 callersFunction_run
( monkeypatch: pytest.MonkeyPatch, tmp_path: Path, llm: Any, max_iterations: int = 5, )
agent/tests/test_agent_loop_content_filter.py:75
↓ 8 callersFunction_run
( monkeypatch, tmp_path: Path, llm: _ScriptedChatLLM, event_callback=None, max_iterations:
agent/tests/test_swarm_worker_content_filter.py:60
↓ 8 callersFunction_run
(capsys: pytest.CaptureFixture[str], args: argparse.Namespace)
agent/tests/factors/test_alpha_compare.py:172
↓ 8 callersFunction_sanitize_skill_name
Sanitize skill name to a safe directory slug.
agent/src/tools/skill_writer_tool.py:26
↓ 8 callersFunction_sdk_module
Import the SDK connector module for a ``broker_sdk`` connector key.
agent/src/trading/service.py:29
↓ 8 callersFunction_with_profile
Add connector profile metadata to an operation payload.
agent/src/trading/service.py:412
↓ 8 callersFunction_write_mandate
(live_runtime: Path, mandate: Mandate)
agent/tests/test_mandate_enforcement.py:123
↓ 8 callersFunctionbootstrap_sharpe_ci
Resample daily returns to estimate Sharpe confidence interval. Args: equity_curve: Equity time series. n_bootstrap: Number of boo
agent/backtest/validation.py:99
↓ 8 callersFunctioncmd_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:3217
↓ 8 callersFunctioncmd_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:3406
↓ 8 callersFunctionestimate_tokens
Rough token count estimate (~4 chars/token). Args: messages: Message list. Returns: Estimated token count.
agent/src/agent/loop.py:231
↓ 8 callersMethodget_positions
(self, config)
agent/tests/test_sdk_order_gate.py:40
↓ 8 callersFunctionis_qveris_configured
Return whether QVeris paid routing should be visible.
agent/src/tools/qveris_tool.py:138
↓ 8 callersFunctionis_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 callersMethodlist
Load all hypotheses from storage.
agent/src/hypotheses/registry.py:347
↓ 8 callersMethodload
Load all persisted jobs. Returns: A dict mapping job id to job. Empty when the store has never been written.
agent/src/scheduled_research/store.py:84
↓ 8 callersFunctionmain
CLI entrypoint returning a process exit code. Behaviour: * Interactive entry (no subcommand, or ``chat`` + TTY): show banner, run onbo
agent/cli/main.py:1272
↓ 8 callersMethodmarket
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 callersFunctionpair_trades_fifo
Pair buys and sells per symbol using FIFO to compute per-roundtrip PnL. Args: df: Standardized DataFrame (datetime-sorted). Returns:
agent/src/tools/trade_journal_tool.py:33
↓ 8 callersMethodquery_events
(self, codes: Iterable[str], *, as_of, feeds=None, scorer=None)
agent/tests/test_rsshub_events_lookahead.py:28
↓ 8 callersMethodread
(self)
agent/tests/test_openai_codex.py:126
↓ 8 callersMethodremove
Remove a memory entry by name. Args: name: Memory name to remove. Returns: True if found and removed.
agent/src/memory/persistent.py:328
↓ 8 callersMethodrun_loop
(self)
agent/tests/test_security_auth_api.py:282
↓ 8 callersFunctionrun_worker
Execute a single worker task using a lightweight ReAct loop. Steps: 1. Build filtered ToolRegistry from agent_spec.tools 2. Create Ch
agent/src/swarm/worker.py:297
↓ 8 callersFunctionscale
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:81
↓ 8 callersFunctionscenario
()
agent/tests/test_channels_runtime.py:223
↓ 8 callersMethodstart
Start the QQ bot with auto-reconnect loop.
agent/src/channels/qq.py:194
↓ 8 callersMethodupdate_run
Atomically update run state. Args: run: Updated SwarmRun instance. Raises: FileNotFoundError: If the run dir
agent/src/swarm/store.py:203
↓ 8 callersFunctionvalidate_generated
Static-check a generated signal_engine source. Checks: 1. ``ast.parse`` succeeds. 2. Module defines ``class SignalEngine``.
agent/src/shadow_account/codegen.py:117
↓ 8 callersFunctionvalidate_ohlc
Drop, flag, or reject bars that violate OHLC invariants. Loaders only drop NaN rows, so structurally dirty bars — ``high < low``, a non-posit
agent/backtest/loaders/base.py:50
↓ 8 callersFunctionwrite_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 callersFunction_bars
Create a dated OHLCV frame ending on the scanner target date.
agent/tests/test_shadow_scanner.py:41
↓ 7 callersFunction_body
Build a minimal FMP historical-price-full body.
agent/tests/test_fmp_loader.py:16
↓ 7 callersMethod_calc_weights
Equal risk contribution weights.
agent/backtest/optimizers/risk_parity.py:17
↓ 7 callersFunction_call
(obj: Any, name: str, *args: Any, **kwargs: Any)
agent/src/trading/connectors/longbridge/sdk.py:749
↓ 7 callersFunction_call
(monkeypatch, n, **kw)
agent/tests/test_get_market_data_size.py:37
↓ 7 callersMethod_channel_key
Normalize channel-like objects and ids to a stable string key.
agent/src/channels/discord.py:351
← previousnext →201–300 of 8,953, ranked by callers