A Python-based fundamental multi-factor quantitative research framework for the A-share market.
基于 Python 与 JQData 数据接口搭建的 A 股基本面多因子量化研究框架。
本项目完成完整量化研究流程:
Data Acquisition → Data Cleaning → Factor Construction → IC Analysis → Portfolio Construction → Backtesting → Transaction Cost Simulation → Benchmark Comparison
- Performance Overview
- Research Background
- Research Pipeline
- Data Description
- Factor Model
- Factor Analysis
- Benchmark Comparison
- Risk Analysis
- Project Highlights
- Project Structure
- Environment Setup
- Run
- Technology Stack
- Limitations
回测周期:
2025-05-30 ~ 2026-04-29
交易频率:
Monthly Rebalance
| Metric | Result |
|---|---|
| Annual Return | 45.38% |
| Annual Volatility | 18.76% |
| Sharpe Ratio | 2.11 |
| Maximum Drawdown | -5.89% |
| Average Monthly Turnover | 21.52% |
加入交易成本后:
- Cumulative Return: 40.91%
- Sharpe Ratio: 2.11
- Maximum Drawdown: -5.89%
结果显示策略在考虑交易成本后仍保持较稳定表现。
基本面多因子模型是量化投资中常见的选股方法。
本项目基于沪深300股票池,选择:
- Valuation Factor(估值)
- Profitability Factor(盈利能力)
- Growth Factor(成长性)
构建综合评分模型。
主要研究:
- 单因子预测能力
- 多因子组合收益表现
- 风险收益特征
- 换手率影响
- 交易成本影响
- 相对于沪深300指数的超额收益
JQData Data Acquisition
↓
Data Cleaning
↓
Factor Construction
↓
IC Analysis
↓
Single Factor Portfolio Test
↓
Multi-Factor Portfolio Construction
↓
Backtesting
↓
Transaction Cost Simulation
↓
CSI300 Benchmark Comparison
↓
Visualization
| Item | Description |
|---|---|
| Data Source | JQData |
| Stock Pool | CSI 300 Constituents |
| Frequency | Monthly Rebalance |
| Period | 2025-05-30 ~ 2026-04-29 |
| Stocks | 300 CSI300 Stocks |
| Records | 3600 Stock-Month Observations |
The model uses three fundamental factors:
| Factor | Description |
|---|---|
| PE Ratio | Valuation Factor |
| ROE | Profitability Factor |
| Revenue Growth | Growth Factor |
Factor score:
Composite Score =
PE Score
+
ROE Score
+
Revenue Growth Score
Portfolio construction:
- Calculate factor scores
- Rank stocks by composite score
- Select high-score stocks
- Construct equal-weight portfolio
- Monthly rebalance
Information Coefficient (IC) is used to evaluate factor predictive ability.
Analysis:
- IC Mean
- IC Stability
- Factor Direction
Stocks are divided into five groups according to factor scores.
Low Score
↓
High Score
The return spread is used to evaluate factor effectiveness.
Benchmark:
CSI 300 Index (000300.XSHG)
Benchmark process:
- Download CSI300 daily close price from JQData
- Match monthly rebalance dates
- Calculate benchmark return
- Compare strategy performance
A-Share-MultiFactor-Research
├── main.py
├── run_all.py
├── data_fetch.py
├── data_cleaner.py
├── factor_process.py
├── ic_analysis.py
├── backtest_group.py
├── multifactor.py
├── backtest_portfolio.py
├── turnover_calculator.py
├── benchmark.py
├── benchmark_analysis.py
├── visualization.py
├── requirements.txt
└── README.md
Python:
Python 3.10+
Install dependencies:
pip install -r requirements.txtConfigure JQData:
Create .env:
JQDATA_USERNAME=your_username
JQDATA_PASSWORD=your_password
Execute:
python run_all.pyThe framework automatically completes:
- Data acquisition
- Data cleaning
- Factor processing
- IC analysis
- Portfolio backtesting
- Transaction cost simulation
- Benchmark comparison
- Visualization
| Category | Tools |
|---|---|
| Language | Python |
| Data Processing | Pandas, NumPy |
| Data Source | JQData |
| Backtesting | Custom Python Framework |
| Visualization | Matplotlib |
This project implements an end-to-end quantitative research workflow:
- Market data acquisition through JQData
- Data cleaning and quality checking
- Fundamental factor construction
- Factor preprocessing and normalization
- IC-based factor evaluation
- Quintile portfolio testing
- Multi-factor score construction
- Portfolio backtesting
- Turnover calculation
- Transaction cost simulation
- CSI300 benchmark comparison
- Performance visualization
The project adopts a modular architecture:
Data Module
↓
Factor Module
↓
Portfolio Module
↓
Backtest Module
↓
Analysis Module
↓
Visualization Module
Each module is independently implemented, making the research process easier to maintain and extend.
The strategy combines three types of fundamental signals:
| Factor | Investment Logic |
|---|---|
| PE Ratio | Valuation factor |
| ROE | Profitability factor |
| Revenue Growth | Growth factor |
The project evaluates factor effectiveness through:
- IC analysis
- Portfolio group testing
- Multi-factor portfolio performance
- Risk-adjusted return analysis
Meanwhile, transaction costs and benchmark performance are considered to make the backtest closer to real investment scenarios.
The current research period is relatively short.
The backtest results are mainly used to verify the research framework and modeling process.
They should not be interpreted as guaranteed future investment performance.
Ma Yanlong
International Economics and Trade
Python Quantitative Research / Data Analysis






