jin-ce-zhi-suan  by ScottZt

Quantitative investment research and backtesting system

Created 2 weeks ago

New!

341 stars

Top 81.1% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

This project provides a pure quantitative tool for objective, data-driven trading decisions, historical backtesting, and risk control. It targets quantitative enthusiasts and Python developers seeking verifiable trading rules and risk management, promoting disciplined trading free from emotional influences or market rumors.

How It Works

The system uses a "三省六部" (Three Departments and Six Ministries) analogy, separating strategy generation, risk control, and execution. Key components include "太子院" (data pre-validation), "中书省" (signal generation), "门下省" (risk veto), and "尚书省" (execution). This layered design ensures modularity, end-to-end backtesting, and a robust "one-vote veto" risk control.

Quick Start & Requirements

  • Environment: Python 3.8+ (virtual env recommended).
  • Installation: pip install -r requirements.txt then pip install tushare akshare fastapi uvicorn.
  • Configuration: Sensitive keys use config.private.json or env vars (CONFIG_PRIVATE_PATH, CUSTOM_STRATEGIES_PRIVATE_PATH).
  • Execution: Backtests: python main.py or python run_backtest.py. Live monitoring: python run_live.py. Web dashboard: python server.py.
  • Dependencies: API keys (Tushare, default API, LLM), potentially database drivers (MySQL, PostgreSQL).

Highlighted Details

  • TDX/BLK Integration: Supports Tongdaxin (TDX) formulas and BLK file import/conversion.
  • Combination Backtesting: Enables multi-strategy backtesting with configurable weights and voting.
  • Batch Processing: scripts/batch_backtest_runner.py for automated, end-to-end batch execution.
  • Flexible Data Sources: Integrates AkShare, Tushare, custom APIs, MySQL, PostgreSQL.
  • Web Interface: FastAPI dashboard for configuration and task management.

Maintenance & Community

Support and Q&A via a "星内容" channel, suggesting a paid community model. Public community links (Discord/Slack) or detailed contributor information are not explicitly provided.

Licensing & Compatibility

Licensed under "personal non-commercial free + commercial authorization required." Free for personal learning, academic research, and local self-use. Commercial deployment, SaaS, redistribution, or profit-driven services require explicit written authorization.

Limitations & Caveats

The main.py script has a hardcoded backtest date range (2024-01-01 to 2025-12-31). Data source switching requires correct configuration. The web dashboard's API key fields offer frontend masking only. Lacks built-in CI/automated testing. Default data provision is minimal; users must source historical data externally.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
342 stars in the last 19 days

Explore Similar Projects

Feedback? Help us improve.