finlab
Analyzing stock has never been easier.
Decision gist · record as of 2026-08-14
Yes, with conditions. Install if you are backtesting Taiwan stock strategies and accept GPL-3.0-or-later licensing. The package is actively maintained, supports modern Python versions, and has no known vulnerabilities. Medium install friction from 10 dependencies is typical for data-science workflows. Not suitable if you require proprietary or closed-source derivative work.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later; data retrieval depends on finlab's remote database access.
- Medium install friction due to 10 runtime dependencies including numpy, pandas, scipy, and cryptography.
- Package is actively maintained with recent release history and supports modern Python versions (3.9–3.14) across multiple platforms via precompiled wheels.
License · maintenance · safety
GPL-3.0-or-later (copyleft) — Licensed under GPL-3.0-or-later (copyleft). Any derivative work or distribution must also be open-source under a compatible GPL license; proprietary use or closed-source modifications are not permitted.
last release 2026-08-02 (12 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 77,351 downloads/mo, #14,533 on PyPI
Alternatives
Verify before relying
from finlab import data, backtest
close = data.get('price:收盤價')
position = close >= close.rolling(300).max()
report = backtest.sim(position, resample='M')
report.display()- Whether the 2000 stocks dataset covers all Taiwan-listed companies or a specific subset.
- Exact historical data depth and date range available beyond 'past ten years' mentioned in description.
- Performance characteristics and typical runtime for backtesting 2000 stocks as claimed.
- Whether qlib machine-learning integration is built-in or requires separate installation.
What it is and what it does
Finlab is a backtesting framework designed for Taiwan stock market analysis. It provides one-line access to historical price and fundamental data for 2000 stocks, integrates seamlessly with pandas for strategy definition, and executes multi-stock backtests with detailed performance reports. Strategies are written using familiar pandas syntax—boolean conditions on rolling windows, resampling logic, and position signals—making it accessible to traders without deep programming expertise.
The package combines data retrieval, strategy expression, and backtesting into a unified workflow. It handles multi-frequency data alignment automatically and uses Cython-optimized computation to run backtests on large stock universes in seconds. It also supports machine-learning strategy development via qlib integration. The 10 runtime dependencies (requests, numpy, pandas, pyarrow, lz4, tqdm, jinja2, ipython, scipy, cryptography) provide data fetching, numerical computation, and reporting capabilities.
Use it for
- Test a mean-reversion strategy on 2000 Taiwan stocks over a decade of historical data in minutes.
- Develop and iterate on technical-indicator-based trading rules using pandas rolling-window operations.
- Generate detailed backtest reports with performance metrics to compare strategy variants.
- Prototype machine-learning trading strategies using qlib within the finlab framework.
- Analyze historical stock performance and identify patterns across Taiwan's equity market.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
Install if you are backtesting Taiwan stock strategies and accept GPL-3.0-or-later licensing. The package is actively maintained, supports modern Python versions, and has no known vulnerabilities. Medium install friction from 10 dependencies is typical for data-science workflows. Not suitable if you require proprietary or closed-source derivative work.
Install
finlab on PyPI
Before you install
Medium install friction due to 10 runtime dependencies including numpy, pandas, scipy, and cryptography. Package is actively maintained with recent release history and supports modern Python versions (3.9–3.14) across multiple platforms via precompiled wheels.
Requires Python 3.9 or later; data retrieval depends on finlab's remote database access.
License in practice
Licensed under GPL-3.0-or-later (copyleft). Any derivative work or distribution must also be open-source under a compatible GPL license; proprietary use or closed-source modifications are not permitted.
Quickstart
from finlab import data, backtest
close = data.get('price:收盤價')
position = close >= close.rolling(300).max()
report = backtest.sim(position, resample='M')
report.display()
Verify before relying
- Whether the 2000 stocks dataset covers all Taiwan-listed companies or a specific subset.
- Exact historical data depth and date range available beyond 'past ten years' mentioned in description.
- Performance characteristics and typical runtime for backtesting 2000 stocks as claimed.
- Whether qlib machine-learning integration is built-in or requires separate installation.
Package facts
| License | GPL-3.0-or-later copyleft |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 10 packagesrequestsnumpypandaspyarrowlz4tqdmjinja2ipythonscipycryptography |
| Maintenance | Actively maintained 12 days since the last release |
| First released | |
| Downloads | 77,351 / month, #14,533 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Operating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9 |
Evidence: finlab-2.0.17-cp310-cp310-macosx_10_15_universal2.whl; finlab-2.0.17-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; finlab-2.0.17-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; finlab-2.0.17-cp310-cp310-win_amd64.whl; finlab-2.0.17-cp311-cp311-macosx_10_15_universal2.whl; finlab-2.0.17-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; finlab-2.0.17-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; finlab-2.0.17-cp311-cp311-win_amd64.whl; finlab-2.0.17-cp312-cp312-macosx_10_15_universal2.whl; finlab-2.0.17-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; finlab-2.0.17-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; finlab-2.0.17-cp312-cp312-win_amd64.whl; finlab-2.0.17-cp313-cp313-macosx_10_15_universal2.whl; finlab-2.0.17-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; finlab-2.0.17-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; finlab-2.0.17-cp313-cp313-win_amd64.whl; finlab-2.0.17-cp314-cp314-macosx_10_15_universal2.whl; finlab-2.0.17-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; finlab-2.0.17-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; finlab-2.0.17-cp314-cp314-win_amd64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “stock backtesting framework”
- finlabBacktest trading strategies on Taiwan stock market data by writing…
- backtestingBacktesting.py lets you define and test trading strategies against…
- backtraderBacktrader is a Python backtesting and live trading engine that…
Give your agent the search over MCP, or paste the wish link into any chat.
More Information Analysis packages
A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.
pyarrow provides Python bindings to Apache Arrow's C++ libraries for efficient columnar data processing, serialization, and interoperability with pandas, NumPy, and other Python ecosystem tools.
NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.
Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.
ContourPy calculates contours of 2D quadrilateral grids using C++11 algorithms wrapped in Python, offering serial and multithreaded implementations without requiring Matplotlib as a dependency.
Snowpark Python provides APIs to query and process data directly in Snowflake without moving data to your local system, with support for both native Snowpark and pandas-compatible interfaces.
Install it if you use Snowflake and want to process data without moving it to your application layer.
See also backtesting · vectorbt · tushare · efinance · lumibot · pandas_market_calendars · baostock · finance-datareader · stockstats · stockfish