MCPcopy Create free account

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

Functions16,853 in github.com/HKUDS/Vibe-Trading

↓ 13 callersFunctionfit_records
Serialize the largest whole-record page of ``records[offset:]`` that fits. Args: records: All available records, newest first by the call
agent/src/tools/_result_paging.py:23
↓ 13 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:81
↓ 13 callersFunctionlist_playbooks
Load every available playbook, sorted by slug. A slug found in an earlier directory shadows the same slug later, so a user file overrides the
agent/src/scheduled_research/playbooks.py:352
↓ 13 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
↓ 13 callersFunctionload_preset
Load a YAML preset by name (user directory first, then bundled). Args: name: Preset name (without .yaml extension). Returns:
agent/src/swarm/presets.py:81
↓ 13 callersFunctionmigrate_legacy_state
Move legacy code-relative state directories under the runtime root. Idempotent: once a legacy entry has been moved (or was never there), late
agent/src/config/migrate.py:114
↓ 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:364
↓ 13 callersMethodregister_artifact
Register a new artifact, assigning an ID and timestamps. Returns: The assigned ``artifact_id``.
agent/src/strategy_store/store.py:161
↓ 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:317
↓ 13 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:344
↓ 13 callersMethodsave_task
Save or overwrite task state. Args: task: SwarmTask instance.
agent/src/swarm/task_store.py:47
↓ 13 callersMethodstart
Start the QQ bot with auto-reconnect loop.
agent/src/channels/qq.py:194
↓ 13 callersFunctionvalidate_ohlc
Drop, flag, or reject bars that violate OHLC invariants. Loaders only drop NaN rows, so structurally dirty bars — ``high < low``, a non-posit
agent/backtest/loaders/base.py:50
↓ 12 callersFunction_bars
(closes)
agent/tests/test_alpha_bench_qfq.py:24
↓ 12 callersFunction_calc_options_metrics
Calculate options backtest metrics. Args: equity: Equity series. initial_cash: Initial capital. trades: List of trade rec
agent/backtest/engines/options_portfolio.py:554
↓ 12 callersFunction_client
(tmp_path: Path, monkeypatch)
agent/tests/test_factor_api.py:15
↓ 12 callersFunction_compute_with_fixture_windows
Shared call shape: fixture-engineered windows + pinned today.
agent/tests/test_strategy_discovery_harness.py:309
↓ 12 callersFunction_create_market_engine
Create the appropriate market engine based on data source and market type. Routing priority: 1. Detect market type from symbol patterns (fu
agent/backtest/runner.py:1263
↓ 12 callersMethod_ctx
(self, n_assets: int = 5, seed: int = 42)
agent/tests/test_turnover_aware_optimizer.py:153
↓ 12 callersMethod_fetch_daily_frame
Fetch and normalize one daily OHLCV frame, routing by symbol type.
agent/backtest/loaders/tushare.py:207
↓ 12 callersMethod_get_request_payload
(self, *args: object, **kwargs: object)
agent/tests/test_llm.py:394
↓ 12 callersFunction_install_session
(monkeypatch, responses: list[_FakeResponse])
agent/tests/test_qveris_loader.py:115
↓ 12 callersFunction_is_error_result
Did a tool call return a top-level error envelope? Parses the result as JSON and checks for a top-level ``status == "error"``. Also treats ``
agent/src/swarm/worker.py:1045
↓ 12 callersFunction_make_registry
(tmp_path: Path)
agent/tests/test_cli_hypothesis.py:18
↓ 12 callersFunction_mandate
( *, max_order=1_000_000.0, max_trades=100, assets=(AssetClass.US_EQUITY,), instruments=(I
agent/tests/test_sdk_order_gate.py:70
↓ 12 callersFunction_market
Normalize one gamma market through the tool and return the record.
agent/tests/test_prediction_market_tool.py:168
↓ 12 callersFunction_patch_gate
(monkeypatch, *, mandate, halted=False)
agent/tests/test_sdk_order_gate.py:103
↓ 12 callersFunction_records
Normalize a Futu data payload to a list of row dicts. Handles a pandas DataFrame (via ``to_dict('records')``), an existing list of dicts, a s
agent/src/trading/connectors/futu/sdk.py:1094
↓ 12 callersFunction_rendered_prompt
()
agent/tests/test_agent_output_discipline.py:46
↓ 12 callersFunction_tokenize
Split text into searchable tokens (ASCII >=2 chars + non-Latin chars).
agent/src/memory/persistent.py:149
↓ 12 callersFunction_trade
( symbol: str = "X", pnl: float = 100.0, direction: int = 1, exit_reason: str = "signal",
agent/tests/test_metrics.py:34
↓ 12 callersFunctionar1
Generate a mean-zero AR(1) series, the discrete analogue of an OU process. Args: phi: Persistence coefficient; |phi| < 1 gives a stationa
agent/tests/quantlib/test_timeseries.py:46
↓ 12 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
↓ 12 callersMethodclear
Clear all issued tokens.
agent/src/channelsui/gateway_services.py:44
↓ 12 callersMethodclose
Close the database connection.
agent/src/memory/search_index.py:447
↓ 12 callersMethodconnect
()
agent/src/channels/mochat.py:416
↓ 12 callersMethoddisconnect
()
frontend/src/tests/setup.ts:13
↓ 12 callersMethodfetch
Return preloaded rows for requested codes.
agent/backtest/runner.py:1594
↓ 12 callersMethodfocus
()
frontend/src/components/chat/Composer.tsx:49
↓ 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:384
↓ 12 callersMethodget
(self, alpha_id)
agent/tests/test_strategy_discovery_facade.py:116
↓ 12 callersMethodindex_session
(self, session_id: str, title: str)
agent/tests/test_session_tool_trail.py:18
↓ 12 callersMethodis_available
Probe public candles with a short timeout (honours proxy env).
agent/backtest/loaders/okx.py:109
↓ 12 callersMethodregister
Register a tool.
agent/src/agent/tools.py:62
↓ 12 callersFunctionrender_verdict
Render a PASS/FAIL verdict from per-point verification results. Each result with a ``fetched_value`` is judged against the reported value at
agent/src/tools/report_audit_tool.py:265
↓ 12 callersFunctionresidual_value
Unrealised NAV of the fund at its most recent mark. Only the latest valuation record counts. Earlier marks are stale by definition, and summi
agent/src/quantlib/fundmath.py:661
↓ 12 callersMethodrun_backtest
(self, config, loader, signal_engine, path, **kwargs)
agent/tests/test_ui_services.py:221
↓ 12 callersFunctionrun_worker
Run one worker task, releasing the per-task LLM client on exit. Builds a fresh :class:`ChatLLM` for the task and guarantees it is closed even
agent/src/swarm/worker.py:409
↓ 12 callersMethodstart_run
Start a swarm run. Returns immediately, execution happens in background. Args: preset_name: YAML preset name to execute.
agent/src/swarm/runtime.py:90
↓ 12 callersMethodsubmit
(prompt: string)
frontend/src/components/chat/Composer.tsx:50
↓ 12 callersFunctionthrottled_get
GET ``url`` after waiting out the per-host minimum interval. Args: url: Fully-qualified request URL. host_key: Throttle/session b
agent/backtest/loaders/_http.py:141
↓ 12 callersFunctionuseChartLifecycle
( ref: RefObject<HTMLDivElement | null>, buildOption: () => EChartsCoreOption, deps: readonly unknown[],
frontend/src/hooks/useChartLifecycle.ts:18
↓ 11 callersFunction_assert_strict_json
(payload: dict)
agent/tests/test_risk_xray.py:27
↓ 11 callersFunction_base_manifest_kwargs
()
agent/tests/test_governance.py:79
↓ 11 callersFunction_bold_row
Bold every cell in one worksheet row (typically a header row).
agent/src/quantlib/valuation/artifact.py:1011
↓ 11 callersFunction_build_dcf_artifact
(inputs: dict | None = None, *, generated_at: datetime = FIXED_TIME)
agent/tests/quantlib/valuation/test_artifact.py:112
↓ 11 callersMethod_calc_margin
Margin (collateral) required for a position. ``abs(price)`` so collateral stays positive when the entry price is negative; for the us
agent/backtest/engines/base.py:640
↓ 11 callersFunction_client
()
agent/tests/test_options_routes.py:28
↓ 11 callersFunction_composite
(**overrides)
agent/tests/test_composite_vietnam_rules.py:34
↓ 11 callersFunction_create_memory_file
Helper to create a memory file with extended frontmatter.
agent/tests/test_memory_gc.py:29
↓ 11 callersFunction_df
(records: list[TradeRecord])
agent/tests/test_trade_journal.py:56
↓ 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 callersFunction_fetch
Run the tool against a mocked companyfacts payload and return its periods.
agent/tests/test_sec_period_frames.py:45
↓ 11 callersFunction_guard
(adapter, **kwargs)
agent/tests/test_mandate_enforcement.py:269
↓ 11 callersFunction_host
Return the host ``api_server`` module for shared deps and monkeypatched symbols.
agent/src/api/live_routes.py:330
↓ 11 callersFunction_host_get_session_service
()
agent/src/api/sessions_routes.py:309
↓ 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:219
↓ 11 callersFunction_job
(**overrides)
agent/tests/test_scheduled_delivery_outbox.py:42
↓ 11 callersFunction_make_kline_df
Build a minimal Futu kline DataFrame mirroring request_history_kline output.
agent/tests/test_futu_loader.py:61
↓ 11 callersMethod_make_loader
(self)
agent/tests/test_tushare_loader.py:154
↓ 11 callersFunction_oracle_resolved_market
A market the oracle finalized, with the payout price pinned on "No".
agent/tests/test_prediction_market_tool.py:107
↓ 11 callersMethod_place
(self, fake: FakeMT5, **kwargs: Any)
agent/tests/test_mt5_connector.py:571
↓ 11 callersFunction_read
Return a README's text. Args: name: File name relative to the repository root. Returns: The file contents.
agent/tests/test_readme_counts.py:73
↓ 11 callersFunction_rec
(dt: str, symbol: str, side: str, qty: float, price: float, fee: float = 0.0)
agent/tests/test_trade_journal.py:42
↓ 11 callersFunction_register
(reg, **kwargs)
agent/tests/test_sdm_governance_wiring.py:32
↓ 11 callersFunction_require
Import an optional backend module or raise an actionable ImportError. Args: module_path: Dotted module to import, e.g. ``"statsmodels.tsa
agent/src/quantlib/timeseries.py:67
↓ 11 callersFunction_require_series
Reject anything that is not a ``CashFlowSeries``. Args: series: Candidate value supplied by the caller. name: Parameter name to q
agent/src/quantlib/fundmath.py:173
↓ 11 callersFunction_resolve_provider_config
Resolve base_url, api_key, model from the configured LLM provider. Provider credentials use dynamically-named env vars from :func:`provider_e
agent/src/tools/ocr/llm_vision_ocr.py:109
↓ 11 callersFunction_route
Build a throttled_get_json side_effect routing by endpoint.
agent/tests/test_tickerall_loader.py:52
↓ 11 callersFunction_row
(strategy_id="alpha_zoo:a1", regime="bear_market", trades=12, **overrides)
agent/tests/test_strategy_discovery_store.py:49
↓ 11 callersFunction_row
(**overrides: Any)
agent/tests/factors/test_bench_strict.py:123
↓ 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_delivery_outbox.py:38
↓ 11 callersFunction_to_yfinance_symbol
Convert project symbols into yfinance symbols. Args: code: Project symbol, for example ``AAPL.US``, ``700.HK``, or ``TD.TO``.
agent/backtest/loaders/yfinance_loader.py:51
↓ 11 callersFunction_unwrap
Return the data payload from a Futu ``(ret_code, data[, page_key])`` tuple. Futu read calls return ``(ret_code, data)``; ``request_history_kline`
agent/src/trading/connectors/futu/sdk.py:1071
↓ 11 callersFunction_yahoo_quotes
()
agent/tests/test_symbol_search_tool.py:55
↓ 11 callersMethodallow
Record a hit for ``key`` and report whether it stays within budget.
agent/src/api/system_routes.py:92
↓ 11 callersMethodappend_event
Append an event to events.jsonl. Args: run_id: Run identifier. event: Event to append. Raises: F
agent/src/swarm/store.py:246
↓ 11 callersFunctionapply_adv_capacity
Cap each name's trade at a fraction of its average daily traded value. Args: target_weights: Desired weights by symbol, shorts negative.
agent/backtest/factor_costs.py:160
↓ 11 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:293
↓ 11 callersFunctioncode_currency
Return the currency a symbol settles in. Args: code: Ticker / symbol string. Returns: A currency code such as ``"CNY"``. A f
agent/backtest/engines/_market_hooks.py:93
↓ 11 callersFunctionexpiry_payoff
Calculate an expiry payoff curve and analytic risk summary. Premiums are pinned at entry. An explicit per-share premium wins over the Black-S
agent/backtest/options_payoff.py:274
↓ 11 callersFunctionfit_markov_regime
Fit a Markov regime-switching model and label the current regime. A GARCH model says how volatile tomorrow is. This says *which state the mar
agent/src/quantlib/timeseries.py:387
↓ 11 callersFunctionimplied_volatility
Invert Black-Scholes for volatility, Newton first then bisection. Seeds with the Brenner-Subrahmanyam at-the-money approximation ``sigma_0 =
agent/src/quantlib/options.py:341
↓ 11 callersMethodinject
Return ``user_message`` prefixed with a formatted context block. Args: request: The parsed ``openbb_ai.models.QueryRequest`` inst
agent/src/openbb_bridge/context_injector.py:81
↓ 11 callersFunctionks_pme
Kaplan-Schoar public market equivalent. Every contribution and distribution is grown to a single common date (``as_of``) using the *public in
agent/src/quantlib/fundmath.py:1468
↓ 11 callersFunctionlist_profiles
Return built-in trading connector profiles.
agent/src/trading/profiles.py:49
↓ 11 callersMethodlist_tools
(self)
agent/tests/test_swarm_m4_e2e.py:60
↓ 11 callersFunctionload_constraints
Build the constraint list from ``config['constraints']`` (empty if unset).
agent/backtest/constraints.py:170
← previousnext →301–400 of 16,853, ranked by callers