Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/HKUDS/Vibe-Trading
/ functions
Functions
16,853 in github.com/HKUDS/Vibe-Trading
⨍
Functions
16,853
◇
Types & classes
2,089
↳
Endpoints
112
↓ 11 callers
Function
monte_carlo_test
Shuffle trade PnL order to test path significance. Null hypothesis: the observed Sharpe / max-drawdown is no better than a random ordering of
agent/backtest/validation.py:29
↓ 11 callers
Function
nelson_siegel
Nelson-Siegel zero-rate curve. Args: tau: Maturity or maturities in years. beta0: Level factor; the asymptotic long rate.
agent/src/quantlib/fixedincome.py:549
↓ 11 callers
Function
normalise_option_type
Fold an option-type string to ``"call"`` or ``"put"``. Public because callers that *store* an option type must fold it with the same rule the
agent/src/quantlib/options.py:67
↓ 11 callers
Method
observe
()
frontend/src/tests/setup.ts:11
↓ 11 callers
Function
parse_file
End-to-end: load file, detect format, parse. Args: path: File path. Returns: (format_name, records). Falls back to generic i
agent/src/tools/trade_journal_parsers.py:554
↓ 11 callers
Function
reconcile
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:275
↓ 11 callers
Method
recovery_action
Decide the next safe read-only recovery step for a rejected draft. Returns ``search_symbol`` when instrument identity is unresolved and
agent/src/agent/grounding.py:1355
↓ 11 callers
Function
redact_text
Scrub credential-shaped values from a free-form string. Used for plain-text tool results, shell output, error messages and log lines where :f
agent/src/tools/redaction.py:422
↓ 11 callers
Function
resolve_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:164
↓ 11 callers
Function
retry_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:184
↓ 11 callers
Function
run_shadow_backtest
Drive a multi-market backtest from a ShadowProfile. Markets are backtested per settlement currency: the composite engine refuses a mixed-curr
agent/src/shadow_account/backtester.py:163
↓ 11 callers
Function
safe_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:312
↓ 11 callers
Function
scan_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 callers
Method
search
Full-text search with FTS5 MATCH. Args: query: User search query. max_results: Maximum results to return. Re
agent/src/memory/search_index.py:252
↓ 11 callers
Function
split_message
Split content into chunks within max_len, preferring line breaks. Args: content: The text content to split. max_len: Maximum leng
agent/src/channels/utils.py:53
↓ 11 callers
Function
useThemeDark
()
frontend/src/lib/theme-store.ts:25
↓ 11 callers
Function
wacc
Build the weighted average cost of capital. ``Re`` is CAPM plus two optional additive premiums; ``Rd`` is the pretax cost of debt shielded by
agent/src/quantlib/valuation/dcf.py:372
↓ 10 callers
Function
_args
(**kw: Any)
agent/tests/factors/test_alpha_compare.py:158
↓ 10 callers
Function
_brief
Run read-mode against a single mocked response and return the envelope. Args: paper_ids: Ids to request. response: Mocked ``throt
agent/tests/test_research_papers_tool.py:184
↓ 10 callers
Function
_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:384
↓ 10 callers
Method
_calc_weights
SLSQP weights for the penalized objective; updates turnover state.
agent/backtest/optimizers/turnover_aware.py:105
↓ 10 callers
Function
_client
(tmp_path: Path, monkeypatch: pytest.MonkeyPatch)
agent/tests/test_attribution_api.py:28
↓ 10 callers
Function
_create_memory_file
Helper to create a memory file with extended frontmatter.
agent/tests/test_memory_lifecycle.py:34
↓ 10 callers
Function
_dz_chain
Build the DZ BANK original / RESTATEMENT / NEW HOLDINGS chain.
agent/tests/test_institutional_holdings_tool.py:257
↓ 10 callers
Function
_executor
(store, *, reader=None, sender=None, dispatch=None, now=1_000)
agent/tests/test_scheduled_delivery_outbox.py:48
↓ 10 callers
Function
_fake_subprocess
Install a fake ``subprocess.run`` and return (calls, original_run). The pip call is identified by the ``-m pip`` marker, the verification call
agent/tests/test_cli_update.py:40
↓ 10 callers
Function
_import_mcp_server
Import agent/mcp_server.py without executing main(). Returns: The imported mcp_server module. Raises: ImportError: If the mo
agent/tests/test_mcp_regression.py:89
↓ 10 callers
Function
_iso
(dt: datetime)
agent/tests/test_swarm_status_hydration.py:44
↓ 10 callers
Function
_job
(jid: str, next_run_at: int, schedule: str = "interval:1000")
agent/tests/test_runtime_scheduler.py:29
↓ 10 callers
Function
_make_factory
(state: dict[str, Any])
agent/tests/test_mcp_client_adapter.py:73
↓ 10 callers
Function
_make_run
(tmp_path: Path, header: str, rows: list[str] | None = None)
agent/tests/api/test_positions_sectors.py:56
↓ 10 callers
Function
_mcp_tools
Return the registered MCP tools keyed by name (public async API).
agent/tests/test_mcp_new_tools.py:72
↓ 10 callers
Function
_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 callers
Function
_obj_get
(obj: Any, name: str, default: Any = None)
agent/src/trading/connectors/ibkr/local.py:691
↓ 10 callers
Method
_process_tool_calls
Pre-process tool calls: handle compact, filter duplicates, batch execute. Args: tool_calls: Raw tool calls from LLM response.
agent/src/agent/loop.py:1642
↓ 10 callers
Function
_require_futu
()
agent/src/trading/connectors/futu/sdk.py:953
↓ 10 callers
Function
_rolling_correlation_matrix
Compute correlation matrix for multiple price series. Args: price_series: Mapping of asset code -> DataFrame with a ``close`` column.
agent/backtest/correlation.py:117
↓ 10 callers
Function
_safe_attr
(obj: Any, name: str, default: Any = None)
agent/src/channels/whatsapp.py:118
↓ 10 callers
Method
_safe_price
Get close price with fallback. Uses array fast-path when available.
agent/backtest/engines/base.py:1908
↓ 10 callers
Method
_safe_send_to
Send a raw frame to one connection, cleaning up on ConnectionClosed.
agent/src/channels/websocket.py:862
↓ 10 callers
Function
_sanitize_skill_name
Sanitize skill name to a safe directory slug.
agent/src/tools/skill_writer_tool.py:39
↓ 10 callers
Function
_score_text
Score one text snippet in [-1, 1]. Returns a dict with ``score`` (float), ``positive`` (int), and ``negative`` (int).
agent/src/tools/sentiment_tool.py:58
↓ 10 callers
Function
_us_engine
(**overrides)
agent/tests/test_global_equity_engine.py:28
↓ 10 callers
Function
_wire
(monkeypatch: pytest.MonkeyPatch, id_to_zoo: dict[str, str], fake_bench: Any)
agent/tests/factors/test_alpha_compare.py:167
↓ 10 callers
Function
_write_mandate
(live_runtime: Path, mandate: Mandate)
agent/tests/test_mandate_enforcement.py:124
↓ 10 callers
Method
_write_run_manifest
Record what methodology produced this run, beside its trace. Answers "under what system prompt, which skills, and which tool set was
agent/src/agent/loop.py:849
↓ 10 callers
Function
altman_z_score
Score a firm's distress risk with one of the three Altman variants. Every argument is keyword-only, deliberately. Six interchangeable float p
agent/src/quantlib/credit.py:120
↓ 10 callers
Function
borrow_cost
Cost of borrowing the short leg for one period. Only negative weights are charged: a long position borrows nothing. The charge is the absolut
agent/backtest/factor_costs.py:231
↓ 10 callers
Function
due_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 callers
Function
emit_progress
Publish a structured progress event from a tool. Silently no-ops when called outside an active tool context (e.g. during unit tests that invo
agent/src/agent/progress.py:89
↓ 10 callers
Method
evaluate_decay
Evaluate a single set of metrics and return the decay signal. Uses the WORST signal across all provided metrics. For factors: uses ic
agent/src/strategy_store/decay.py:88
↓ 10 callers
Function
find_peaks_valleys
Detect peaks and valleys in a price series. Args: close: Closing price series. window: Half-window size; effective window is 2*wi
agent/src/tools/pattern_tool.py:24
↓ 10 callers
Function
fit_yield_curve
Fit a Nelson-Siegel or Svensson curve to observed zero rates. The betas are solved exactly by least squares at every candidate decay paramete
agent/src/quantlib/fixedincome.py:704
↓ 10 callers
Method
get_goal
Return a goal by id.
agent/src/goal/store.py:455
↓ 10 callers
Function
get_loader_cls_with_fallback
Return a loader *class* for *source*, falling back if unavailable. Args: source: Requested data source name. Returns: A Data
agent/backtest/loaders/registry.py:202
↓ 10 callers
Method
get_messages
Read all messages for a session. Args: session_id: Session ID. limit: Maximum number of messages to return.
agent/src/session/store.py:164
↓ 10 callers
Function
handler
(req)
agent/tests/test_tap_forward.py:74
↓ 10 callers
Method
list
(self, *, zoo: str)
agent/tests/factors/test_bench_strict.py:440
↓ 10 callers
Method
load
(self)
agent/tests/test_runtime_runner.py:513
↓ 10 callers
Function
load_qveris_config
Load QVeris config with environment overrides applied.
agent/src/tools/qveris_tool.py:74
↓ 10 callers
Function
normalize_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 callers
Function
pair_trades_fifo
Pair buys and sells per symbol using FIFO to compute per-roundtrip PnL. Args: df: Standardized DataFrame (datetime-sorted). Returns:
agent/src/tools/trade_journal_tool.py:34
↓ 10 callers
Function
random_walk
Generate a driftless random walk (a unit-root, non-stationary series). Args: n: Number of observations. seed: Seed for the random
agent/tests/quantlib/test_timeseries.py:67
↓ 10 callers
Method
run_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 callers
Function
sanitize_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 callers
Method
save
(self, jobs)
agent/tests/test_runtime_runner.py:516
↓ 10 callers
Method
send_message
Send a message to a session and trigger execution. Args: session_id: Session ID. content: Message content.
agent/src/session/service.py:158
↓ 10 callers
Function
signed_power
``sign(df) * |df|**p`` — preserves sign; never produces complex output.
agent/src/factors/base.py:299
↓ 10 callers
Function
sqrt_impact
Apply square-root market impact, the best empirically supported form. Impact is ``eta * volatility * sqrt(volume_traded / adv)``. Marginal impact
agent/src/quantlib/impact.py:211
↓ 10 callers
Function
standardise_exposures
Turn a raw characteristic into a cross-sectional exposure. Winsorises both tails, then subtracts a cap-weighted mean and divides by an equal-
agent/src/quantlib/factormodel.py:161
↓ 10 callers
Function
swarm_runs_root
Single source of truth for where swarm runs are persisted. The swarm store (mcp_server) and the run-dir sandbox allow-list (src.tools.path_ut
agent/src/swarm/store.py:64
↓ 10 callers
Method
sweep_deliveries
Deliver every briefing whose run has reached a terminal state. Idempotent and restart-safe: the outbox row is the only source of trut
agent/src/scheduled_research/executor.py:551
↓ 10 callers
Function
terminal_value
Compute both terminal-value estimates and cross-validate them. Args: final_year_fcff: ``FCFF_n``, the last explicit forecast year's free
agent/src/quantlib/valuation/dcf.py:718
↓ 10 callers
Method
to_dict
Return a JSON-serializable profile snapshot.
agent/src/trading/types.py:63
↓ 10 callers
Method
to_job
Build a schedulable job from this playbook. The result is ready for ``ScheduledResearchJobStore.upsert`` and mirrors what ``POST /sch
agent/src/scheduled_research/playbooks.py:142
↓ 10 callers
Function
ts_cov
Rolling sample covariance per column, min_periods=n.
agent/src/factors/base.py:166
↓ 10 callers
Function
validate_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:97
↓ 10 callers
Function
validate_validation_status_transition
Guard the model-validation state machine. The only hard rule: a model cannot be marked ``APPROVED`` unless it is already ``VALIDATED`` (re-ap
agent/src/strategy_store/models.py:211
↓ 10 callers
Function
verify_chain
Walk an on-disk ledger end to end, returning where (if anywhere) it broke. Args: path: Ledger JSONL file path. A missing file verifies as
agent/src/governance/ledger.py:309
↓ 10 callers
Function
walk_forward_analysis
Split backtest into sequential windows, check consistency. Each window is evaluated independently (returns normalised to window start). Args
agent/backtest/validation.py:208
↓ 10 callers
Function
waterfall_split
Split a distributable amount through the four European waterfall tiers. The tiers, paid strictly in order and only from what remains: 1. **R
agent/src/quantlib/fundmath.py:1124
↓ 9 callers
Function
_bar
(open_: float, close: float, base_field: str = "pre_close")
agent/tests/test_price_limit_lookahead.py:44
↓ 9 callers
Function
_build_agent
Build an AgentLoop with a real (but empty) registry and a stub LLM.
agent/tests/test_agent_loop_terminal_state.py:135
↓ 9 callers
Function
_client
()
agent/tests/test_alpha_compare_api.py:28
↓ 9 callers
Function
_first
(row: Mapping[str, Any], names: tuple[str, ...], default: Any = None)
agent/src/trading/connectors/futu/sdk.py:1127
↓ 9 callers
Function
_hk_engine
(**overrides)
agent/tests/test_global_equity_engine.py:34
↓ 9 callers
Function
_host
Return the ``api_server`` module for late-access attribute reads. Tests monkeypatch ``ENV_PATH``, ``ENV_EXAMPLE_PATH``, ``_baostock_supported``
agent/src/api/settings_routes.py:173
↓ 9 callers
Function
_install_schema_stub
(monkeypatch: pytest.MonkeyPatch)
agent/tests/test_fundamentals_pit.py:12
↓ 9 callers
Function
_is_supported
Return whether *code* is a symbol this loader handles. Covers US/HK/India/Korea/Canada/Vietnam equities plus Yahoo's own futures (``GC=F``) a
agent/backtest/loaders/yahoo_loader.py:47
↓ 9 callers
Function
_loop
An AgentLoop shell built without running __init__ (we only need the helper).
agent/tests/test_run_manifest_wiring.py:24
↓ 9 callers
Function
_loopback_client
TestClient whose peer host ('testclient') is treated as loopback.
agent/tests/test_auth_precedence.py:23
↓ 9 callers
Function
_make_agent_config
Build an AgentConfig from a plain server-name → config-dict map.
agent/tests/test_registry_mcp_integration.py:21
↓ 9 callers
Function
_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 callers
Function
_make_bar
(close: float = 1.1050, open_: float | None = None)
agent/tests/test_forex_engine.py:34
↓ 9 callers
Function
_make_hypothesis
(**overrides)
agent/tests/test_autopilot_phase3.py:36
↓ 9 callers
Function
_make_specs
Build a list of fake MCPRemoteToolSpec for testing.
agent/tests/test_mcp_specs_cache.py:80
↓ 9 callers
Function
_monkeypatch_upgrade_env
Point PyPI + install-kind detection at deterministic fakes.
agent/tests/test_cli_update.py:57
↓ 9 callers
Function
_parse_pages
Parse '1-10' / '5' / '1,3,5-8' into zero-based indices.
agent/src/tools/doc_reader_tool.py:105
↓ 9 callers
Function
_patch_sec
( monkeypatch: pytest.MonkeyPatch, facts_by_symbol: dict[str, dict[str, object]], )
agent/tests/test_fundamentals_pit.py:52
↓ 9 callers
Function
_profile
Build a minimal ShadowProfile for scanner tests.
agent/tests/test_shadow_scanner.py:14
← previous
next →
401–500 of 16,853, ranked by callers