MCPcopy Create free account

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

Functions26,887 in github.com/HKUDS/Vibe-Trading

↓ 7 callersFunction_email_section
(**overrides: Any)
agent/tests/test_channels_config_api.py:147
↓ 7 callersFunction_engine
(*codes: str)
agent/tests/test_china_futures_pricing_assumptions.py:38
↓ 7 callersFunction_engine
( lots: dict[str, int] | None = LOTS, market: str = "hk", initial_cash: float = 1_000_000, )
agent/tests/test_global_equity_hk_lot_sizes.py:21
↓ 7 callersFunction_ensure_dotenv
Load `.env` from the first found candidate path.
agent/src/providers/llm.py:1310
↓ 7 callersMethod_env
Return a minimal official-endpoint Moonshot environment.
agent/tests/test_llm_reasoning_effort.py:322
↓ 7 callersMethod_env
Return a minimal Anthropic environment with optional overrides.
agent/tests/test_llm_reasoning_effort.py:452
↓ 7 callersFunction_error
(message: str)
agent/src/tools/br_market_data_tool.py:56
↓ 7 callersFunction_estimate_tokens
Return (input_tokens, output_tokens) for a single LLM call. Thin wrapper over :func:`_measure_usage` preserving the historical 2-tuple contra
agent/src/swarm/worker.py:262
↓ 7 callersFunction_execute_data_result
Execute one fake MCP tool with a parsed FastMCP result.
agent/tests/test_mcp_client_adapter.py:351
↓ 7 callersFunction_existing_uploads
(uploads_dir: Path)
agent/tests/test_upload_api.py:27
↓ 7 callersFunction_extract_data
Return the ``data`` list from an OKX response, or ``[]`` defensively. python-okx returns a dict shaped ``{"code": "0", "data": [...]}`` on succes
agent/src/trading/connectors/okx/sdk.py:686
↓ 7 callersFunction_factors
(values)
agent/tests/test_alpha_bench_qfq.py:38
↓ 7 callersFunction_fake_response
(payload: dict, status_ok: bool = True)
agent/tests/test_research_reports_tool.py:64
↓ 7 callersFunction_fetch
(frames: dict[str, pd.DataFrame], symbols: list[str], day: str = _DAY)
agent/tests/test_paper_trade_golden_cn_a.py:78
↓ 7 callersMethod_figure_issue
Build one figure-scoped issue with value, role, span, symbol and reason.
agent/src/agent/grounding/policies.py:735
↓ 7 callersFunction_figures
(*rows: str)
agent/tests/test_grounding_numeric_locale_rounding.py:37
↓ 7 callersFunction_finite
Return ``value`` when finite, else ``None`` (strict-JSON safe).
agent/backtest/risk_xray.py:38
↓ 7 callersFunction_fix_tool_pairs
Repair orphaned tool_call / tool_result pairs after compression. Two fixes: 1. Remove tool results whose matching tool_call was compressed
agent/src/agent/context_compact.py:394
↓ 7 callersFunction_fixture
Return the hand-built four-sector single-period attribution. Returns: The :class:`BrinsonResult` for the module-level fixture.
agent/tests/quantlib/test_attribution.py:34
↓ 7 callersFunction_frame
(closes, volumes=None, start="2024-01-01")
agent/tests/test_additive_conversion.py:17
↓ 7 callersFunction_get
Perform a read-only GET request against the Trading 212 REST API.
agent/src/trading/connectors/trading212/sdk.py:393
↓ 7 callersMethod_growing_equity
Equity that grows linearly from 1M to 1.2M (20% return).
agent/tests/test_metrics.py:352
↓ 7 callersFunction_guard
(adapter: _GateBroker)
agent/tests/test_robinhood_live_account_binding.py:73
↓ 7 callersFunction_guarded_probe_app
(allowed_hosts)
agent/tests/test_mcp_host_origin_guard.py:137
↓ 7 callersFunction_history_after_turn_one
Loop messages after turn one ran, built by the loop's own helpers.
agent/tests/test_openai_codex_replay.py:85
↓ 7 callersFunction_host_RUNS_DIR
()
agent/src/api/runs_routes.py:868
↓ 7 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:60
↓ 7 callersFunction_install_fake_ib
(monkeypatch: pytest.MonkeyPatch, ib_cls)
agent/tests/test_ibkr_local.py:361
↓ 7 callersFunction_install_runner
Stub the runner factory; return the ``_StubScheduler`` the runner starts.
agent/tests/test_api_live_runtime.py:356
↓ 7 callersMethod_instance
(self, model: str = "kimi-k2-thinking")
agent/tests/test_kimi_reasoning_content.py:314
↓ 7 callersFunction_int_or_none
Coerce an optional whole-number argument, rejecting malformed input. Args: value: Raw argument value; ``None`` and ``""`` mean "not suppl
agent/src/tools/trading_connector_tool.py:108
↓ 7 callersFunction_is_number
Return whether a value is a finite JSON-style number, excluding bool.
agent/src/agent/grounding/evidence.py:388
↓ 7 callersFunction_labels
(day: str = _DAY)
agent/tests/test_paper_trade_5m_session.py:36
↓ 7 callersFunction_ledger
(tmp_path: Path, payload: dict, tool: str = "risk_tool")
agent/tests/test_grounding_numeric_locale_rounding.py:41
↓ 7 callersFunction_live_profile_connector
Resolve a profile to a live-capable connector key.
agent/cli/_legacy.py:5209
↓ 7 callersFunction_load
()
agent/src/channels/pairing/store.py:43
↓ 7 callersFunction_loader
(tmp_path: Path, monkeypatch: pytest.MonkeyPatch, kind: str)
agent/tests/test_local_loader_source_revision.py:35
↓ 7 callersFunction_make_bracket_artifact
( *, symbol: str = "BTC/USDT:USDT", brackets: list[dict] | None = None, **overrides, )
agent/tests/test_ccxt_perpetual_loader.py:89
↓ 7 callersFunction_make_mandate
Build a minimal valid mandate with a caller-chosen ``expires_at``.
agent/tests/test_runtime_runner.py:58
↓ 7 callersMethod_make_price_df
Build a DataFrame with trade_date as the index name (like real loaders).
agent/tests/test_correlation.py:223
↓ 7 callersFunction_match
(request, market_data, **kwargs)
agent/tests/test_paper_trade_golden_cn_a.py:93
↓ 7 callersFunction_meta
(**overrides: Any)
agent/tests/test_factor_gate_fund_prefix.py:16
↓ 7 callersFunction_ms
(year: int, month: int, day: int, hour: int, minute: int)
agent/tests/test_scheduled_research_executor.py:21
↓ 7 callersFunction_normalize_frame
Normalise a Futu kline DataFrame to the standard OHLCV schema. Args: df: Raw DataFrame returned by ``request_history_kline()``. Retu
agent/backtest/loaders/futu.py:90
↓ 7 callersFunction_normalize_jid
(raw: Any)
agent/src/channels/whatsapp.py:139
↓ 7 callersFunction_normalize_llm_usage
Normalize provider-reported usage metadata without estimating tokens.
agent/src/agent/llm_usage.py:35
↓ 7 callersFunction_normalize_side
Return ``buy``/``sell``/``dividend`` for an exact supported direction alias. Raises: ValueError: Direction is missing or unsupported.
agent/src/tools/trade_journal_parsers.py:207
↓ 7 callersFunction_numbers
Return every integer appearing in a line. Args: line: Text to scan. Returns: The integers found, as strings.
agent/tests/test_readme_counts.py:240
↓ 7 callersFunction_panel
(n_rows: int = 60, n_cols: int = 8, seed: int = 0)
agent/tests/factors/test_bench_strict.py:36
↓ 7 callersMethod_patch_fetch_pair
(self, monkeypatch, loader_mod, raw, additive)
agent/tests/test_additive_conversion.py:160
↓ 7 callersFunction_payload
(day: str = _DAY, **overrides: Any)
agent/tests/test_paper_trade_5m_golden.py:58
↓ 7 callersFunction_pip_value
Size of 1 pip for the pair. Args: symbol: Forex pair (e.g. 'EUR/USD', 'USD/JPY', 'XAU/USD'). Returns: 1 pip in price terms (
agent/backtest/engines/forex.py:67
↓ 7 callersMethod_plan_rejection_metrics
Summarise opening plans the engine wanted but could not take. A rejected plan is invisible in the result otherwise: the run reports a
agent/backtest/engines/base.py:824
↓ 7 callersFunction_qualify_a_share
Append .SH/.SZ/.BJ suffix to a bare A-share ticker.
agent/src/tools/trade_journal_parsers.py:293
↓ 7 callersFunction_quote_ctx
Open an ``OpenQuoteContext`` against the local OpenD gateway.
agent/src/trading/connectors/futu/sdk.py:1061
↓ 7 callersMethod_read
(self)
agent/src/providers/custom_profiles.py:100
↓ 7 callersMethod_record_event
(self, timestamp: pd.Timestamp, event_type: str, **details: Any)
agent/backtest/engines/crypto.py:229
↓ 7 callersMethod_records
Simulate fetch_market_data's real return shape: list of OHLCV dicts.
agent/tests/test_technical_indicator_tool.py:437
↓ 7 callersMethod_referenced
The evidence named by an exact field, call+field, one call, or one tool. An exact evidence-field ref is accepted only when that field occurs
agent/src/agent/grounding/policies.py:821
↓ 7 callersFunction_registry
(specs: dict[str, dict])
agent/tests/test_bench_universe_selection.py:30
↓ 7 callersFunction_resolve_acc_id
Resolve and guard the account id by its ``trd_env``. Calls ``get_acc_list()``, keeps rows whose ``trd_env`` matches the profile, and either c
agent/src/trading/connectors/futu/sdk.py:1074
↓ 7 callersFunction_resolve_console
Return the shared CLI console.
agent/cli/commands/goal.py:21
↓ 7 callersFunction_risk_frame
( symbol: str = "BTC-USDT-PERP", *, timestamp: pd.Timestamp = pd.Timestamp("2026-07-26T00:00:00Z")
agent/tests/test_perpetual_risk.py:35
↓ 7 callersFunction_run
( tmp_path: Path, *, date: str, same_day: bool = False, warmup_bars: int = 0, expiry:
agent/tests/test_options_next_bar_fill.py:65
↓ 7 callersFunction_run
(market_data, orders=(), *, cash=1000000.0, positions=(), open_days=frozenset({_DAY}), path_model="bar_median"
agent/tests/test_paper_trade_5m_session.py:135
↓ 7 callersFunction_run
(payload: dict[str, Any], *, loader: Any = None)
agent/tests/test_paper_trade_5m_golden.py:73
↓ 7 callersMethod_run
(self, monkeypatch, count: int, **kwargs: Any)
agent/tests/test_fred_macro_tool.py:205
↓ 7 callersFunction_run_cli
Drive the real argparse dispatcher, returning its exit code.
agent/tests/test_cli_strategy_evidence.py:43
↓ 7 callersFunction_run_dcf_default
(inputs: dict | None = None)
agent/tests/quantlib/valuation/test_artifact.py:103
↓ 7 callersFunction_sample_result
()
agent/tests/test_options_chain_tool.py:17
↓ 7 callersFunction_scripted
Return a fn() that walks through scripted outcomes (return value or raise).
agent/tests/test_loader_retry_helpers.py:58
↓ 7 callersFunction_section_for
Return ``default_config()`` populated with dummies, or None if unloadable.
agent/tests/test_channel_config_meta.py:45
↓ 7 callersFunction_session_id
(client: TestClient, *, title: str = "goal api")
agent/tests/test_goal_api.py:24
↓ 7 callersFunction_set_emitter
Install the active progress emitter for the current thread. Args: emit: Callable that consumes a ``ProgressEvent``. Pass ``None`` to clea
agent/src/agent/progress.py:71
↓ 7 callersFunction_set_key
(monkeypatch: pytest.MonkeyPatch, key: str = "secret")
agent/tests/test_auth_precedence.py:37
↓ 7 callersFunction_setup
(monkeypatch, n_alphas=8, n_days=120)
agent/tests/test_bench_multiple_testing.py:32
↓ 7 callersFunction_split_telegram_markdown
Split raw Telegram Markdown without leaving fenced code blocks unbalanced.
agent/src/channels/telegram.py:46
↓ 7 callersFunction_to_yahoo_interval
Map a project interval string to Yahoo's chart interval string. Args: interval: Backtest interval such as ``1D`` or ``1H``. Returns:
agent/backtest/loaders/yahoo_loader.py:72
↓ 7 callersFunction_to_yfinance_interval
Map project interval strings to yfinance interval strings. Args: interval: Backtest interval such as ``1D`` or ``5m``. Returns:
agent/backtest/loaders/yfinance_loader.py:84
↓ 7 callersFunction_tool_call
(call_id: str, tool_name: str, **arguments: Any)
agent/tests/test_grounding_release.py:650
↓ 7 callersFunction_trade_ctx
Open an ``OpenSecTradeContext`` against the local OpenD gateway.
agent/src/trading/connectors/futu/sdk.py:1044
↓ 7 callersFunction_trd_env_enum
Return the ``TrdEnv`` enum value for this profile's environment.
agent/src/trading/connectors/futu/sdk.py:1068
↓ 7 callersFunction_valid_mandate_state
Build a committed, unexpired active-mandate snapshot for stubbing.
agent/tests/test_api_live_runtime.py:41
↓ 7 callersFunction_wire_proposals
( monkeypatch: pytest.MonkeyPatch, store: ScheduledResearchJobStore )
agent/tests/scheduling/test_system_job_protection.py:124
↓ 7 callersFunction_write
(path: Path, kind: str, close: int)
agent/tests/test_local_loader_source_revision.py:12
↓ 7 callersFunction_write_csv
Write a small CSV artifact.
agent/tests/test_run_artifact_tool.py:66
↓ 7 callersFunction_write_run
(tmp_path: Path, config: dict | None)
agent/tests/test_validation_cli_settings.py:13
↓ 7 callersFunction_write_runtime_file
(tmp_path, values: dict[str, str])
agent/tests/test_longbridge_credentials.py:37
↓ 7 callersMethod_write_transaction
Open an immediate write transaction for cross-connection safety.
agent/src/goal/store.py:249
↓ 7 callersFunctionaccrued_interest
Interest earned by the seller between the last coupon and settlement. Dirty price = clean price + accrued interest. :func:`bond_price` returns th
agent/src/quantlib/fixedincome.py:148
↓ 7 callersFunctionallowed_write_roots
Return all roots allowed for file writes and edits.
agent/src/tools/path_utils.py:173
↓ 7 callersMethodappend_message
Append a message to the session JSONL log. Args: message: Message to append.
agent/src/session/store.py:155
↓ 7 callersFunctionapply_constraints_frame
Apply constraints row by row to a signed weight frame. Args: frame: Optimizer output (dates x codes), signed weights. constraints
agent/backtest/constraints.py:183
↓ 7 callersFunctionarchive_segments
Sealed segments for a ledger, oldest first. Args: path: Active ledger path, e.g. ``.../audit_chain.jsonl``. Returns: Archive
agent/src/governance/ledger.py:605
↓ 7 callersFunctionbootstrap_statistic
Percentile-bootstrap confidence interval for an arbitrary statistic. Resamples ``data`` with replacement ``n_bootstrap`` times, recomputes the
agent/src/quantlib/timeseries.py:771
↓ 7 callersFunctionbr_date
``dd/mm/yyyy`` or ``yyyy-mm-dd`` -> ``yyyy-mm-dd``; anything else -> ``None``.
agent/src/br_data/_download.py:63
↓ 7 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:229
↓ 7 callersFunctionbuild_worker_prompt
Build the worker's system prompt with role, upstream context, and skills. Args: agent_spec: The agent's role specification. upstr
agent/src/swarm/worker.py:285
↓ 7 callersMethodcall_soon_threadsafe
(self, fn, *args)
agent/tests/scheduling/test_kernel.py:195
↓ 7 callersMethodcancel_all
Cancel every in-flight internal task; bounded (module docstring). Cancellation lands at the task's await point on the next loop pass
agent/src/scheduled_research/internal_dispatch.py:182
← previousnext →1,201–1,300 of 26,887, ranked by callers