# OSkhQuant for local A-share backtesting with MiniQMT

> OSkhQuant is a Python and PyQt5 desktop backtesting system for A-share users who already work with MiniQMT. Its source is public, but the custom license, MiniQMT dependency, and incomplete quick-start documentation require review before adoption.

**khscience/OSkhQuant** — 看海量化回测系统（看海量化交易系统）开源代码，khQuant框架，实现A股可视化回测，全部开源。

- Repository: https://github.com/khscience/OSkhQuant
- Stars: 1,631 · Forks: 429
- Language: Python
- License: NOASSERTION
- Published: 2026-10-16 · Updated: 2026-10-16 · Language: en
- Canonical page: https://hysenlabs.com/projects/khscience-oskhquant

## Why OSkhQuant Targets MiniQMT A-Share Workflows

OSkhQuant addresses a specific gap between brokerage-connected trading platforms and general-purpose open-source backtest frameworks. The README says the project is based on MiniQMT and targets individual quantitative researchers and developers working with Chinese A-shares. MiniQMT supplies the market-data connection, while OSkhQuant adds a PyQt5 desktop interface, local strategy execution, and a backtesting environment around that connection.

This positioning matters because a framework such as Backtrader or vn.py generally requires the developer to arrange data feeds and trading interfaces. OSkhQuant makes a different choice by integrating with MiniQMT and presenting the setup through a graphical application. The documentation presents this as an advantage for users who do not want to build and maintain a separate A-share data adapter.

The target audience is narrower than the broad label "quantitative platform" may suggest. The README expects readers to understand Python, Pandas, NumPy, basic market concepts, and backtest indicators such as return, maximum drawdown, and the Sharpe ratio. It also describes a progression from open-loop strategies to closed-loop strategies that train machine-learning or deep-learning models. Users who want a browser-based research service or a complete data stack independent of a brokerage environment are not the intended audience.

The README says the system considers A-share characteristics such as T+1 settlement, price limits, and familiar technical indicators. Those statements establish the project's market focus, but the quick-start document does not show the corresponding source changes or provide a worked strategy that demonstrates each rule. That distinction matters during evaluation. A documented intention should not be confused with implementation-level verification, which requires reading files such as `khTrade.py`, `khRisk.py`, and the MiniQMT integration modules.

## How OSkhQuant Connects GUI, Data, and Strategy Modules

The repository layout describes a desktop application rather than a command-line backtest library. `GUI.py`, `GUIkhQuant.py`, `GUIDataViewer.py`, and `GUIScheduler.py` indicate separate interface modules, while `backtest_result_window.py` presents backtest output. The application imports PyQt5, pandas, NumPy, and matplotlib, matching the documented combination of graphical controls, tabular data processing, and result visualization.

The core modules also indicate a division of responsibility. `khFrame.py` appears to contain framework logic, `khQTTools.py` provides the MiniQMT-facing layer, and `miniQMT_data_parser.py` and `miniQMT_data_viewer.py` separate parsing from viewing. Strategy execution is associated with `khTrade.py`, while `khRisk.py` handles risk-related logic. `khConfig.py` and `SettingsDialog.py` separate configuration from the settings interface. These are source-layout conclusions rather than claims about an executed call trace.

The intended data flow is reasonably clear at an architectural level. MiniQMT supplies market data, dedicated modules parse and display it, Python strategies implement trading logic, the framework records transactions or results, and GUI windows present settings, data, and backtest output. The `strategies/` directory provides the expected location for strategy code, while `data/` separates local data from application source.

This modular split has practical value for secondary development. A developer can inspect the MiniQMT adapter without starting with every GUI file, or focus on `khTrade.py` and `khRisk.py` when examining execution and risk behavior. However, the README does not publish the formal callback contract for a strategy. It does not specify event timing, order submission, callback signatures, state persistence, or the precise boundaries between backtest and simulated execution. The directory structure demonstrates separation, but it does not by itself prove that one strategy can move unchanged among all three modes.

## Installing OSkhQuant and Preparing the First Run

For users who do not need to modify the source, the README directs them to the official website or the `Assets` area on the latest GitHub release. It names the packaged executable as `看海量化回测平台_Vx.x.x.exe`. The executable is presented as the easiest route because it removes the need to install Python and the dependency libraries. The README also warns that Windows may display its protected-PC warning because the package lacks a paid digital signature. That warning is part of the documented installation experience and may affect how an organization handles new executables.

For source development, the README says to use GitHub's `Code` menu and `Download ZIP`, or to clone the repository. 

The dependency file declares the following core environment:

```text
PyQt5==5.15.11
pandas==2.3.1
numpy==2.3.2
matplotlib==3.10.0
mplcursors==0.6
xtquant
```

The README excerpt does not include a source-development `pip install` command or a documented virtual-environment procedure. It would therefore be misleading to present a complete package-installation command as official project guidance. A developer can clone the source and use `requirements.txt` as the declared dependency list, but the README does not explain where `xtquant` must be obtained or how a local MiniQMT installation is connected.

No complete first-run tutorial appears in the README. It refers readers to later chapters and the full website manual, but it does not show how to connect a MiniQMT account, choose historical data, create a stock pool, run a sample strategy, or interpret the first report. The verifiable source-development instruction therefore ends at obtaining the repository and reading `requirements.txt`. A successful first backtest requires documentation beyond the quick-start text.

## Python Strategy Freedom Comes with MiniQMT Constraints

The main advantage claimed for OSkhQuant is strategy freedom within a local Python environment. The README names Pandas, NumPy, SciPy, Scikit-learn, TensorFlow, and PyTorch as illustrative libraries from the Python ecosystem. This makes the project more suitable than a closed platform when a research strategy needs custom numerical processing or model training. It also says that strategy code, historical data, backtest results, and trade records are stored locally.

That freedom has boundaries. OSkhQuant depends on MiniQMT for market access, so a user without the relevant broker environment cannot use the integrated data path described by the project. The README does not say whether every MiniQMT account has identical access, whether historical data is included, or what subscription conditions apply. It also does not document whether arbitrary network services or locally trained model artifacts work in every execution mode. These questions are separate from Python language support and cannot be answered from the README.

The application is aimed at personal quantitative work rather than institution-grade deployment. The quick-start guide explicitly identifies an early ecosystem, incomplete features, MiniQMT dependence, and personal maintenance as current limitations. These are documented constraints, not defects inferred from missing enterprise features. The README does not describe multi-account orchestration, distributed execution, database-backed storage, deployment automation, or a service-level commitment.

For model-based strategies, local execution transfers responsibility to the user. The documentation excerpt does not define model serialization, train and test data separation, random-state handling, or artifact management between runs. OSkhQuant can host Python strategy code according to the README, but reproducible model research still depends on conventions that the quick-start guide does not specify.

## How OSkhQuant Differs from Backtrader and vn.py

Backtrader and vn.py are the clearest alternatives because the README itself compares KHQuant with general open-source backtest frameworks. Their approach starts with a programmable framework. Developers construct or connect data feeds, define strategy behavior, and decide how results and broker connectivity should be integrated. OSkhQuant instead starts with MiniQMT and supplies a PyQt5 desktop application around the A-share connection.

That difference favors users who value a graphical, brokerage-connected workflow over framework neutrality. A MiniQMT user may spend less effort establishing the standard market-data integration because OSkhQuant presents it as built in. A Backtrader or vn.py workflow gives the developer more responsibility for adapters and infrastructure, but that separation can help when research must run independently of one brokerage environment.

The README positions Backtrader and vn.py as open-source backtest frameworks that use Python. It contrasts their need for users to arrange data and trading interfaces with KHQuant's MiniQMT-centered design.

OSkhQuant is therefore a poor replacement for a portable research harness that must run against interchangeable data sources. A Backtrader- or vn.py-based workflow may fit better when independence from MiniQMT is mandatory. OSkhQuant is more directly aligned when an A-share GUI, local Python strategies, and an existing MiniQMT setup are the primary requirements.

## OSkhQuant Maintenance Signals and License Constraints

The repository is not archived, and its last push was on 2026-10-13. The latest listed release is V2.1.4, dated 2026-04-18. These facts show recent repository activity, but the README does not define a release policy, compatibility matrix, migration guide, or long-term support period. Version comparisons should therefore be made against the exact executable or source revision being used rather than assuming that every broker environment remains compatible across releases.

The dependency file pins most Python packages but leaves `xtquant` without a version. That creates a concrete upgrade concern for source installations because the exact MiniQMT package is not fixed by `requirements.txt`. The listed PyQt5, pandas, NumPy, and matplotlib versions help identify the author's expected environment, while `xtquant` may vary by installation source. The README does not provide its installation prerequisites, so the complete dependency chain cannot be reconstructed from `requirements.txt` alone.

GitHub classifies the repository license as a custom license, and the repository includes a `LICENSE` file. The quick-start README does not reproduce its terms. This review therefore cannot state whether modification, redistribution, packaging, commercial use, or relicensing is permitted without restrictions. The README uses promotional descriptions such as free and open source, but those statements do not replace the operative text in `LICENSE`. That file should be reviewed before distributing a modified executable or incorporating OSkhQuant source into another product.

## Conclusion

OSkhQuant fits individual A-share researchers who already have a working MiniQMT environment and need a local GUI around Python strategies. It is a poor fit for users seeking a documented, self-contained data stack or a broker-independent general-purpose backtest framework. Before adoption, inspect the custom LICENSE file, reproduce the documented environment from `requirements.txt`, and confirm that the full website manual covers the strategy and backtest workflow needed by your team.

## FAQ

### Does OSkhQuant require MiniQMT?

Yes. The README says OSkhQuant is based on MiniQMT, relies on its market-data interface, and identifies MiniQMT dependence as a current limitation.

### Can I run OSkhQuant without installing Python?

The README says the packaged Windows executable avoids a separate Python installation because its runtime and dependencies are included. Source-based development requires a Python environment and the dependencies declared in `requirements.txt`.

### Does the OSkhQuant README include a complete first backtest?

No. The quick-start document points to the full website manual but does not show a complete MiniQMT connection, strategy setup, and backtest sequence.

## Sources

- [Issues](https://github.com/khscience/OSkhQuant/issues)
- [khscience/OSkhQuant on GitHub](https://github.com/khscience/OSkhQuant)
- [README](https://github.com/khscience/OSkhQuant/blob/main/README.md)
- [Releases](https://github.com/khscience/OSkhQuant/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/khscience-oskhquant
