Qbot AI Quantitative Investment Platform

repository·main·Indexed 12 days ago

https://github.com/ufund-me/qbot

An AI-oriented automated quantitative investment platform for quantitative research using machine learning, reinforcement learning, and automated factor mining. It supports the full trading lifecycle from data acquisition and strategy development to backtesting and live execution, featuring a custom OpenAI Gym environment for stock trading and integration with PPO algorithms via stable-baselines.

Tokens
66.7K
Snippets
197
Records
295
Agent score
95%

What's inside Qbot

  1. Overview of the Qbot core engine

    main

    Qbot is a core engine designed for automated trading and strategy execution. It integrates multiple components for a complete trading workflow:

    • Main Entrypoint: main.py serves as the primary execution script.
    • Trading Strategies: Located in the strategies/ directory. Additional stock and fund trading strategies can be found in the pyfunds and pytader/*_strategies implementations.
    • Configuration: Managed via the config/ directory.
    • Automated Trading Engine: Utilizes vnpy combined with CI (Continuous Integration) for automated execution.
    • Multi-Ledger Management: Uses easyuncle to manage multiple accounts or ledgers.
  2. Overview of qbot features

    main

    qbot provides several core functionalities for financial analysis and trading:

    • Backtesting (回测功能): Test trading strategies against historical data.
    • ChatGPT Strategy Writing & Intelligent Q&A: Use AI to write strategies and interact with an intelligent assistant.
    • Intelligent Stock Selection & Analysis (智能选股、智能鉴股): Automated tools for picking and evaluating stocks.
    • Fund Strategy & Backtest Analysis (基金策略分析,回测分析): Specialized analysis for fund-based strategies.
    • Strategy Simulated Trading (策略模拟交易): Execute strategy simulations using the '掘金仿真' (Goldminer Simulation) environment.
  3. Overview of Qbot capabilities

    main

    Qbot is an AI-driven quantitative investment platform that integrates several specialized components:

    • Trading Strategies: Powered by quant.ai, utilizing qlib and deep learning strategies.
    • Backtesting System: Powered by BackTest, utilizing backtrader and easyquant.
    • Automated Quantitative Trading: Powered by Qbot - vnpy, pytrader, pyfunds.
    • Visual Analysis Tools: Powered by quantstats for dashboards and online operations.

    The platform supports diverse machine learning modeling paradigms, including supervised learning, market dynamics modeling, and Reinforcement Learning (RL).

  4. Overview of InvesTool

    main

    InvesTool is a personal investment analysis tool implemented in Golang. It is designed to automate the process of screening high-quality stocks and funds based on fundamental analysis, reducing the manual effort required to analyze financial reports.

    Key features include:

    • Automated stock screening using default or custom criteria.
    • Stock detectors for metrics like ROE, EPS, revenue, profit, valuation, debt ratio, and more.
    • Exporting results to JSON, CSV, and Excel (with industry/price/volatility tabs).
    • Exporting stock codes as images for easy import into the East Money (东方财富) app.
    • Fund screening using the '4433 rule' and fund manager evaluation.
    • Web interface for most operations at http://investool.axiaoxin.com.

    Note: This program does not constitute investment advice and is intended only as an auxiliary tool.

  5. Overview of pyfunds

    main

    pyfunds is a framework designed for financial strategy development. It integrates three core stages into a single workflow:

    1. Strategy Development (策略)
    2. Backtesting (回测)
    3. Visualization/Display (显示)

    The ultimate goal of the pipeline is to allow these components to be integrated into web-based plugins.

  6. Overview of pyfunds/backtest capabilities

    main

    The pyfunds/backtest module provides a comprehensive suite for quantitative fund analysis and trading simulation, including:

    • Fund & Index Data: Comprehensive info on A-share funds (NAV, dividends, fees) and indices.
    • Portfolio Management: Multi-fund quantitative analysis, correlation studies, and interactive web-based visualizations (line, river, pie, and bar charts).
    • Simulation & Backtesting: Precise simulation of individual fund user behavior and multi-fund investment systems (supporting both fixed and variable total capital).
    • Strategy Implementation: Support for automated fixed-investment (定投) strategies (including variable and grid strategies) and technical indicator-based crossover strategies.
    • Automation: Scripting for email alerts based on custom strategies to monitor markets or execute grid trades.
    • Advanced Analytics: Convertible bond valuation, QDII fund NAV prediction, and detailed underlying stock/bond holdings analysis for entire portfolios.
  7. Overview of CTPtest

    main

    CTPtest is a demonstration implementation of the official CTP (Comprehensive Transaction Platform) interface. It provides core functionalities for futures trading, including:

    • Market Data (行情): Real-time market information.
    • Trading (交易): Order execution and management.
    • K-Line Data (k线数据): Historical candlestick/bar data.
    • Strategy Support (策略功能): Capability to run trading strategies.

    It is designed to connect to the simnow simulated trading environment.

  8. Overview of Qbot's Automated Trading Implementation

    main
    Qbot implements automated trading by leveraging the vnpy quantitative trading development framework. The system achieves automation by analyzing quantitative strategy results and executing account trades. Deployment is managed via GitHub Actions CI workflows.
  9. Overview of easytrader

    main

    easytrader is a Python library designed for automated programmatic stock trading. It provides capabilities for tracking simulated trades from platforms like joinquant and ricequant, as well as managing Xueqiu (雪球) portfolio rebalancing.

    Key features include:

    • Automated login support.
    • Support for remote client operation via a webserver.
    • Command-line interface (CLI) for integration with other programming languages.
    • Support for general Tonghuashun (同花顺) client simulated operations.

    Platform Support:

    • Windows: Full support for various broker clients.
    • Linux: Limited support, primarily for Xueqiu (雪球).