MCPcopy Create free account

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

Functions15,301 in github.com/HKUDS/Vibe-Trading

↓ 10 callersMethodobserve
()
frontend/src/tests/setup.ts:11
↓ 10 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:34
↓ 10 callersFunctionrandom_walk
Generate a driftless random walk (a unit-root, non-stationary series). Args: n: Number of observations. seed: Seed for the random
agent/tests/quantlib/test_timeseries.py:67
↓ 10 callersFunctionredact_text
Scrub credential-shaped values from a free-form string. Used for plain-text tool results, shell output, error messages and log lines where :f
agent/src/tools/redaction.py:422
↓ 10 callersMethodrun_once
Run ONE fail-closed tick in fixed order; return the outcome dict. Ordering (each step short-circuits the tick on failure): 1. **Halt
agent/src/live/runtime/runner.py:407
↓ 10 callersFunctionsanitize_session_overrides
Strip operator-only keys from API-caller-supplied session overrides. ``mcpServers`` / ``mcp_servers`` define subprocess ``command``/``args``/``en
agent/src/config/loader.py:107
↓ 10 callersMethodsave
(self, jobs)
agent/tests/test_runtime_runner.py:516
↓ 10 callersMethodsend_message
Send a message to a session and trigger execution. Args: session_id: Session ID. content: Message content.
agent/src/session/service.py:158
↓ 10 callersFunctionsigned_power
``sign(df) * |df|**p`` — preserves sign; never produces complex output.
agent/src/factors/base.py:299
↓ 10 callersFunctionsqrt_impact
Apply square-root market impact, the best empirically supported form. Impact is ``eta * volatility * sqrt(volume_traded / adv)``. Marginal impact
agent/src/quantlib/impact.py:211
↓ 10 callersFunctionstandardise_exposures
Turn a raw characteristic into a cross-sectional exposure. Winsorises both tails, then subtracts a cap-weighted mean and divides by an equal-
agent/src/quantlib/factormodel.py:161
↓ 10 callersMethodstart
Start the QQ bot with auto-reconnect loop.
agent/src/channels/qq.py:194
↓ 10 callersFunctionswarm_runs_root
Single source of truth for where swarm runs are persisted. The swarm store (mcp_server) and the run-dir sandbox allow-list (src.tools.path_ut
agent/src/swarm/store.py:64
↓ 10 callersMethodto_dict
Return a JSON-serializable profile snapshot.
agent/src/trading/types.py:46
↓ 10 callersMethodto_job
Build a schedulable job from this playbook. The result is ready for ``ScheduledResearchJobStore.upsert`` and mirrors what ``POST /sch
agent/src/scheduled_research/playbooks.py:142
↓ 10 callersFunctionts_cov
Rolling sample covariance per column, min_periods=n.
agent/src/factors/base.py:166
↓ 10 callersFunctionuseThemeDark
()
frontend/src/lib/theme-store.ts:25
↓ 10 callersFunctionvalidate_url_target
Validate a URL is safe to fetch: scheme, hostname, and resolved IPs. ``allow_loopback`` is intentionally narrow: it only permits literal loop
agent/src/channels/utils.py:97
↓ 10 callersFunctionvalidate_validation_status_transition
Guard the model-validation state machine. The only hard rule: a model cannot be marked ``APPROVED`` unless it is already ``VALIDATED`` (re-ap
agent/src/strategy_store/models.py:211
↓ 10 callersFunctionverify_chain
Walk an on-disk ledger end to end, returning where (if anywhere) it broke. Args: path: Ledger JSONL file path. A missing file verifies as
agent/src/governance/ledger.py:309
↓ 10 callersFunctionwalk_forward_analysis
Split backtest into sequential windows, check consistency. Each window is evaluated independently (returns normalised to window start). Args
agent/backtest/validation.py:208
↓ 10 callersFunctionwaterfall_split
Split a distributable amount through the four European waterfall tiers. The tiers, paid strictly in order and only from what remains: 1. **R
agent/src/quantlib/fundmath.py:1124
↓ 9 callersFunction_bar
(open_: float, close: float, base_field: str = "pre_close")
agent/tests/test_price_limit_lookahead.py:44
↓ 9 callersFunction_build_agent
Build an AgentLoop with a real (but empty) registry and a stub LLM.
agent/tests/test_agent_loop_terminal_state.py:127
↓ 9 callersFunction_capture_kwargs
Run build_llm in a replaced environment and return the adapter kwargs. Args: env: Full environment for the call; every other variable is
agent/tests/test_llm_reasoning_effort.py:92
↓ 9 callersFunction_client
()
agent/tests/test_alpha_compare_api.py:28
↓ 9 callersFunction_first
(row: Mapping[str, Any], names: tuple[str, ...], default: Any = None)
agent/src/trading/connectors/futu/sdk.py:830
↓ 9 callersFunction_hk_engine
(**overrides)
agent/tests/test_global_equity_engine.py:34
↓ 9 callersFunction_host
Return the ``api_server`` module for late-access attribute reads. Tests monkeypatch ``ENV_PATH``, ``ENV_EXAMPLE_PATH``, ``_baostock_supported``
agent/src/api/settings_routes.py:173
↓ 9 callersFunction_install_schema_stub
(monkeypatch: pytest.MonkeyPatch)
agent/tests/test_fundamentals_pit.py:12
↓ 9 callersFunction_loop
An AgentLoop shell built without running __init__ (we only need the helper).
agent/tests/test_run_manifest_wiring.py:24
↓ 9 callersFunction_loopback_client
TestClient whose peer host ('testclient') is treated as loopback.
agent/tests/test_auth_precedence.py:23
↓ 9 callersFunction_make_agent_config
Build an AgentConfig from a plain server-name → config-dict map.
agent/tests/test_registry_mcp_integration.py:21
↓ 9 callersFunction_make_bar
( close: float = 5000.0, pre_close: float | None = None, pct_chg: float | None = None, settle:
agent/tests/test_china_futures_engine.py:36
↓ 9 callersFunction_make_bar
(close: float = 1.1050, open_: float | None = None)
agent/tests/test_forex_engine.py:34
↓ 9 callersFunction_make_hypothesis
(**overrides)
agent/tests/test_autopilot_phase3.py:36
↓ 9 callersFunction_make_specs
Build a list of fake MCPRemoteToolSpec for testing.
agent/tests/test_mcp_specs_cache.py:80
↓ 9 callersFunction_monkeypatch_upgrade_env
Point PyPI + install-kind detection at deterministic fakes.
agent/tests/test_cli_update.py:57
↓ 9 callersFunction_overrides
Build the local-connector override dict, rejecting malformed numerics. Args: kwargs: Raw tool arguments. Returns: Override m
agent/src/tools/trading_connector_tool.py:177
↓ 9 callersFunction_parse_pages
Parse '1-10' / '5' / '1,3,5-8' into zero-based indices.
agent/src/tools/doc_reader_tool.py:105
↓ 9 callersFunction_patch_sec
( monkeypatch: pytest.MonkeyPatch, facts_by_symbol: dict[str, dict[str, object]], )
agent/tests/test_fundamentals_pit.py:52
↓ 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:37
↓ 9 callersFunction_request
(**kwargs)
agent/tests/test_openbb_bridge/test_context_injector.py:80
↓ 9 callersFunction_reset_crumb
Clear the process-wide crumb cache so each test handshakes fresh.
agent/tests/test_yahoo_client.py:43
↓ 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:125
↓ 9 callersFunction_rule_with_rsi
( rsi_min: float, rsi_max: float, hour_min: int = 0, hour_max: int = 23, )
agent/tests/test_shadow_account.py:1642
↓ 9 callersFunction_run_dir
(base: Path)
agent/tests/test_autopilot_phase3.py:49
↓ 9 callersMethod_safe_price
Get close price with fallback. Uses array fast-path when available.
agent/backtest/engines/base.py:1718
↓ 9 callersFunction_seed
(directory: Path, filename: str = "record.json")
agent/tests/test_state_migration.py:10
↓ 9 callersFunction_stub_panel
(monkeypatch: pytest.MonkeyPatch, n_rows: int = 80, n_cols: int = 8)
agent/tests/factors/test_bench_strict.py:221
↓ 9 callersFunction_tool_call
(call_id: str, tool_name: str, **arguments: Any)
agent/tests/test_agent_grounding.py:147
↓ 9 callersFunction_two_regime_series
Build a series alternating between a calm and a turbulent regime.
agent/tests/quantlib/test_timeseries.py:713
↓ 9 callersFunction_write_five_records
(path: Path)
agent/tests/test_governance.py:287
↓ 9 callersFunctionbuild_dcf_artifact
Wrap a completed :func:`~.dcf.run_dcf` call into a versioned artifact. ``capital_structure_basis``, ``discounting_convention``, ``terminal_va
agent/src/quantlib/valuation/artifact.py:691
↓ 9 callersFunctioncalendarise_metric
Align one company's flow metric onto a comparable twelve-month footing. See the module docstring, section 2, for why this step exists and why
agent/src/quantlib/valuation/comps.py:230
↓ 9 callersFunctionchristoffersen_independence
Test whether breaches cluster in time. Fits a first-order Markov chain to the breach sequence and tests the restriction that the two transiti
agent/src/quantlib/var_backtest.py:394
↓ 9 callersMethodclose_position
(self, config, **kwargs)
agent/tests/test_etoro_live_actions.py:26
↓ 9 callersFunctioncompute_input_hash
Hash an arbitrary payload the same way ``build_*_artifact`` hashes inputs. Public mainly so the normalization scheme (:func:`_flatten` / :fun
agent/src/quantlib/valuation/artifact.py:518
↓ 9 callersFunctionenterprise_value
Bridge a known equity market value to enterprise value. EV = market_cap + total_debt - cash_and_equivalents + minority_interest
agent/src/quantlib/valuation/comps.py:388
↓ 9 callersFunctionexpected_maximum_sharpe
Sharpe the best of ``n_trials`` reaches by luck alone. From the expected maximum of ``N`` independent Gaussians:: E[max] ~ std * [ (1 -
agent/src/quantlib/multipletesting.py:281
↓ 9 callersFunctionfit_gpd_tail
Fit the loss tail with a generalised Pareto distribution (POT method). Extreme value theory says the exceedances over a high enough threshold
agent/src/quantlib/risk.py:430
↓ 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:196
↓ 9 callersMethodget_messages
Read all messages for a session. Args: session_id: Session ID. limit: Maximum number of messages to return.
agent/src/session/store.py:164
↓ 9 callersMethodget_quote
(self, symbol, *, config=None)
agent/tests/test_sdk_order_gate.py:369
↓ 9 callersMethodhandle_query
Yield ``openbb_ai`` SSE objects for an OpenBB ``QueryRequest``. Args: request: The parsed ``openbb_ai.models.QueryRequest``.
agent/src/openbb_bridge/adapter.py:82
↓ 9 callersFunctionhandler
(req)
agent/tests/test_tap_forward.py:74
↓ 9 callersFunctionhistorical_cvar
Conditional VaR (expected shortfall) from the empirical distribution. The average loss *given* that the VaR threshold was breached. Unlike VaR it
agent/src/quantlib/risk.py:218
↓ 9 callersMethodindex_entry
Upsert a memory entry into the index. Args: entry_id: 6-char hex identifier. title: Memory title. descrip
agent/src/memory/search_index.py:207
↓ 9 callersMethodindex_message
(self, session_id: str, role: str, content: str)
agent/tests/test_session_tool_trail.py:21
↓ 9 callersFunctioninfer_market
Infer market key from a ticker symbol. Resolution order: 1. Crypto pair spellings (``BTC-USDT``, ``ETH/USD`` …). 2. Explicit exchange su
agent/backtest/correlation.py:19
↓ 9 callersFunctionis_sensitive_arg
Return whether a tool-argument / payload key name should be redacted. A key is sensitive when its normalized (stripped, lower-cased) form either
agent/src/tools/redaction.py:246
↓ 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 callersFunctionlinear_impact
Apply market impact proportional to the participation rate. Impact is ``impact_coeff * volume_traded / adv``. Marginal impact is constant, wh
agent/src/quantlib/impact.py:175
↓ 9 callersFunctionlist_presets
Return summary info for all available presets, sorted by name. User presets (``~/.vibe-trading/swarm/presets/``) are listed alongside the bun
agent/src/swarm/presets.py:111
↓ 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:155
↓ 9 callersFunctionload_config
Load Alpaca settings from ``~/.vibe-trading/alpaca.json``.
agent/src/trading/connectors/alpaca/sdk.py:159
↓ 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 callersFunctionmax_drawdown_analysis
Locate the worst peak-to-trough decline of an equity curve and its recovery. Args: equity: Net-value / equity series, strictly positive.
agent/src/quantlib/risk.py:250
↓ 9 callersFunctionmemory_lock
Acquire exclusive file lock; yields True if acquired, False on timeout.
agent/src/memory/persistent.py:42
↓ 9 callersFunctionmerton_model
Estimate default probability and credit spread from equity market data. Args: equity_value: Market capitalisation. equity_vol: An
agent/src/quantlib/credit.py:346
↓ 9 callersFunctionneutralize_special_tokens
Defang chat-template control tokens in untrusted external content. A zero-width space (U+200B) is inserted right after the opening delimiter
agent/src/security/scanner.py:117
↓ 9 callersFunctionpaid_in_capital
Total capital drawn into the fund, as a positive magnitude. Args: series: The cash flows. contribution_kinds: Kind labels counted
agent/src/quantlib/fundmath.py:598
↓ 9 callersFunctionprobabilistic_sharpe_ratio
Confidence that a strategy's true Sharpe exceeds a benchmark. ``PSR = Z[ (SR - SR*) * sqrt(T - 1) / sqrt(1 - g3*SR + (g4 - 1)/4 * SR^2) ]``
agent/src/quantlib/multipletesting.py:217
↓ 9 callersFunctionprobability_of_backtest_overfitting
Combinatorially-symmetric cross-validation (CSCV) overfitting diagnostic. Splits the sample into ``n_splits`` contiguous subsets, then for every
agent/src/quantlib/multipletesting.py:445
↓ 9 callersFunctionrebalance_cost
Price one rebalance: capacity, then impact, then borrow. Args: target_weights: Desired weights, shorts negative. current_weights:
agent/backtest/factor_costs.py:297
↓ 9 callersMethodreinforce
Update quality score based on usage feedback. Args: name: Memory entry name (exact match). event: One of "task_succes
agent/src/memory/lifecycle.py:112
↓ 9 callersMethodrun
Start a background task and return its task_id. Args: command: Shell command to execute. Returns: JSON strin
agent/src/tools/background_tools.py:110
↓ 9 callersMethodrun_gc
Run garbage collection on memory store. Args: dry_run: If True (default), log actions without modifying files. Returns:
agent/src/memory/lifecycle.py:183
↓ 9 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
↓ 9 callersFunctionsafe_filename
Replace unsafe path characters with underscores.
agent/src/channels/utils.py:92
↓ 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:46
↓ 9 callersFunctionterminal_value
Compute both terminal-value estimates and cross-validate them. Args: final_year_fcff: ``FCFF_n``, the last explicit forecast year's free
agent/src/quantlib/valuation/dcf.py:672
↓ 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 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
↓ 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:263
← previousnext →401–500 of 15,301, ranked by callers