MCPcopy Create free account

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

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

↓ 3 callersFunction_is_valid_label
True if a label looks like a meaningful financial field name.
agent/src/tools/report_audit_tool.py:115
↓ 3 callersFunction_is_windows
True when running on a Windows-like platform (win32, including Cygwin/MSYS).
agent/cli/_legacy.py:6349
↓ 3 callersFunction_iter_parsed_lines
Yield ``(index, parsed_record_or_None, parse_error_or_None)`` for non-blank lines. Stops (does not yield further lines) after the first unparsabl
agent/src/governance/ledger.py:225
↓ 3 callersFunction_json_safe
Return a JSON-strict copy of validation results.
agent/backtest/validation.py:505
↓ 3 callersFunction_json_safe
(value: Any)
agent/backtest/run_card.py:364
↓ 3 callersFunction_json_safe
Deep-copy *value* replacing non-finite floats with ``None``. Guarantees every returned envelope serializes under strict JSON (no NaN/Infinity
agent/src/strategy_discovery/facade.py:84
↓ 3 callersFunction_jsonp
(bars_json: str)
agent/tests/test_sina_loader.py:60
↓ 3 callersFunction_keyed_metric_map_kind
Identify metric maps with instrument-shaped keys after the metric name. Scalar fields such as ``positions[0].contribution_pct`` are not keyed
agent/src/agent/grounding/evidence.py:636
↓ 3 callersMethod_kind_fits
Whether a record is of the kind ``figure`` can be grounded in. Mirrors the narrowing ``_referenced`` applies, so a hint never points at
agent/src/agent/grounding/policies.py:1328
↓ 3 callersFunction_known_config_keys
Config keys understood anywhere on the backtest path: schema fields plus whatever the engines, market hooks and loaders actually read.
agent/backtest/runner.py:1342
↓ 3 callersFunction_large_cap_ledger
A ledger holding a quote large enough to be written with separators.
agent/tests/test_agent_grounding.py:2445
↓ 3 callersFunction_ledger
(tmp_path)
agent/tests/test_grounding_unknown_single_refs.py:11
↓ 3 callersFunction_ledger
(tmp_path)
agent/tests/test_grounding_multi_derived_refs.py:11
↓ 3 callersFunction_ledger_with_invalidated_identity
A failed resolution leaves identity invalidated (#1622 identity slice).
agent/tests/test_grounding_registry.py:122
↓ 3 callersFunction_legacy_result
()
agent/tests/test_alpha_bench_horizon.py:227
↓ 3 callersFunction_legacy_result
()
agent/tests/test_alpha_bench_strict_cli.py:59
↓ 3 callersFunction_lens_ids
Return lens slugs for parametrization (filename stems).
agent/tests/test_investor_lenses_skill.py:77
↓ 3 callersFunction_liquidation_mark
Adverse price the liquidation check and the fill both use. Bar high for a short, low for a long -- mirroring the strict path's "adverse" conv
agent/backtest/engines/_market_hooks.py:551
↓ 3 callersFunction_list_13f_filings
List a filer's 13F-HR filings, newest first. Full-text search is preferred because it reports ``period_ending`` directly and reaches further
agent/src/tools/institutional_holdings_tool.py:569
↓ 3 callersFunction_live_server_config
Resolve the protected MCP server config for ``broker``. The config is read at boot from the user-side protected agent config file (never from
agent/cli/_legacy.py:3367
↓ 3 callersFunction_llm_timeout_seconds
Return the per-call LLM timeout in seconds (0/negative disables). A silent provider stall otherwise hangs the ReAct loop or the auto-compact
agent/src/agent/tuning.py:94
↓ 3 callersFunction_load_instrument_type_catalog
(cfg: EtoroConfig)
agent/src/trading/connectors/etoro/instruments.py:84
↓ 3 callersFunction_load_neonize
()
agent/src/channels/whatsapp.py:64
↓ 3 callersFunction_load_python_block
Load the first Python block from a named skill section.
agent/tests/test_social_media_intelligence_skill.py:20
↓ 3 callersFunction_load_universe_panel
Load OHLCV(+amount, +vwap) wide panel for the requested universe. Returns a dict keyed by panel column (open/high/low/close/volume/amount/vwap)
agent/src/tools/alpha_bench_tool.py:108
↓ 3 callersFunction_loader_class
(source: str, frames: dict[str, pd.DataFrame], calls: list[list[str]])
agent/tests/test_offline_benchmark.py:49
↓ 3 callersFunction_local_client
Return a TestClient that simulates a loopback caller.
agent/tests/test_openbb_bridge/test_routes.py:16
↓ 3 callersMethod_log_response_error
Log Matrix response errors — auth errors at ERROR level, rest at WARNING.
agent/src/channels/matrix.py:677
↓ 3 callersFunction_make_adj_df
Build the adjustment-factor frame tushare pairs with the bars above. The default doubles on the last bar, i.e. a 2-for-1 split, so a test can
agent/tests/test_tushare_loader.py:139
↓ 3 callersFunction_make_agent_json
(tmp_path: Path, server_name: str, *, port: int, **server_kwargs: Any)
agent/tests/test_mcp_streamable_http_integration.py:38
↓ 3 callersFunction_make_agent_json
(tmp_path: Path, server_name: str, *, port: int, **server_kwargs: Any)
agent/tests/test_mcp_sse_integration.py:34
↓ 3 callersFunction_make_channel
()
agent/tests/test_wecom_stream_id_continuity.py:12
↓ 3 callersFunction_make_channel
()
agent/tests/test_discord_stream_initial_chunking.py:36
↓ 3 callersFunction_make_channel
(*, rich_messages: bool, bot: _FakeBot)
agent/tests/test_telegram_stream_end_no_preview.py:96
↓ 3 callersMethod_make_headers
Build per-request headers (new UIN each call, matching reference).
agent/src/channels/weixin.py:249
↓ 3 callersFunction_make_minute_df
()
agent/tests/test_tushare_loader.py:262
↓ 3 callersFunction_make_oauth_config
Create a minimal MCPOAuthConfig-like object for testing.
agent/tests/test_mcp_specs_cache.py:58
↓ 3 callersFunction_make_qq_channel
(http: _FakeHttp)
agent/tests/test_url_target_security.py:110
↓ 3 callersFunction_make_relocating_anthropic_base
ChatAnthropic stand-in for langchain-anthropic >= 1.4 on anthropic >= 1. ``anthropic>=1`` dropped ``temperature`` from ``Messages.create``, so
agent/tests/test_llm.py:1100
↓ 3 callersFunction_make_run
(tmp_path: Path)
agent/tests/test_swarm_dag_gating.py:34
↓ 3 callersFunction_make_run
(tmp_path: Path)
agent/tests/test_swarm_cancel_mid_flight_worker.py:30
↓ 3 callersFunction_make_synthetic_event
Build a synthetic ``message.add`` event dict.
agent/src/channels/mochat.py:88
↓ 3 callersFunction_make_task
(task_id: str = "task-1")
agent/tests/test_swarm_retry_artifact_isolation.py:69
↓ 3 callersFunction_manifest_text
()
agent/tests/test_distribution_skill_manifest.py:19
↓ 3 callersFunction_manual
(closes: pd.DataFrame, weights: dict[str, float])
agent/tests/test_risk_xray_long_short.py:29
↓ 3 callersFunction_mapping_or_raw
(value: Any)
agent/src/trading/connectors/trading212/sdk.py:511
↓ 3 callersFunction_market_payload
()
agent/tests/test_grounding_release.py:43
↓ 3 callersMethod_markets
(*symbols)
agent/tests/test_symbol_search_tool.py:712
↓ 3 callersFunction_match_preset
Match user prompt to best preset using keyword scoring. Args: prompt: User's natural language prompt. Returns: Best matching
agent/src/tools/swarm_tool.py:354
↓ 3 callersMethod_merge_basic_fields
Merge fundamental columns from daily_basic API. Args: result: Existing OHLCV frames. codes: All requested codes.
agent/backtest/loaders/tushare.py:276
↓ 3 callersFunction_message
(role: str, content: str, status: str | None = None)
agent/tests/test_scheduled_delivery_wiring.py:38
↓ 3 callersFunction_message_field
(message: Any, *names: str)
agent/src/channels/whatsapp.py:111
↓ 3 callersFunction_messages
()
agent/tests/test_llm_cost_accounting.py:21
↓ 3 callersFunction_missing_fields
(cfg: OKXConfig)
agent/src/trading/connectors/okx/sdk.py:620
↓ 3 callersFunction_module_version
Build a content-addressed version tag for the module that produced a result. Hashes ``module``'s own source together with :mod:`.contracts`'s, si
agent/src/quantlib/valuation/artifact.py:541
↓ 3 callersFunction_msg_estimate_chars
Rough character size of a message for token budgeting. Sizes ``content`` plus ``reasoning_content`` plus every tool-call ``arguments`` payloa
agent/src/agent/context_compact.py:346
↓ 3 callersFunction_net_cash
(rows)
agent/tests/test_trade_journal_reversal_fees.py:31
↓ 3 callersFunction_net_proceeds
(fill: Any)
agent/backtest/engines/argentina_equity.py:380
↓ 3 callersFunction_new_llm_usage_summary
Create the run-scoped provider usage accumulator.
agent/src/agent/llm_usage.py:76
↓ 3 callersFunction_nodes
(presets)
agent/tests/test_preset_honesty.py:52
↓ 3 callersFunction_normal_5m
(day: str = _DAY, *, close: float = 10.20)
agent/tests/test_paper_trade_5m_engine.py:76
↓ 3 callersMethod_normalize
Normalize nonnegative weights to sum 1.
agent/backtest/optimizers/base.py:160
↓ 3 callersFunction_normalize_call_tool_result
Convert a FastMCP call result into the local JSON payload shape. Args: result: Parsed FastMCP tool result. Returns: Normaliz
agent/src/tools/mcp.py:1167
↓ 3 callersFunction_normalize_columns
( df: pd.DataFrame, col_map: dict[str, str], date_fmt: str | None, )
agent/backtest/loaders/local_loader.py:182
↓ 3 callersFunction_normalize_day
(value: str)
agent/src/tools/paper_trade/data_readiness.py:51
↓ 3 callersMethod_normalize_intent_notional
Stamp a single authoritative ``notional_usd`` onto the intent. Closes two bypasses (SPEC §4): * **H3** — an order carrying BOTH ``no
agent/src/live/order_guard.py:235
↓ 3 callersFunction_normalize_mcp_value
Unwrap a value from a remote MCP call into plain JSON-safe data. Remote connectors (e.g. Robinhood) return their payload as an instance of ``
agent/cli/_legacy.py:4740
↓ 3 callersFunction_normalize_preset_name
Normalize an explicit preset name and validate it resolves to a preset. Names in the static routing table are accepted as before. Names outside i
agent/src/tools/swarm_tool.py:398
↓ 3 callersMethod_normalize_target_name
(value: str)
agent/src/channels/slack.py:320
↓ 3 callersFunction_normalize_valuations
Coerce a valuation series to sorted ``(date, value)`` pairs. Args: valuations: Either a mapping of date to value, or a sequence of
agent/src/quantlib/performance.py:281
↓ 3 callersFunction_note_tokens
Citation fragments in a note: CJK character pairs and ASCII words of four letters or more. Pairs, because Chinese is not space-separated: "财报毛利率桥
agent/src/agent/grounding/policies.py:187
↓ 3 callersFunction_now_ms
Return the current wall-clock time in epoch milliseconds. Returns: Milliseconds since the Unix epoch.
agent/src/live/runtime/liveness.py:39
↓ 3 callersFunction_num
Coerce a Kite API field to float, tolerating None/empty strings.
agent/src/trading/connectors/zerodha/sdk.py:437
↓ 3 callersFunction_number
Return a wire-ready float, quantized as the connector path does. Args: value: A value already probed by :func:`_parse_decimal`, which pro
agent/src/portfolio/extraetf.py:927
↓ 3 callersFunction_oauth_provider
Build the OAuth provider an adapter would attach to its transport. Args: tmp_path: Pytest tmp dir used as the OAuth token cache root.
agent/tests/test_mcp_oauth_noninteractive.py:96
↓ 3 callersFunction_ok
(payload: dict[str, Any])
agent/src/tools/research_artifact_tool.py:12
↓ 3 callersMethod_ok
Render a success envelope as a JSON string. Args: market: Market label (e.g. ``"a_share"``, ``"us"``, ``"global"``).
agent/src/tools/stock_news_tool.py:414
↓ 3 callersFunction_ok_call_result
Build a CallToolResult that mimics a successful remote call. The adapter's normalizer copies ``data`` / ``structured_content`` / text content
agent/tests/test_swarm_m4_e2e.py:113
↓ 3 callersFunction_ok_page
One short page (< _MAX_PER_PAGE) so the loop breaks after one call.
agent/tests/test_okx_loader_bounded.py:27
↓ 3 callersFunction_ols_params
Fit an OLS model and return its coefficients as a positional array. ``statsmodels`` returns ``params`` as a pandas Series when handed pandas
agent/src/quantlib/timeseries.py:93
↓ 3 callersMethod_open_position
(self, engine: VietnamEquityEngine, entry_idx: int)
agent/tests/test_vietnam_equity_engine.py:97
↓ 3 callersFunction_opens
Opening fills as ``(symbol, bar, quantity)``; the run closes the book on its last bar.
agent/tests/test_plan_rejected.py:363
↓ 3 callersFunction_order_classification
Return ``(InstrumentType, AssetClass | None)`` for an order's mandate gate. Crypto connectors are unambiguous; multi-market equity connectors inf
agent/src/trading/service.py:682
↓ 3 callersFunction_order_error
Build a fail-closed error payload carrying profile/guard context.
agent/src/trading/connectors/okx/sdk.py:531
↓ 3 callersFunction_order_result
Interpret an ``order_send`` response, failing closed on any non-DONE retcode.
agent/src/trading/connectors/mt5/orders.py:369
↓ 3 callersMethod_output_columns
( self, schema: TableSchema, frame: pd.DataFrame, fields: Iterable[str] | None
agent/backtest/loaders/tushare_fundamentals.py:245
↓ 3 callersFunction_outside_universe_source
Declare one 5m UNIVERSE but order a held symbol, possibly outside it.
agent/tests/paper_trade_5m_fixtures.py:356
↓ 3 callersMethod_owns
(self, task: dict)
agent/src/tools/background_tools.py:187
↓ 3 callersFunction_panel
(n_dates: int = 30, n_codes: int = 10, seed: int = 0)
agent/tests/factors/test_factor_analysis_core.py:17
↓ 3 callersFunction_panel
( base: dict[str, np.ndarray], deps: set[str], mode: str, symbol: int = _SYMBOL )
agent/tests/factors/test_missing_bar_fabrication.py:129
↓ 3 callersFunction_panel
(close: pd.DataFrame)
agent/tests/factors/test_qlib158_cnt_nan_propagation.py:40
↓ 3 callersFunction_panels
(seed: int = 7)
agent/tests/quantlib/test_combination_single_ic_std.py:27
↓ 3 callersFunction_parse_bool
Parse a string (or ``None``) into a boolean. Truthy values (case-insensitive): ``"1"``, ``"true"``, ``"yes"``, ``"on"``. Everything else — in
agent/src/config/accessor.py:95
↓ 3 callersFunction_parse_date
Parse a date cell, using an explicit format when one is supplied. Args: raw: Raw cell text. date_format: ``strptime`` format, or
agent/src/entities/ingest.py:275
↓ 3 callersFunction_parse_decimal
Parse a German-formatted number, refusing anything ambiguous. A comma is the decimal separator and a period may only be a thousands separator
agent/src/portfolio/extraetf.py:787
↓ 3 callersFunction_parse_mandate
Build a :class:`Mandate` from a decoded JSON object (strict). Raises: KeyError: A required field is missing. TypeError: ``raw`` (
agent/src/live/mandate/store.py:73
↓ 3 callersMethod_parse_md_table
Parse a markdown table into a Feishu table element.
agent/src/channels/feishu.py:1142
↓ 3 callersFunction_parse_table
(lines: list[str])
agent/cli/ui/transcript.py:122
↓ 3 callersMethod_partial_response_file
(self, session_id: str, attempt_id: str)
agent/src/session/store.py:58
↓ 3 callersFunction_partition_styles
Partition Signal textStyle ranges across message chunks. ``split_message`` slices ``plain_text`` into pieces and drops at most one leading ``
agent/src/channels/signal.py:262
← previousnext →2,901–3,000 of 26,887, ranked by callers