MCPcopy Create free account

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

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

↓ 8 callersFunctionbuild_config
Resolve credentials atomically, then apply profile and region overlays. The public return type and call signature are unchanged. Credential sourc
agent/src/trading/connectors/longbridge/sdk.py:145
↓ 8 callersMethodcancel_current
Cancel the currently running AgentLoop for a session. Args: session_id: Session ID. Returns: Whether cancell
agent/src/session/service.py:413
↓ 8 callersFunctioncheck_connection
Check a connector profile without mutating broker state.
agent/src/trading/service.py:192
↓ 8 callersFunctioncheck_crypto_liquidation
Check if a crypto position should be liquidated. Fires when equity in the position (margin + unrealized) falls at or below the maintenance ma
agent/backtest/engines/_market_hooks.py:568
↓ 8 callersFunctioncheck_mandate
Evaluate one order intent against the mandate (fail-closed). Checks run in a fixed order and the first failure produces the verdict: exclude-
agent/src/live/enforcement.py:476
↓ 8 callersFunctioncmd_live_authorize
Bootstrap the OAuth handshake for a live broker channel (desktop only). Builds the broker's MCP tool wrappers, which forces a connection and — wh
agent/cli/_legacy.py:3448
↓ 8 callersFunctioncmd_live_status
Show auth state, active mandate, and halt state for live channels. Read-only: it loads the mandate via :func:`src.live.mandate.store.load_mandate
agent/cli/_legacy.py:3637
↓ 8 callersFunctioncompute_ic_series
Compute daily Spearman rank correlation (IC) between factor values and returns. Vectorised via ``rank().corrwith()`` (Spearman = Pearson on ranks
agent/src/factors/factor_analysis_core.py:8
↓ 8 callersFunctioncompute_importance
Compute importance via Ebbinghaus-inspired decay formula.
agent/src/memory/persistent.py:81
↓ 8 callersFunctioncompute_rebalance_notes
Summarize per-date weight changes in a target position frame. Args: target_pos: Target weights (dates x codes), e.g. the frame behind
agent/backtest/rebalance_notes.py:34
↓ 8 callersFunctioncreate
(service, **kwargs)
agent/tests/test_paper_accounts.py:51
↓ 8 callersFunctioncross_sectional_factor_returns
Regress one date's asset returns on their exposures. The coefficients are that date's factor returns. Weighting is by square-root market cap
agent/src/quantlib/factormodel.py:377
↓ 8 callersFunctiondingtalkEntry
(overrides: Record<string, unknown> = {})
frontend/src/components/settings/__tests__/ChannelSettings.test.tsx:55
↓ 8 callersFunctionestimate_tokens
Rough token count estimate (~4 chars/token). Args: messages: Message list. Returns: Estimated token count.
agent/src/agent/loop.py:122
↓ 8 callersFunctioneuropean_waterfall
Run a European whole-of-fund waterfall over an actual cash-flow series. Contributed capital and the distributable amount are read off the series,
agent/src/quantlib/fundmath.py:1241
↓ 8 callersFunctionevaluation_start_index
Return the first bar index that counts as performance. A long-lookback indicator needs history before the period the user asked about — an MA
agent/backtest/engines/base.py:175
↓ 8 callersMethodexecute
(self, **kwargs: Any)
agent/src/tools/br_market_data_tool.py:119
↓ 8 callersFunctionfactor_risk_decomposition
Decompose portfolio risk into systematic factor and idiosyncratic components. Implements the Euler homogeneous risk decomposition for multi-facto
agent/src/quantlib/factormodel.py:601
↓ 8 callersFunctionformat
(value: number)
frontend/src/pages/__tests__/Portfolio.test.tsx:469
↓ 8 callersFunctionformat_grounding_block
Render *grounding* as a markdown block ready to splice into a prompt. Returns the empty string if no symbol has any data — callers can use th
agent/src/swarm/grounding.py:231
↓ 8 callersMethodget_artifact
(self, artifact_id: str)
agent/src/strategy_store/adaptation.py:35
↓ 8 callersMethodget_attempt
Read an execution attempt. Args: session_id: Session ID. attempt_id: Attempt ID. Returns: The At
agent/src/session/store.py:230
↓ 8 callersMethodget_decay_history
Get decay snapshots for an artifact, newest first.
agent/src/strategy_store/store.py:161
↓ 8 callersFunctionget_runs_dir
Return the user-level directory holding run artifacts.
agent/src/config/paths.py:42
↓ 8 callersMethodget_status
Get status of all channels.
agent/src/channels/manager.py:640
↓ 8 callersFunctionhose_round_down
Quantize *price* down onto the HOSE tick grid.
agent/backtest/engines/vietnam_equity.py:111
↓ 8 callersFunctionincrement_daily_count
Persist ``broker``'s incremented count for today (atomic). Returns new count.
agent/src/live/daily_count.py:125
↓ 8 callersMethodis_duplicate
Check if a memory with similar content was recently written. Uses a 30-second sliding window to catch rapid-fire duplicates from retr
agent/src/memory/persistent.py:493
↓ 8 callersFunctionis_four_eyes_violation
Report whether *artifact* was both developed and approved by the same person. The four-eyes (maker-checker) principle requires the developer and
agent/src/strategy_store/models.py:195
↓ 8 callersFunctionis_runner_alive
Report whether a runner's heartbeat is fresh enough to call it alive. Args: runner_id: The runner to check. now_ms: Reference tim
agent/src/live/runtime/liveness.py:127
↓ 8 callersMethodlist
Load all hypotheses from storage.
agent/src/hypotheses/registry.py:370
↓ 8 callersMethodlist
Read every stored connection. Returns: The validated connections, or an empty list when no registry file exists yet.
agent/src/trading/connections.py:171
↓ 8 callersMethodlist
(self, *, zoo: str)
agent/tests/factors/test_bench_strict.py:497
↓ 8 callersMethodlist_public
(self)
agent/src/providers/custom_profiles.py:31
↓ 8 callersFunctionlive_root
Return the root directory for all live-channel state. Returns: ``<runtime_root>/live``. The directory is NOT created here; callers
agent/src/live/paths.py:23
↓ 8 callersMethodload_all
Load all tasks for the current run. Returns: List of SwarmTask sorted by ID.
agent/src/swarm/task_store.py:80
↓ 8 callersFunctionload_swarm_agent_config
Load the swarm-side AgentConfig using the M3 boot resolution order. This is the helper boot wiring (``mcp_server.py``, ``api_server.py``, CLI
agent/src/config/loader.py:204
↓ 8 callersFunctionmain
CLI entrypoint returning a process exit code.
agent/cli/_legacy.py:6640
↓ 8 callersFunctionmodified_duration
Semi-elasticity of price to yield, ``-(dP/dy)/P``. Args: face: Par/redemption amount. coupon_rate: Annual coupon rate as a decima
agent/src/quantlib/fixedincome.py:382
↓ 8 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:532
↓ 8 callersFunctionnormalize_mcp_tool_schema
Normalize remote MCP input schemas into OpenAI-compatible objects. Args: schema: Raw MCP input schema. Returns: A JSON Schem
agent/src/tools/mcp.py:458
↓ 8 callersMethodok
Return ``True`` while budget remains, latching ``exhausted`` when not.
agent/src/tools/institutional_holdings_tool.py:321
↓ 8 callersFunctionparametric_var
Value at Risk under a fitted normal distribution. Cheap and smooth, but it sees only a mean and a variance, so it misses fat tails. The direc
agent/src/quantlib/risk.py:180
↓ 8 callersFunctionparse_generic
Parse a generic CSV with lowercase English headers. Matches columns case-insensitively. Expected (any alias in parens): datetime (time/da
agent/src/tools/trade_journal_parsers.py:571
↓ 8 callersFunctionparse_settings
Validate untrusted Web settings against the local connection registry. Args: payload: Raw settings dict from the Web UI, CLI or a setting
agent/src/portfolio/config.py:144
↓ 8 callersFunctionparse_tonghuashun
Parse 同花顺 exports. Expected columns: 成交时间, 证券代码, 证券名称, 操作, 成交数量, 成交价格, 成交金额, 手续费, 印花税, 过户费.
agent/src/tools/trade_journal_parsers.py:346
↓ 8 callersFunctionparse_verdict_section
Parse the ``## Verdict`` tail of a terminal briefing. Returns: ``(parse_state, items)``. ``no_verdict_section`` when no such heading
agent/src/scheduled_research/verdict.py:103
↓ 8 callersFunctionpca_factors
Compress factor columns using PCA fitted independently at each time. Args: factors: At least two named time-by-asset panels at any input
agent/src/quantlib/neutralization.py:385
↓ 8 callersFunctionread_trade_activity
Round-trip exit dates and peak concurrency from ``trades.csv``. Returns ``(exit_dates, max_concurrent)``: * ``exit_dates`` — one date per cl
agent/src/strategy_discovery/run_artifacts.py:128
↓ 8 callersFunctionreconcile_after_restart
Turn a previous process's live records into explicit outcomes. Nothing is re-run and nothing is signalled. A record left ``running`` cannot b
agent/src/tools/background_store.py:219
↓ 8 callersFunctionregister_adaptation
Persist an adapted child through the strategy store. Returns the new id. ``parent_evidence`` and ``today`` are keyword-only and required so the
agent/src/strategy_store/adaptation.py:95
↓ 8 callersMethodrender
(self)
agent/cli/ui/rail.py:439
↓ 8 callersMethodrepair_provenance
Append a data note when the only defects are missing provenance words. Source and currency are known to the ledger, so naming them should not
agent/src/agent/grounding/release.py:511
↓ 8 callersMethodreplay
Replay buffered session events for reconnect recovery. Args: session_id: Session ID. last_event_id: Last event ID rec
agent/src/session/events.py:195
↓ 8 callersFunctionresolve_secid
Map a Vibe-Trading symbol to its Eastmoney secid. Supported suffixes: ``.SH`` / ``.SZ`` / ``.BJ`` (A-share), ``.HK`` (Hong Kong, code zero-pa
agent/backtest/loaders/eastmoney_client.py:221
↓ 8 callersFunctionresolve_window
Return the model's context window and where the number came from. Args: provider: Canonical provider name (``openai-codex``, ``deepseek``
agent/src/agent/context_budget.py:64
↓ 8 callersFunctionrun_pattern
Run chart pattern detection on OHLCV data in run_dir. Args: run_dir: Path to the run directory. patterns: Comma-separated pattern
agent/src/tools/pattern_tool.py:331
↓ 8 callersFunctionscale
Per-row L1 normalize so sum of absolute values equals ``a``. Rows whose abs-sum is 0 (or all-NaN) become NaN — never silent zero.
agent/src/factors/base.py:168
↓ 8 callersFunctionsearch_parallel
Search anonymously and return the existing web_search result envelope. Args: query: Validated search query. max_results: Validate
agent/src/tools/_parallel_search.py:17
↓ 8 callersMethodsend
Send attachments first, then text.
agent/src/channels/qq.py:272
↓ 8 callersMethodshould_transition
Determine if a status transition should occur. Args: current_status: Current artifact status. consecutive_signals: Re
agent/src/strategy_store/decay.py:161
↓ 8 callersFunctionsplit_sections
Map a markdown document to its heading structure. A section runs from its heading to the next heading of the same or shallower level, so aski
agent/src/agent/skills.py:230
↓ 8 callersFunctionstrip_local_prefix
Return the instrument symbol behind a ``local:`` routing prefix. ``local:AAPL.US`` asks for the user's own ``AAPL.US`` dataset. The prefix ch
agent/backtest/engines/_market_hooks.py:343
↓ 8 callersMethodto_dict
Serialize the session to a dictionary. Returns: A JSON-serializable dictionary.
agent/src/session/models.py:169
↓ 8 callersMethodtotal
Sum the signed amounts. Valuation marks such as NAV are excluded by default: adding a mark to settled cash would overstate what was a
agent/src/entities/cashflow.py:408
↓ 8 callersFunctiontranslate_cashflows
Convert flows in one or more currencies into ``rate_table``'s currency. Each flow is converted using the FX rate quoted on **that flow's own
agent/src/entities/cashflow.py:689
↓ 8 callersFunctionuiLocale
* Locale used by every Intl formatter on this page. The formatters live at * module scope (chart option builders need them outside React), so they re
frontend/src/pages/Portfolio.tsx:57
↓ 8 callersFunctionupdate_channel_section
Merge a channel section into the raw JSON agent config. Operates on the raw decoded dict only: unknown top-level keys, sibling channel sectio
agent/src/config/writer.py:51
↓ 8 callersFunctionvalidate_timezone_shape
Raise ``ValueError`` when *tz* is not ``None`` or a non-empty string. This is the persistence-level check: it deliberately does NOT resolve the
agent/src/scheduling/triggers.py:157
↓ 8 callersFunctionwith_security_warnings
Annotate and neutralize selected untrusted string fields in a payload. Every selected string field is (1) scanned for prompt-injection patterns
agent/src/security/scanner.py:177
↓ 8 callersFunctionwrite_heartbeat
Atomically record a runner's last-tick timestamp. Args: runner_id: The runner writing its heartbeat. now_ms: Timestamp to record,
agent/src/live/runtime/liveness.py:79
↓ 8 callersFunctionyear_fraction
Accrual factor between two dates under a named day-count convention. Args: start: Period start (accrual runs from this date, inclusive).
agent/src/quantlib/fixedincome.py:63
↓ 7 callersFunction_amended_cover
Render a cover page that declares an amendment, exactly as EDGAR nests it. Copied from DZ BANK's live 2020-09-30 amendments: ``isAmendment`` and
agent/tests/test_institutional_holdings_tool.py:108
↓ 7 callersFunction_archive_backtest_result
Copy a successful detached backtest into the active, reportable run. The model may choose another allowed run directory while iterating. The
agent/src/agent/tool_results.py:184
↓ 7 callersFunction_as_float
(df: pd.DataFrame)
agent/src/factors/base.py:73
↓ 7 callersFunction_baostock_socket_guard
Bound all baostock socket IO for the lifetime of one fetch.
agent/backtest/loaders/baostock_loader.py:126
↓ 7 callersFunction_bars
Create a dated OHLCV frame ending on the scanner target date.
agent/tests/test_shadow_scanner.py:41
↓ 7 callersFunction_bars
(index: pd.DatetimeIndex)
agent/tests/test_tushare_fundamentals_provider.py:403
↓ 7 callersFunction_bridge
(**overrides)
agent/tests/quantlib/valuation/test_dcf.py:719
↓ 7 callersFunction_build_rule_engines
Instantiate one sub-engine per market type detected in codes.
agent/backtest/engines/composite.py:29
↓ 7 callersFunction_cache_key
Digest for the result cache. Covers the window, the journal the profile was extracted from, the profile inputs (rules, markets) and the engin
agent/src/shadow_account/backtester.py:331
↓ 7 callersMethod_calc_weights
Equal risk contribution weights.
agent/backtest/optimizers/risk_parity.py:14
↓ 7 callersMethod_calc_weights
(self, ctx: dict[str, np.ndarray])
agent/tests/test_optimizer_causality.py:26
↓ 7 callersFunction_call
(monkeypatch, n, **kw)
agent/tests/test_get_market_data_size.py:37
↓ 7 callersMethod_channel_key
Normalize channel-like objects and ids to a stable string key.
agent/src/channels/discord.py:378
↓ 7 callersFunction_client
(tmp_path: Path, monkeypatch)
agent/tests/test_goal_api.py:14
↓ 7 callersFunction_close
(values: list[float])
agent/tests/test_alpha_bench_forward_returns.py:24
↓ 7 callersFunction_closes
()
agent/tests/test_risk_xray_long_short.py:18
↓ 7 callersFunction_compute_attribution
Attribute the delta between user's real PnL and shadow PnL. Decomposition (signed — positive means shadow would have earned more): noise
agent/src/shadow_account/backtester.py:648
↓ 7 callersFunction_compute_macd
MACD line, signal line, and histogram.
agent/src/tools/technical_indicator_tool.py:223
↓ 7 callersFunction_connect
(port: int)
agent/tests/test_baostock_socket_deadline.py:49
↓ 7 callersMethod_connect
Yield one short-lived connection; commit on success, rollback on error.
agent/src/strategy_discovery/evidence_store.py:218
↓ 7 callersFunction_contribution
Wrap one client contribution of ``size`` in a series. The amount is negated because ``CashFlow`` is holder-perspective: money the client pays
agent/tests/quantlib/test_performance.py:70
↓ 7 callersMethod_convert_chunk_to_generation_chunk
( # type: ignore[override] self, chunk: dict, default_chunk_class: type,
agent/src/providers/llm.py:724
↓ 7 callersFunction_daily
(rows: list[tuple[str, float]])
agent/tests/test_paper_trade_5m_engine.py:95
↓ 7 callersFunction_daily_tape
(*symbols: str, day_close: float = 1422.0)
agent/tests/test_paper_trade_5m_session.py:131
↓ 7 callersMethod_db
(self)
agent/src/pixel_agents/office.py:89
↓ 7 callersFunction_detail
(status, artifact_id)
agent/tests/test_sdm_governance_wiring.py:38
↓ 7 callersMethod_dispatch
(self, argv: list[str])
agent/tests/test_cli_live.py:116
↓ 7 callersFunction_drive
Run a sequence of tool calls through the loop's tool-call path. Args: agent: The loop under test. tool_name: Tool to invoke.
agent/tests/test_agent_loop_deterministic_cache.py:44
← previousnext →1,101–1,200 of 26,887, ranked by callers