MCPcopy Create free account

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

Functions30,405 in github.com/HKUDS/Vibe-Trading

↓ 11 callersFunctionsplit_message
Split content into chunks within max_len, preferring line breaks. Args: content: The text content to split. max_len: Maximum leng
agent/src/channels/utils.py:64
↓ 11 callersFunctionthrottled_get_json
Throttled GET that decodes the response body as JSON. Same contract as :func:`throttled_get`, plus ``response.raise_for_status()`` and ``resp
agent/backtest/loaders/_http.py:248
↓ 11 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:310
↓ 11 callersFunctionwacc
Build the weighted average cost of capital. ``Re`` is CAPM plus two optional additive premiums; ``Rd`` is the pretax cost of debt shielded by
agent/src/quantlib/valuation/dcf.py:372
↓ 11 callersMethodwait
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:78
↓ 11 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
↓ 10 callersFunction_analyze
(tmp_path, monkeypatch, rows, mode="full", filter_expr="", excel=False)
agent/tests/test_trade_journal_invalid_quantity.py:28
↓ 10 callersFunction_answer
(prose: str, *lines: str)
agent/tests/test_grounding_unit_and_scanner_gaps.py:39
↓ 10 callersFunction_apply_filter
Filter DataFrame by a simple expression. Supports: - "YYYY-MM to YYYY-MM" or "YYYY-MM-DD to YYYY-MM-DD" (date range) - "symbol=XX
agent/src/tools/trade_journal_tool.py:599
↓ 10 callersFunction_bar
(close: float = 100.0, pre_close: float | None = None)
agent/tests/test_india_equity_engine.py:27
↓ 10 callersFunction_body
Parse a JSON tool response.
agent/tests/test_file_tool_sandbox_security.py:20
↓ 10 callersFunction_brief
Run read-mode against a single mocked response and return the envelope. Args: paper_ids: Ids to request. response: Mocked ``throt
agent/tests/test_research_papers_tool.py:184
↓ 10 callersFunction_build_agent
Build an AgentRuntime with a real (but empty) registry and a stub LLM.
agent/tests/test_agent_loop_terminal_state.py:179
↓ 10 callersMethod_build_client
Create the default FastMCP client from MCP transport config. Returns: Configured async FastMCP client.
agent/src/tools/mcp.py:662
↓ 10 callersFunction_build_token_store
Build a persistent OAuth token store rooted at ``cache_dir``. The directory is created (with parents) and locked down to ``0700`` so only the
agent/src/tools/mcp.py:511
↓ 10 callersFunction_by_symbol
(report)
agent/tests/test_risk_xray_contributions.py:37
↓ 10 callersMethod_calc_weights
SLSQP weights for the penalized objective; updates turnover state.
agent/backtest/optimizers/turnover_aware.py:160
↓ 10 callersFunction_channel
(*, pdf_password: str = "")
agent/tests/test_email_rich_delivery.py:17
↓ 10 callersFunction_compute_bollinger
Bollinger Bands: upper, middle (SMA), lower using population std (ddof=0).
agent/src/tools/technical_indicator_tool.py:253
↓ 10 callersFunction_configure
Point the local loader at a temp config file.
agent/tests/test_local_loader.py:16
↓ 10 callersFunction_consumer
(root, input_from, task_id="publish", agent_id="editor")
agent/tests/test_swarm_selected_inputs.py:132
↓ 10 callersFunction_create_memory_file
Helper to create a memory file with extended frontmatter.
agent/tests/test_memory_lifecycle.py:35
↓ 10 callersFunction_cwd
(tmp_path: Path)
agent/tests/test_user_instructions.py:50
↓ 10 callersFunction_dz_chain
Build the DZ BANK original / RESTATEMENT / NEW HOLDINGS chain.
agent/tests/test_institutional_holdings_tool.py:261
↓ 10 callersFunction_ensure_dotenv
Load `.env` from the first found candidate path.
agent/src/providers/settings.py:147
↓ 10 callersFunction_first
(row: Mapping[str, Any], names: tuple[str, ...], default: Any = None)
agent/src/trading/connectors/futu/sdk.py:1192
↓ 10 callersFunction_format_env_value
Format a dotenv value without allowing multiline injection.
agent/src/config/dotenv.py:120
↓ 10 callersFunction_import_mcp_server
Import ``agent/mcp_server.py`` without executing ``main()``. Returns: The imported mcp_server module.
agent/tests/test_mcp_new_tools.py:70
↓ 10 callersFunction_import_mcp_server
Import agent/mcp_server.py without executing main(). Returns: The imported mcp_server module. Raises: ImportError: If the mo
agent/tests/test_mcp_regression.py:93
↓ 10 callersFunction_inject_mock_transport
Route the probe's fresh ``httpx.AsyncClient`` through a MockTransport. The probe owns its client, so the only seam is the client class itself. Th
agent/tests/test_qq_connection_test.py:57
↓ 10 callersFunction_install_schema_stub
(monkeypatch: pytest.MonkeyPatch)
agent/tests/test_fundamentals_pit.py:12
↓ 10 callersFunction_job
(jid: str, next_run_at: int, schedule: str = "interval:1000")
agent/tests/test_runtime_scheduler.py:29
↓ 10 callersFunction_ledger
(tmp_path: Path, values: dict[str, float])
agent/tests/test_grounding_unknown_call_id_refs.py:21
↓ 10 callersFunction_long_call_body
(**over: Any)
agent/tests/test_options_routes.py:43
↓ 10 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
↓ 10 callersFunction_make_bar
(close: float = 1.1050, open_: float | None = None)
agent/tests/test_forex_engine.py:36
↓ 10 callersFunction_make_channel
Build a Discord channel that has NOT been started (no discord.py client).
agent/tests/test_discord_connection_test.py:42
↓ 10 callersFunction_make_run
(tmp_path: Path)
agent/tests/test_swarm_cancel_mid_flight_worker.py:38
↓ 10 callersFunction_make_run
(tmp_path: Path, header: str, rows: list[str] | None = None)
agent/tests/api/test_positions_sectors.py:57
↓ 10 callersFunction_mcp_tools
Return the registered MCP tools keyed by name (public async API).
agent/tests/test_mcp_new_tools.py:84
↓ 10 callersFunction_metric_kind_for_path
Map an evidence JSON path to an analysis metric kind. A metadata count leaf (:func:`_is_metadata_count_leaf`) has no kind.
agent/evals/grounding/evidence.py:619
↓ 10 callersMethod_metric_pool
Metric values from completed analysis results and metric-named leaves.
agent/evals/grounding/policies.py:1600
↓ 10 callersFunction_obj_get
(obj: Any, name: str, default: Any = None)
agent/src/trading/connectors/ibkr/local.py:691
↓ 10 callersFunction_parse
(raw: bytes)
agent/tests/test_email_authentication_results.py:29
↓ 10 callersFunction_patch_sec
( monkeypatch: pytest.MonkeyPatch, facts_by_symbol: dict[str, dict[str, object]], )
agent/tests/test_fundamentals_pit.py:52
↓ 10 callersFunction_rec
( dt: str, symbol: str, side: str, qty: float, price: float, fee: float = 0.0 )
agent/tests/test_trade_journal_currency_pools.py:18
↓ 10 callersFunction_resolve_console
Return the shared CLI console, or a caller-supplied override.
agent/cli/commands/chat.py:15
↓ 10 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:148
↓ 10 callersFunction_run
(coro: Any)
agent/tests/test_qq_connection_test.py:84
↓ 10 callersFunction_run_cn_a
(orders: list[dict], close: float, prev_close: float = 10.0, positions: list[dict] | None = None
agent/tests/test_paper_trade_limits.py:59
↓ 10 callersFunction_run_masked
( engine: _MaskEngine, weights: list[float], *, dates: pd.DatetimeIndex | None = None, )
agent/tests/test_rebalance_mask.py:42
↓ 10 callersFunction_safe_attr
(obj: Any, name: str, default: Any = None)
agent/src/channels/whatsapp.py:118
↓ 10 callersMethod_safe_price
Get close price with fallback. Uses array fast-path when available. Valuation call sites pass ``_val_arr`` (unbounded ffill) so a halted
agent/backtest/engines/base.py:2569
↓ 10 callersMethod_safe_send_to
Send a raw frame to one connection, cleaning up on ConnectionClosed.
agent/src/channels/websocket.py:862
↓ 10 callersFunction_sanitize_skill_name
Sanitize skill name to a safe directory slug.
agent/src/tools/skill_writer_tool.py:44
↓ 10 callersMethod_scan_entries
Scan all .md files (except MEMORY.md) and parse frontmatter.
agent/src/memory/persistent.py:233
↓ 10 callersFunction_seed_system_job
Insert a system row the way ``ensure_system_jobs`` would.
agent/tests/scheduling/test_system_job_protection.py:91
↓ 10 callersFunction_set_env
(monkeypatch: pytest.MonkeyPatch, **vars: str)
agent/tests/scheduling/test_memory_consolidation_job.py:51
↓ 10 callersFunction_store
(tmp_path: Path)
agent/tests/scheduling/test_internal_dispatch.py:33
↓ 10 callersFunction_store_bytes
(store: ScheduledResearchJobStore)
agent/tests/scheduling/test_system_job_protection.py:122
↓ 10 callersFunction_surface_diagnostics_body
(**over: Any)
agent/tests/test_options_routes.py:354
↓ 10 callersFunction_turn
( runs: Path, name: str, session: str | None = SESSION, subs=("a", "b"), **kwargs )
agent/tests/test_backtest_runs_tool.py:44
↓ 10 callersFunction_validate
(tmp_path: Path, prose: str, *rows: str)
agent/tests/test_grounding_indexed_field_refs.py:47
↓ 10 callersFunction_values
(result)
agent/tests/test_grounding_shape_hardening.py:83
↓ 10 callersFunction_write_config
(run_dir: Path, codes: List[str], benchmark: Any = None)
agent/tests/test_attribution_api.py:80
↓ 10 callersMethodadvance
Match completed daily bars and atomically commit, refusing stale callers. Args: account_id: Saved account identifier.
agent/src/tools/paper_trade/accounts.py:176
↓ 10 callersFunctionassess_readiness
Target-day readiness on the merged frame (AM-9), never on a leg alone. Ready when ANY served symbol carries the target-day bar (a zero-bar symbol
agent/src/tools/paper_trade/data_readiness.py:55
↓ 10 callersFunctionborrow_cost
Cost of borrowing the short leg for one period. Only negative weights are charged: a long position borrows nothing. The charge is the absolut
agent/backtest/factor_costs.py:231
↓ 10 callersFunctionbuild_availability_contract
Build a JSON-safe field-level availability contract for a bench panel. ``required_fields`` may include declared alpha inputs that were absent fro
agent/src/factors/data_availability.py:239
↓ 10 callersMethodbuild_messages
Put volatile workspace state and memory recall in the user message to preserve the prompt cache. Args: user_message: User message
agent/src/product/context.py:230
↓ 10 callersFunctioncalc_turnover_series
Per-bar weight-implied portfolio turnover from a position frame. Turnover for a bar is ``0.5 * sum_i |w_{t,i} - w_{t-1,i}|``, so a full rotat
agent/backtest/metrics.py:501
↓ 10 callersMethodcall_tool
Call a remote MCP tool.
agent/src/tools/mcp.py:278
↓ 10 callersFunctionchat_llm_for_session
Build the chat client for one attempt of a session. Args: config: Optional session config containing a stored model override. pol
agent/src/session/model_selection.py:54
↓ 10 callersFunctionchat_with_adapter
Initialize ChatLLM normally while substituting only its SDK adapter.
agent/tests/provider_helpers.py:19
↓ 10 callersFunctioncheck_budget
Raise :class:`TimeoutError` if the monotonic clock has crossed ``deadline``. Use this between pages of a paginated fetch to fail fast instead of
agent/backtest/loaders/base.py:482
↓ 10 callersFunctionclear_halt
Clear a tripped kill switch by deleting its sentinel. Clearing is a privileged surface action (never an agent tool). Clearing the global swit
agent/src/live/halt.py:111
↓ 10 callersFunctioncompute
(**kwargs)
agent/tests/test_system_routes.py:232
↓ 10 callersFunctioncompute_edge_density
Reduce rolling correlation matrices to an edge-density series. Edge density is the fraction of distinct asset pairs whose rolling |correlatio
agent/backtest/regime.py:24
↓ 10 callersFunctioneffective_fee_model
Return the fee parameters actually in effect for this run (R7-3 echo). Per-key merge of the caller-provided overrides over the market defaults:
agent/src/tools/paper_trade/state_hash.py:275
↓ 10 callersMethodevaluate_decay
Evaluate a single set of metrics and return the decay signal. Uses the WORST signal across all provided metrics. For factors: uses ic
agent/src/strategy_store/decay.py:88
↓ 10 callersMethodexecute
(self, **kwargs: Any)
agent/src/tools/portfolio_risk_tool.py:91
↓ 10 callersMethodexecute
(self, sql, *args, **kwargs)
agent/tests/memory/test_search_index_upgrade.py:46
↓ 10 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:292
↓ 10 callersFunctionextract_order_intent
Parse Robinhood ``place_equity_order`` kwargs into a normalized :class:`OrderIntent`. Returns ``None`` (→ DENY) whenever the tool is not a recogn
agent/src/trading/connectors/robinhood/extractor.py:63
↓ 10 callersMethodhas_bar
(self, day: str)
agent/src/tools/paper_trade/data.py:353
↓ 10 callersMethodindex_message
Index a single message. Args: session_id: Session ID. role: Message role such as user, assistant, or tool.
agent/src/session/search.py:247
↓ 10 callersMethodindex_session
Upsert a session without resetting an existing message count. Args: session_id: Session ID. title: Session title.
agent/src/session/search.py:220
↓ 10 callersFunctionis_portfolio_connection_profile
Report whether a profile can back a read-only portfolio connection. A profile qualifies only when it is read-only and declares both ``account
agent/src/trading/connections.py:39
↓ 10 callersFunctionis_trading_day
Whether ``date`` (YYYY-MM-DD) is a trading day of ``market``. cn_a: CH ``trade_calendar`` truth. hk/us: raises NotImplementedError (AM-6 zer
agent/src/tools/paper_trade/calendar.py:244
↓ 10 callersFunctionlist_presets
Return summary info for all available presets, sorted by name. Returns: Summary dictionaries with name, title, description, agent_count,
agent/src/swarm/presets.py:92
↓ 10 callersFunctionload_config
Load Binance settings from ``~/.vibe-trading/binance.json``.
agent/src/trading/connectors/binance/sdk.py:186
↓ 10 callersFunctionload_config
Load Alpaca settings from ``~/.vibe-trading/alpaca.json``.
agent/src/trading/connectors/alpaca/sdk.py:163
↓ 10 callersFunctionload_config
()
agent/src/trading/connectors/zerodha/sdk.py:154
↓ 10 callersFunctionloader_cache_put
Write one non-empty DataFrame to the cache; a no-op when not cacheable. Skips a disabled cache, an unsettled range, and empty/non-DataFrame resul
agent/backtest/loaders/base.py:709
↓ 10 callersMethodlocking
(fd: int, mode: int, count: int)
agent/tests/test_openai_codex.py:596
↓ 10 callersFunctionmain
Start the interactive CLI, resume a session, or dispatch a command. Args: argv: Argument list excluding the executable. Defaults to sys.a
agent/cli/main.py:1025
↓ 10 callersFunctionmonte_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:533
↓ 10 callersFunctionnormalize_position
Convert a connector position row to the portfolio wire shape. Args: broker: The connector key, used only to select a dedicated payload
agent/src/portfolio/normalization.py:56
↓ 10 callersFunctionnormalize_required_text
Strip and validate a required text field. Args: value: User supplied text. field_name: Field name for the error message. Ret
agent/src/goal/policy.py:41
↓ 10 callersFunctionnormalize_tool_run_dir
Normalize ``run_dir`` in tool args to an absolute path when possible. If the model supplies a relative ``run_dir`` (for example ``"."`` or ``
agent/src/tools/_arguments.py:38
← previousnext →901–1,000 of 30,405, ranked by callers