Commit Graph
334 Commits
Author SHA1 Message Date
warren618 59fb021c58 fix: swarm template variable fallback and frontend timeout reset
1. worker.py: missing template variables ({market}, {target}, etc.)
   now auto-fallback with LLM inference hint instead of crashing
2. Agent.tsx: swarm flush() resets lastEventRef to prevent
   safety timeout from killing active swarm runs
2026-04-13 23:37:32 +08:00
warren618 1f8f4a005f feat: cross-market composite backtest engine with shared capital pool
- Add CompositeEngine for backtesting portfolios spanning multiple markets
  (e.g. A-shares + crypto) with a single shared capital pool
- Extract on_bar logic (funding fee, liquidation, swap) into _market_hooks.py
  as pure functions, called by both original engines and CompositeEngine
- Fix _align() signal shift bug: shift on each symbol's own trading calendar
  then ffill to unified dates (prevents Monday close-and-reopen for A-shares)
- Add calendar-day annualization for cross-market Sharpe calculation
- Add cross-market-strategy skill with vol-adjusted weighting example
- Update all READMEs (en/zh/ja/ko/ar): news, 69 skills, composite engine
- Update test imports for extracted _market_hooks functions
2026-04-13 22:46:49 +08:00
warren618 940624a2d6 docs: add CODE_OF_CONDUCT and SECURITY policy
Add Contributor Covenant v2.1 and security vulnerability reporting guide
to improve GitHub Community Health score.
2026-04-13 18:50:16 +08:00
warren618 e2de75c3b6 fix: add ddgs to dependencies for web_search tool 2026-04-12 23:36:44 +08:00
Haozhe Wu cb85af67b5 Merge pull request #24 from SoufianoDev/main
docs: add Arabic README translation
2026-04-12 23:32:18 +08:00
SoufianoDev e9d04a10e5 docs: add Arabic README translation and update language links 2026-04-12 14:50:03 +01:00
warren618 66cd96a303 feat: multi-platform indicator export (TradingView + TDX + MT5)
Upgrade pine-script skill from TradingView-only to multi-platform export.
/pine now generates indicator code for TradingView (Pine Script v6),
通达信/同花顺/东方财富 (TDX formula), and MetaTrader 5 (MQL5) in a single file.
Add 2026-04-12 news to all README translations.
2026-04-12 21:04:00 +08:00
warren618 ed47b26b5c docs: add 2026-04-11 news to all README translations 2026-04-12 00:00:31 +08:00
warren618 0aea8b0150 fix: inject current date and time into agent and swarm system prompts
Closes #22
2026-04-11 20:15:08 +08:00
warren618 ddeb371632 docs: reorganize .env.example and add missing variables
- Unified provider block order (PROVIDER → MODEL → KEY → URL)
- Grouped LLM params (temperature, timeout, retries) together
- Added API Server section (API_AUTH_KEY, CORS_ORIGINS, ENABLE_SESSION_RUNTIME)
- Added CCXT_EXCHANGE for crypto fallback config
- Renamed Swarm section to Agent Tuning
2026-04-11 16:37:41 +08:00
warren618 a8828c16f3 fix: add runtime fallback when primary data source returns empty
When a loader (e.g. OKX) is reachable but returns no data at runtime
(network block, SSL failure, regional restriction), the backtest runner
now walks the FALLBACK_CHAINS to try the next available source
(e.g. ccxt/Binance). Covers both explicit source and auto-detect paths.
2026-04-11 16:26:46 +08:00
warren618 2772ecb688 fix: harden backtest engine with data validation and error isolation
- ffill(limit=5) replaces unlimited ffill to prevent stale prices from
  masking long suspensions; all-NaN symbols auto-dropped with warning
- try/except per symbol in _execute_bars so one symbol failure doesn't
  crash the entire backtest
- pydantic BacktestConfigSchema validates config.json before execution
  (codes non-empty, date format, start<=end, valid interval/engine/source)
- validate_date_range() shared helper called from all 5 loaders
- 25 regression tests covering all four fixes
2026-04-11 13:39:36 +08:00
warren618 f09cae12b0 docs: add contributors section to all README translations v0.1.4 2026-04-11 11:17:03 +08:00
trinhchienandchientrinh fd02b6f4ac feat(cli): add interactive init env bootstrap (#19)
* feat(cli): add interactive init env bootstrap

* fix(cli): align init providers with env example

---------

Co-authored-by: chientrinh <trinhdachien1598@gmail.com>
2026-04-11 11:05:21 +08:00
warren618 e32b09e515 feat: startup preflight checks for LLM and data sources
Show connectivity status on startup (CLI + API server) so users
immediately see which services are reachable and which are not,
instead of getting cryptic errors mid-run.
2026-04-11 10:55:44 +08:00
Haozhe Wu d682621645 Merge pull request #21 from yule153604/docs/readme-translations
LGTM — translations look accurate, language switcher works correctly.
2026-04-11 10:13:31 +08:00
yule 37e7fd9946 fix: translate zh README core feature headings 2026-04-11 02:14:24 +08:00
yule 8257ffeb09 docs: add multi-language README translations (zh, ja, ko) 2026-04-11 02:01:58 +08:00
Matheus Nunes Dantas de Sena 1a40e53bdd feat: add docker-compose profile for frontend-only dev (#18)
* feat: add docker-compose profile for frontend-only dev

* fix: improve networking and use explicit service dependency
2026-04-11 00:19:17 +08:00
warren618 423ed52537 docs: add roadmap, consolidate good-first-issues
Moved most good-first-issues to a Roadmap section in README
to keep the issue tracker focused. 3 well-scoped issues remain
open for external contributors.
2026-04-10 23:49:49 +08:00
warren618 701d5269e4 docs: add PR template + 8 beginner-friendly issues 2026-04-10 23:13:13 +08:00
warren618 b0f59bd7f4 fix: Docker build + MCP/PyPI/ClawHub sync (v0.1.4)
- Fix #8: remove COPY data/ data/ from Dockerfile (dir doesn't exist)
- Add akshare/ccxt to requirements.txt and pyproject.toml dependencies
- Remove non-existent run_agent from py-modules
- MCP: rewrite _get_loader to use registry with fallback, add web_search tool (16→17)
- MCP: update docstrings (56→68 skills, add akshare/ccxt source docs)
- ClawHub SKILL.md: 64→68 skills, 3→5 sources, 16→17 tools, add version field
- docker-compose: remove dead fin-data volume, rename fin-→vibe- prefix
- .dockerignore: expand exclusions (tests, docs, assets, build artifacts)
- README: merge 4/10 news, update MCP 16→17, fix contributing (remove done items)
- Bump version 0.1.3→0.1.4, published to PyPI and ClawHub
2026-04-10 22:11:07 +08:00
warren618 1e3db39722 feat: backtest Wave 2 (multi-asset engines) + Wave 3 (statistical validation)
Wave 2 — 3 new engines + options v2:
- ChinaFuturesEngine: CFFEX/SHFE/DCE/ZCE/INE/GFEX, 50+ contracts with
  multiplier/margin/commission lookup tables, T+0, price limits
- GlobalFuturesEngine: CME/ICE/Eurex, 30+ contracts, per-contract commission,
  smart product code extraction (ESZ4→ES)
- ForexEngine: 24 pairs with spread/swap tables, pip-based slippage,
  micro-lot rounding, per-symbol daily swap (Wed 3x)
- OptionsEngine v2: American early exercise + IV smile model
- FuturesBaseEngine: decoupled contract_multiplier layer (only futures use it)
- Runner routing for futures/forex market detection

Wave 3 — statistical validation:
- Monte Carlo permutation test (p-value for Sharpe significance)
- Bootstrap Sharpe CI (confidence interval + P(Sharpe>0))
- Walk-Forward analysis (per-window consistency check)
- Trigger via config["validation"] or standalone CLI
- Frontend ValidationPanel with badges, CI bars, per-window table

Bug fixes:
- CryptoEngine funding fee: only applied once for daily bars (now per-date)
- Futures calc_commission: was using default rate, now uses _active_symbol
- Forex apply_slippage: JPY pairs used wrong pip value (0.0001→0.01)
- Forex swap: shared across symbols, now per-symbol tracking
- GlobalFutures leverage: cm*100/margin gave ~1.0, now defaults to 10.0
- pct_chg heuristic: small values (0-1%) misclassified, now prioritizes
  close/pre_close over pct_chg field

Tests: 364 passed (121 new), TypeScript zero errors.
2026-04-10 18:11:52 +08:00
warren618 b8d544d71d docs: add CONTRIBUTING.md, issue templates, and contribution roadmap
- CONTRIBUTING.md with dev setup, code standards, and difficulty-tiered roadmap
- GitHub issue templates (bug report + feature request) with YAML forms
- README: add Contributing section with contribution areas table
2026-04-10 16:17:19 +08:00
warren618 483de22b7d test: add 236 unit tests + CI pytest integration
- 13 test files covering: market detection, loader registry/fallback,
  engine market rules (ChinaA T+1/涨跌停, Crypto funding/liquidation,
  US/HK commission), signal alignment, metrics, optimizer, provider mapping
- CI: fix branch master→main, add pytest step (e2e excluded)
- pyproject.toml: add pytest config + dev dependencies
- .gitignore: expose unit tests, keep e2e local-only
2026-04-10 14:36:11 +08:00
warren618 6999af0e5f feat: multi-provider support (11 providers + Ollama) and performance tuning
- Expand _sync_provider_env() from 4 to 12 providers with independent env keys
- Add provider configs: OpenRouter, OpenAI, DeepSeek, Gemini, Groq, DashScope,
  Zhipu, Moonshot, MiniMax, MIMO, Ollama (local)
- LLM timeout 2400s→120s, retries 5→2 for faster failure recovery
- Decouple all timeout/concurrency params to env vars (9 configurable knobs)
- Update .env.example with all provider blocks and tuning params
- Update README: condensed News, multi-provider prerequisites, env var docs
2026-04-10 13:53:29 +08:00
warren618 140e9487af fix: harden ml-strategy skill template with input validation, div-by-zero guards, and output contract
Restructured ml-strategy SKILL.md from a skills-creator perspective:
- Added validate_data() input gate (columns, min rows, NaN ratio)
- Guarded RSI/Bollinger Band division-by-zero with .replace(0, nan)
- Added inf→NaN sanitization at end of build_features()
- Added sliding window option (window_type + sliding_size params)
- Added output contract: fillna(0).clip(-1, 1) guarantees clean signals
- Provided complete SignalEngine example so agent can copy-paste safely
- Reduced Common Pitfalls from 7 to 3 (4 now enforced by code)
- Zero changes to backtest engine — all fixes are skill-only
2026-04-10 01:50:04 +08:00
warren618 27354eb008 feat: data source expansion with auto-fallback + web search + skill categorization
- Add DataLoader Protocol + Registry with market-level fallback chains
- New data sources: AKShare (A-shares/US/HK/futures, free) and CCXT (100+ crypto exchanges)
- Auto-fallback: tushare unavailable -> akshare; OKX unavailable -> CCXT
- Zero-config: all markets work without any API keys
- New web_search tool (DuckDuckGo) for web information retrieval
- Skill categorization: 68 skills organized into 7 categories (data-source, strategy, analysis, asset-class, crypto, flow, tool)
- New data-routing meta-skill for intelligent data source selection
- Registry self-initializes via _ensure_registered() — no manual imports needed
- Pattern detection returns market type instead of source name (decoupled)
- runner.py loads .env via dotenv for reliable token access
2026-04-09 13:43:13 +08:00
warren618 dca916c1bd feat: Pine Script v6 export for TradingView integration
Add full-stack Pine Script export: backtest strategies can now be
converted to TradingView Pine Script v6 via natural language, CLI,
API, or the web UI.

- New `pine-script` skill with Python-to-Pine mapping table and v6 syntax guide
- CLI: `/pine <run_id>` slash command and `--pine` flag
- API: `GET /runs/{run_id}/pine` endpoint
- Frontend: Pine Script button on RunCompleteCard + modal code viewer with copy
- README: updated news, capabilities, skill count (65), CLI/API docs
2026-04-09 11:31:41 +08:00
warren618 8e6963f462 feat: multi-market backtest engines with per-market rules
Replace single vectorised daily_portfolio engine with bar-by-bar engines
that enforce real market rules:
- ChinaAEngine: T+1, no shorting, price limits, 100-lot, stamp tax
- CryptoEngine: 24/7, funding fees, liquidation, maker/taker, leverage
- GlobalEquityEngine: US zero-commission + fractional / HK stamp tax + lots

New shared foundation: models.py (Position/TradeRecord/EquitySnapshot),
metrics.py (extracted from daily_portfolio), base.py (BaseEngine ABC).
Runner routes by source to the correct engine automatically.
2026-04-09 01:17:28 +08:00
warren618 05f7627930 docs: add News section to README
Record initial release date (2026-04-01) and project milestones.
2026-04-08 23:47:30 +08:00
chaohuang-ai ad274c7101 Update README.md 2026-04-01 23:32:07 +08:00
warren618 95ba197591 fix: update video links 2026-04-01 19:08:21 +08:00
warren618 34eae37ba4 Initial commit 2026-04-01 18:14:49 +08:00