MCPcopy Create free account

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

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

↓ 14 callersFunctionload_config
Load Trading 212 settings from ``~/.vibe-trading/trading212.json``.
agent/src/trading/connectors/trading212/sdk.py:139
↓ 14 callersMethodoptimize
Apply optimizer to position weights. Args: ret: Return matrix (dates x codes). pos: Raw signal positions.
agent/backtest/optimizers/base.py:36
↓ 14 callersFunctionreset_env_config
Clear the cached :class:`EnvConfig` singleton. Acquires the same lock used by :func:`get_env_config` so the reset is atomic with respect to c
agent/src/config/accessor.py:73
↓ 13 callersFunction_call
(path: Path, pages: str = "")
agent/tests/test_doc_reader.py:14
↓ 13 callersFunction_client
(tmp_path: Path, monkeypatch)
agent/tests/test_api_live_runtime.py:25
↓ 13 callersFunction_detect_market
Infer market type from symbol format. Args: code: Ticker / symbol string. Returns: Market type (a_share/us_equity/hk_equity/
agent/backtest/engines/_market_hooks.py:68
↓ 13 callersMethod_fetch_one
(code: str = code)
agent/backtest/loaders/tushare.py:108
↓ 13 callersFunction_is_china_futures
Check whether a futures code belongs to a Chinese exchange. Recognises two forms: 1. ``<product><delivery>.<exchange>`` where exchange is o
agent/backtest/engines/_market_hooks.py:84
↓ 13 callersFunction_job
( job_id: str = "job-001", *, schedule: str = "1000", next_run_at: int = 0, status: JobSta
agent/tests/test_scheduled_research_executor.py:28
↓ 13 callersFunction_make_config
(**overrides: Any)
agent/tests/test_mcp_client_adapter.py:70
↓ 13 callersFunction_mandate
(expires_in_days: int = 30, **caps_overrides: Any)
agent/tests/test_mandate_enforcement.py:93
↓ 13 callersFunction_write_config
( path, *, enabled: bool = True, api_key: str = "sk_test", mode: str = "paid", )
agent/tests/test_qveris_loader.py:71
↓ 13 callersMethoddelete
Remove a job by id. Args: job_id: Identifier of the job to remove. Returns: ``True`` when the job was found
agent/src/scheduled_research/store.py:187
↓ 13 callersMethodreconcile_run
Single source of truth for "what does this run actually look like". Three layered transforms, applied in order to ``run``: 1. **Hydr
agent/src/swarm/store.py:362
↓ 13 callersFunctionrun_bench_strict
Strict-mode bench: like ``run_bench`` but with mandatory random control. Args: zoo: Zoo id (e.g. ``alpha101``, ``gtja191``, ``qlib158``,
agent/src/factors/bench_runner_strict.py:299
↓ 13 callersMethodsave_task
Save or overwrite task state. Args: task: SwarmTask instance.
agent/src/swarm/task_store.py:47
↓ 13 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:60
↓ 12 callersFunction_host_validate_path_param
(value: str, kind: str)
agent/src/api/sessions_routes.py:309
↓ 12 callersFunction_make_equity
Create a synthetic equity curve.
agent/tests/test_validation.py:55
↓ 12 callersFunction_make_registry
(tmp_path: Path)
agent/tests/test_cli_hypothesis.py:18
↓ 12 callersMethod_run_sync
Run _sync_provider_env with a clean env and return relevant keys.
agent/tests/test_llm.py:83
↓ 12 callersFunction_trade
( symbol: str = "X", pnl: float = 100.0, direction: int = 1, exit_reason: str = "signal",
agent/tests/test_metrics.py:31
↓ 12 callersFunctioncalc_metrics
Full set of performance metrics. Args: equity_curve: Equity time series (index=timestamp, values=equity). trades: Completed round
agent/backtest/metrics.py:151
↓ 12 callersMethodclear
Clear all issued tokens.
agent/src/channelsui/gateway_services.py:44
↓ 12 callersMethodcompute
Lazy-import the alpha module and run its ``compute(panel)``. Raises: KeyError: alpha_id unknown. SkipAlpha: required
agent/src/factors/registry.py:321
↓ 12 callersMethodfetch
Return preloaded rows for requested codes.
agent/backtest/runner.py:941
↓ 12 callersMethodfind_relevant
Keyword search across all memory entries. Scoring: metadata_hits * 2.0 + body_hits * 1.0. Args: query: Search query.
agent/src/memory/persistent.py:238
↓ 12 callersMethodformat_assistant_tool_calls
Format an assistant tool_calls message, preserving thinking text. Args: tool_calls: List of tool call objects. conten
agent/src/agent/context.py:278
↓ 12 callersMethodfrom_mapping
Build a config from a JSON-like mapping, normalizing the profile.
agent/src/trading/connectors/okx/sdk.py:76
↓ 12 callersFunctionget_provider_capabilities
Return the capability record for a provider/model pair. Args: provider: Configured provider name. model: Configured model name, u
agent/src/providers/capabilities.py:156
↓ 12 callersMethodindex_session
(self, session_id: str, title: str)
agent/tests/test_session_service_mcp.py:16
↓ 12 callersMethodlist
Return alpha IDs matching the (optional) filters.
agent/src/factors/registry.py:264
↓ 12 callersFunctionprofile_by_id
Resolve a profile id or the saved selected profile. Args: profile_id: Optional explicit profile id. Returns: Matching profil
agent/src/trading/profiles.py:50
↓ 12 callersFunctionresolve_loader
Return the first *available* loader instance for *market*. Walks the fallback chain and returns the first loader whose ``is_available()`` ret
agent/backtest/loaders/registry.py:141
↓ 12 callersFunctionresolve_min_interval
Resolve a per-provider minimum request interval from the environment. Args: env_name: Env var carrying an override in seconds (e.g.
agent/backtest/loaders/_http.py:106
↓ 12 callersFunctionrun_bench
Run a bench end-to-end and return the API-shaped summary. Args: zoo: Zoo id (e.g. ``gtja191``, ``alpha101``, ``qlib158``). univer
agent/src/factors/bench_runner.py:130
↓ 11 callersMethod_emit
Fire an event via the callback.
agent/src/agent/loop.py:1579
↓ 11 callersFunction_fake_run_bench
Build a ``run_bench`` double returning canned rows for the ``only`` ids.
agent/tests/factors/test_alpha_compare.py:137
↓ 11 callersMethod_instance
(self, model: str = "kimi-k2-0905-preview")
agent/tests/test_kimi_reasoning_content.py:478
↓ 11 callersFunction_is_interactive_invocation
Decide whether this invocation should drive the interactive loop. Interactive entry requires: * Both stdin and stdout are TTYs (no piped / r
agent/cli/main.py:216
↓ 11 callersFunction_make_trades
Create TradeRecord list from PnL values.
agent/tests/test_validation.py:30
↓ 11 callersFunction_propose
Run the propose tool and return the parsed proposal payload.
agent/tests/test_consent_commit.py:54
↓ 11 callersFunction_seed
Seed three hypotheses spanning multiple statuses; return their ids.
agent/tests/test_cli_hypothesis.py:23
↓ 11 callersFunction_store
(tmp_path: Path)
agent/tests/test_scheduled_research_executor.py:24
↓ 11 callersFunction_tokenize
Split text into searchable tokens. ASCII words >= 3 chars + individual characters from non-Latin scripts listed in ``_NON_LATIN_SCRIPT_RANGES
agent/src/memory/persistent.py:68
↓ 11 callersFunctionget_json
Issue a throttled Eastmoney GET and decode the body as JSON. Args: url: Fully-qualified Eastmoney endpoint URL. params: Query par
agent/backtest/loaders/eastmoney_client.py:79
↓ 11 callersMethodload
Load the persisted jobs. A missing store (never written) is the *only* clean empty result. A store that exists but fails to parse is
agent/src/live/runtime/jobstore.py:98
↓ 11 callersFunctionredact_internal_paths
Replace internal root prefixes with '<redacted>', keep relative tail.
agent/src/tools/redaction.py:129
↓ 11 callersFunctionredact_payload
Recursively redact sensitive keys in a structured payload. Walks dicts and lists; any dict value whose key :func:`is_sensitive_arg` is replac
agent/src/tools/redaction.py:180
↓ 11 callersMethodrender
Build the Rich renderable shown while the run is active.
agent/cli/_legacy.py:748
↓ 11 callersFunctionsafe_run_dir
Validate a run directory used by generated-code tools. Args: p: User/LLM-supplied run directory. `~` expansion is supported. Returns
agent/src/tools/path_utils.py:313
↓ 11 callersFunctionsafe_user_path
Validate a user-supplied broker/export file path. Args: p: User-supplied path. `~` expansion is supported. Returns: Absolute
agent/src/tools/path_utils.py:281
↓ 11 callersFunctionscan_today_signals
Return a list of {symbol, market, rule_id, reason} matches. Args: profile: ShadowProfile holding the rules. target_date: ISO "YYY
agent/src/shadow_account/scanner.py:22
↓ 11 callersFunctionscenario
()
agent/tests/test_scheduled_research_executor.py:54
↓ 11 callersMethodto_dict
Serialize the session to a dictionary. Returns: A JSON-serializable dictionary.
agent/src/session/models.py:57
↓ 10 callersFunction_args
(**kw: Any)
agent/tests/factors/test_alpha_compare.py:158
↓ 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:282
↓ 10 callersFunction_generate_signals
Render + load + execute a SignalEngine against a data_map.
agent/tests/test_shadow_account.py:1301
↓ 10 callersMethod_get_request_payload
Re-inject reasoning_content and normalize assistant content. LangChain strips ``reasoning_content`` when serializing AIMessages
agent/src/providers/llm.py:251
↓ 10 callersFunction_host
Return the host ``api_server`` module for shared deps and monkeypatched symbols.
agent/src/api/live_routes.py:179
↓ 10 callersFunction_host_get_session_service
()
agent/src/api/sessions_routes.py:305
↓ 10 callersFunction_install_session
(monkeypatch, responses: list[_FakeResponse])
agent/tests/test_qveris_loader.py:114
↓ 10 callersFunction_intent
(notional=500.0, qty=None, asset=AssetClass.US_EQUITY)
agent/tests/test_sdk_order_gate.py:85
↓ 10 callersFunction_iso
(dt: datetime)
agent/tests/test_swarm_status_hydration.py:41
↓ 10 callersFunction_job
(jid: str, next_run_at: int, schedule: str = "interval:1000")
agent/tests/test_runtime_scheduler.py:29
↓ 10 callersFunction_json_result
(payload: dict[str, Any])
agent/src/tools/trading_connector_tool.py:31
↓ 10 callersFunction_metrics
(ic_mean: float, ic_std: float, ir: float, pos: float = 0.5, n: int = 200)
agent/tests/factors/test_alpha_compare.py:154
↓ 10 callersFunction_profile
(rule: ShadowRule)
agent/tests/test_shadow_account.py:1356
↓ 10 callersFunction_safe_attr
(obj: Any, name: str, default: Any = None)
agent/src/channels/whatsapp.py:118
↓ 10 callersMethod_safe_send_to
Send a raw frame to one connection, cleaning up on ConnectionClosed.
agent/src/channels/websocket.py:862
↓ 10 callersFunction_us_engine
(**overrides)
agent/tests/test_global_equity_engine.py:27
↓ 10 callersFunction_wire
(monkeypatch: pytest.MonkeyPatch, id_to_zoo: dict[str, str], fake_bench: Any)
agent/tests/factors/test_alpha_compare.py:167
↓ 10 callersFunctionbuild_swarm_registry
Build a per-worker registry that merges local + remote MCP tools. Swarm workers receive a strict whitelist (``agent_spec.tools``). This build
agent/src/tools/__init__.py:267
↓ 10 callersFunctioncategorise_strict
Bucket a strict bench row into one of four ``StrictCategory`` values. Required keys on ``row``: - ``alpha_t_full`` (float) - ``al
agent/src/factors/bench_runner_strict.py:242
↓ 10 callersFunctiondue_now
Pure core: is ``trigger`` due at ``now_ms``. Deterministic — reads no clock; all inputs are arguments. * INTERVAL: due when ``(now_ms - epoc
agent/src/live/runtime/triggers.py:259
↓ 10 callersFunctionfetch
()
agent/tests/test_loader_retry_helpers.py:235
↓ 10 callersFunctionfn
()
agent/tests/test_loader_retry_helpers.py:62
↓ 10 callersMethodget_goal
Return a goal by id.
agent/src/goal/store.py:451
↓ 10 callersMethodis_available
Always available (public API, no auth).
agent/backtest/loaders/okx.py:45
↓ 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:17
↓ 10 callersFunctionreconcile
Reconcile broker truth against the durable last-known state. Pulls the broker's positions, balance, and open orders through the injected READ
agent/src/live/runtime/reconcile.py:271
↓ 10 callersFunctionretry_with_budget
Call ``fn`` with a bounded retry budget on declared transient errors. Between attempts sleeps ``min(backoff[attempt], remaining_budget)`` so a
agent/backtest/loaders/base.py:165
↓ 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 callersFunctionsigned_power
``sign(df) * |df|**p`` — preserves sign; never produces complex output.
agent/src/factors/base.py:298
↓ 10 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:155
↓ 10 callersMethodupdate_status
Update a goal status with stale-goal and completion validation.
agent/src/goal/store.py:697
↓ 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:89
↓ 9 callersFunction_client
()
agent/tests/test_alpha_compare_api.py:28
↓ 9 callersFunction_connection
(value: Any)
agent/src/tools/trading_connector_tool.py:35
↓ 9 callersFunction_first
(row: Mapping[str, Any], names: tuple[str, ...], default: Any = None)
agent/src/trading/connectors/futu/sdk.py:817
↓ 9 callersFunction_guard
(adapter, **kwargs)
agent/tests/test_mandate_enforcement.py:268
↓ 9 callersFunction_hk_engine
(**overrides)
agent/tests/test_global_equity_engine.py:33
↓ 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_factory
(state: dict[str, Any])
agent/tests/test_mcp_client_adapter.py:63
↓ 9 callersFunction_make_hypothesis
(**overrides)
agent/tests/test_autopilot_phase3.py:36
↓ 9 callersFunction_make_job
( job_id: str = "job-001", prompt: str = "analyse AAPL momentum", schedule: str = "60000", )
agent/tests/test_scheduled_research_store.py:23
↓ 9 callersFunction_mandate
(*, max_order=1_000_000.0, assets=(AssetClass.US_EQUITY,), instruments=(InstrumentType.EQUITY,))
agent/tests/test_sdk_order_gate.py:50
← previousnext →101–200 of 8,953, ranked by callers