📈 QuantEval
中文说明 / Chinese Guide · 贡献指南 / Contributing
QuantEval is a lightweight, friendly Python toolkit for researching Chinese A-share and Hong Kong (HKEX) strategies, factors, and benchmark comparisons. We've combined a reusable package under src/quanteval, tutorial notebooks, and automated workflows to make your quant journey smoother! 🚀
✨ Highlights
- ⏱️ Backtesting engine with delayed signal execution to keep things realistic (no look-ahead bias here!).
- 🤖 Built-in strategies: Classic strategies like Dual Moving Average, Bollinger Mean Reversion, and consistent Buy-and-Hold... Full set in 👉 src/quanteval/strategies
- 🔀 Strategy Comparison: Multi-strategy correlation analysis, ranking, and equal-weight portfolio construction.
- 📊 Technical factors: From SMA and RSI to MACD, ATR, and more.
- 🔍 Optimization: Grid-search and walk-forward analysis to fine-tune your ideas.
- 🎨 Visualization: Pretty static and interactive plots for your equity curves.
- 💾 Data Caching: Native support for A-share (AkShare) and Hong Kong market (yfinance) stock, ETF, and index data.
🛠️ Installation
📦 From PyPI
The package is available on PyPI. Install the latest released version with:
pip install quanteval
🔨 End users (install from source)
git clone https://github.com/KarhouTam/quanteval.git
cd quanteval
python -m pip install .
🧑💻 Contributors
git clone https://github.com/KarhouTam/quanteval.git
cd quanteval
python -m pip install -e ".[dev]"
🚀 Quick start
Ready to run your first backtest? It's as simple as this:
from quanteval import Backtester, DataLoader, DualMAStrategy
# 1. Grab some data 🏪
loader = DataLoader()
data = loader.load_stock('600519', '20200101', '20231231')
# 2. Pick a strategy 🧠
strategy = DualMAStrategy(fast_window=10, slow_window=60)
# 3. Let's see how it performed! 📊
results = Backtester(strategy=strategy, data=data, transaction_costs=True).run()
print(results.summary())
results.plot()
📖 More examples
Check out these notebooks to level up:
examples/01_quickstart.ipynb: Basic data loading and first backtest 🏃examples/02_parameter_optimization.ipynb: Finding the best parameters 🎯examples/03_strategy_comparison.ipynb: Battle of the strategies ⚔️examples/04_hk_market_support.ipynb: Trading in the Hong Kong market 🇭🇰TUTORIAL_EN.md: Deep dive tutorial 📚
Metadata
Release files for quanteval 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| quanteval-1.1.0.tar.gz | 48.6 kB | Without provenance | Details for quanteval-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| quanteval-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for quanteval-1.1.0-py3-none-any.whl |
Total release size: 101.5 kB
Release files / quanteval-1.1.0.tar.gz
| Download URL | quanteval-1.1.0.tar.gz |
|---|---|
| Size | 48.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a68a4da0080bb2197511104d339a3130dba77abdc9267adb2b07957d628128ce
|
|
BLAKE2b-256 checksum How to use checksums |
142f3b67673f7ec93abf5c535b0c224b66326649821ab8586ce0dbf0dc8c8f23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / quanteval-1.1.0-py3-none-any.whl
| Download URL | quanteval-1.1.0-py3-none-any.whl |
|---|---|
| Size | 52.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0778eae13f1779ff8f5fb2fe1d821908be11131c403bab44f29ac89ab9ce613c
|
|
BLAKE2b-256 checksum How to use checksums |
a709a115d6effa998d30f74a97ff376b9c5753e99e70b2ef43ed952928f1d1eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Security for quanteval 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.