# FinHack is a quant research framework whose author says the current code does not run

> FinHack is a Chinese quantitative finance framework covering data collection, factor computation, factor mining, factor analysis, machine learning, strategy writing, backtesting and live trading, with A-share market rules and a tushare collector built in. The README states plainly that the code being rewritten since 2025-03-11 does not run, and the licence is dual GPL-3.0 and commercial.

**FinHackCN/finhack** — FinHack®，一个易于拓展的量化金融框架，它在当前版本中集成了数据采集、因子计算、因子挖掘、因子分析、机器学习、策略编写、量化回测、实盘接入等全流程的量化投研工作。

- Repository: https://github.com/FinHackCN/finhack
- Website: https://github.com/FinHackCN/finhack/wiki/1%E3%80%81%E5%BF%AB%E9%80%9F%E5%85%A5%E9%97%A8
- Stars: 1,255 · Forks: 233
- Language: Python
- License: NOASSERTION
- Published: 2026-10-19 · Updated: 2026-10-19 · Language: en
- Canonical page: https://hysenlabs.com/projects/finhackcn-finhack

## The README opens by saying the current code does not run

The most important sentence in this repository is at the top of the README, dated 2025-03-11. It announces good news, that the codebase is being updated again, and bad news, that there is going to be a large refactor and the code updated from today does not run. Then it states the intent: if it succeeds, the project will support DuckDB, factor computation and mining for various markets including A-shares, US stocks, futures and cryptocurrency, and backtesting at the instrument level and the 1-minute level.

That warning is unusual to find in a project README, and it changes how you should read everything else here. The feature list describes a framework in its current form, and the surrounding text describes a direction of travel. The last push was on 2026-08-19, so the work is ongoing, but the specific tree you clone is not guaranteed to be in a runnable state.

The project describes itself as an easily extensible quantitative finance framework that integrates a complete workflow for quantitative investment research, covering data collection, factor computation, factor mining, factor analysis, machine learning, strategy development and quantitative backtesting, with live trading access. The stated audience is Quants and researchers in related fields. The framework is Chinese in origin, the documentation is in Chinese with an English summary, and the repository lives under the FinHackCN account on GitHub.

The name is a pun: FinHack with a registered trademark symbol, and the Chinese title is 炼金术, alchemy.

## Dual licensing means GPL-3.0 by default and a purchase for commercial use

The licensing section is unusually explicit for an open source project. FinHack uses a dual licence of GNU General Public License v3.0 and a commercial licence. The default public licence is GPL-3.0. If you want to use the project in a way that is incompatible with GPL-3.0, you must buy the commercial licence, and the README gives a WeChat contact (woldywei) for pricing and more information.

There is a COMMERCIAL_LICENSE.txt at the repository root next to LICENSE.txt, so both texts are present. The practical effect for an engineer evaluating this is that a company shipping a closed product which links FinHack cannot simply use the open licence, and a company whose internal use does not count as distribution may be fine. That is exactly the kind of question the licence terms are there to answer, and the answer for a commercial product is a conversation with the author rather than a pull request.

The repository is published under a custom licence that GitHub cannot classify, and the dependency set is heavy. The requirements file is generated by pip-compile with Python 3.12 and pins exact versions for everything from alphalens-reloaded 0.4.5, empyrical-reloaded 0.5.11 and gplearn 0.4.2 through dask 2025.2.0, openai, tushare, yfinance, flask, matplotlib and the parallel processing libraries pandarallel and joblib. The setup.py declares python_requires='>=3.6' while the requirements were compiled with Python 3.12 and the Docker image uses Python 3.9, so the supported version story is not tidy.

## A-share market rules are modelled in the backtest, not bolted on

The feature list has one item that distinguishes this from a generic backtesting tutorial: the backtesting system supports A-share rules, including price limit restrictions, the T+1 rule constraint, and custom constraint rules.

That is the part of the framework a Chinese-market quant actually needs and cannot easily build for themselves. A backtest that treats a Chinese stock as a freely tradable asset is wrong in ways that are hard to see. On a day the stock hits its daily limit, you cannot buy, and a backtest that lets you buy produces a return series that no live strategy could have achieved. The T+1 rule means shares bought today cannot be sold today, which changes the holding logic of every short-horizon strategy in the market.

The other rule the README highlights is the dynamic adjusted price mechanism in the backtest, described as avoiding the large price error that appears between forward and backward adjusted prices, and as optimising backtest speed. Adjustment is a known trap: naive adjustment introduces lookahead into the price series, and a framework that has thought about which adjustment to use and when is ahead of a script that has not.

The feature list also includes a formula-style computation engine that can compute factors like Alpha101 and Alpha191, and it ships both of those factor sets. That is a concrete piece of reusable work, since the Alpha factor families are the standard quantitative research baseline.

## Data collection starts with tushare, and the plugin model is the extension story

The built-in data collector targets tushare, and you fill in the corresponding token to collect tushare data with one click. The README shows screenshots for data collection, factor computation, factor mining, backtesting and live trading access, in that order, which is roughly the order of a researcher's workflow.

The extension model is stated first in the feature list as good extensibility, including but not limited to extending your own data sources, factors, AI models, quantitative strategies and backtest rules. The other structural feature is environment isolation, through creating different strategy sets in the form of project directories, which the README says suits multi-user environments.

That last point is worth more than it sounds. Quant research usually degenerates into a directory where everyone's experiments share one set of symbols, one config and one database. A tool that makes each strategy a self-contained project directory is solving an organisational problem as much as a technical one.

The multi-process support is another item: multi-process backtesting and multi-process machine learning training, described as making full use of server compute. In practice this is the difference between a backtest that finishes overnight and one that finishes in an hour, and it is the reason a framework like this exists rather than a notebook.

The repository layout reflects the split. The finhack/ package holds the code, database/ holds data, examples/ contains a demo-project directory, script/ holds the tooling, and there is a Dockerfile plus requirements.in, requirements.sh and an upgrade_packages.py.

## The command line entry point and the Docker image show how it is meant to be used

The setup.py replaces the old scripts entry with console_scripts, with a comment explaining it avoids pkg_resources deprecation warnings. The single command it registers is finhack, mapped to finhack.core.command.finhack:main. So the framework is driven by a command line tool, not by importing functions into a notebook.

The Dockerfile is the more informative document. It starts from the official Python 3.9 image, installs wget, tar and build-essential, then downloads and builds TA-Lib from source, ta-lib-0.4.0-src.tar.gz from SourceForge, configuring with --prefix=/usr, running make and make install, and cleaning up the source afterwards. It then sets LD_LIBRARY_PATH to include /usr/local/lib so the TA-Lib shared library is found, points pip at the Tsinghua PyPI mirror, upgrades pip, installs the finhack package, and creates a project with finhack project create --project_path=/app/finhack_project. The final working directory is that project and the container's default command is a tail on /dev/null, which keeps the container alive so you can exec into it. A commented line shows the intended way in: finhack collector run.

The TA-Lib build is the notable cost. TA-Lib is a C library, which is why the image compiles it from source. That is the price of the technical analysis factor set, and it is a real installation cost for anyone not using the container.

## Where FinHack is the wrong tool

The first wrong-tool case is the one the README announces. If you need a framework you can clone and run today, this is not that, and the author says so. A researcher who needs a factor calculation engine this week will spend their time on a broken checkout rather than on research.

The second is market coverage. The supported-in-practice market is A-shares, with futures, US stocks, forex and Bitcoin listed in the TODO list along with update reminders and announcement notifications, membership registration and a strategy marketplace. The author's own framing of the target state, with DuckDB and minute-level backtesting across several markets, describes work that has not landed yet. A team trading US equities today needs a different tool, and rules built around daily price limits do not transfer to a market without them.

The third is the licence, for any commercial deployment incompatible with GPL-3.0, where the cost is not the price of the commercial licence but the dependency on a negotiation with a single maintainer.

The fair comparison is with a narrower framework that does one thing well and keeps its dependencies modern. FinHack's value is the integration: the same factor definitions feeding the same backtester that respects Chinese market rules, with a tushare collector and the Alpha factor sets already wired in. If you do not need the Chinese market specifics and the full-stack integration, a smaller tool with a smaller dependency tree will serve you better.

## Conclusion

FinHack fits a researcher or student who wants to study an end-to-end quant workflow in a framework that handles Chinese A-share specifics such as price limits and T+1 settlement, and it does not fit a team that needs working code today. The README states that the code being updated since 2025-03-11 does not run and that the author is doing a large refactor, so before evaluating it, read the quick start wiki and confirm which tree you are looking at, and note that a commercial licence is required for any use incompatible with GPL-3.0.

## FAQ

### Does FinHack currently run?

The README states, in an update dated 2025-03-11, that the code being updated from that point does not run because the author is doing a large refactor. The last push was on 2026-08-19, so the work is ongoing, and the quick start wiki is the place to check the current state.

### What licence does FinHack use?

FinHack is dual licensed under GNU General Public License v3.0 and a commercial licence, with GPL-3.0 as the default. If you want to use it in a way incompatible with GPL-3.0 you must purchase the commercial licence, and the README gives a WeChat contact for pricing.

### What market rules does the FinHack backtest support?

The backtest supports A-share rules including price limit restrictions, the T+1 rule constraint, and custom constraint rules. It also uses a dynamic adjusted price mechanism to avoid the large price error between forward and backward adjusted prices.

### How does FinHack collect market data?

The project ships a built-in tushare data collector. You fill in the corresponding token in the configuration and can collect tushare data with one click. Data is stored under the database/ directory in the repository layout.

## Sources

- [FinHackCN/finhack on GitHub](https://github.com/FinHackCN/finhack)
- [Issues](https://github.com/FinHackCN/finhack/issues)
- [Project website](https://github.com/FinHackCN/finhack/wiki/1%E3%80%81%E5%BF%AB%E9%80%9F%E5%85%A5%E9%97%A8)
- [README](https://github.com/FinHackCN/finhack/blob/main/README.md)

---

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