FinLab Getting Started: Build Your First Backtest in 3 Minutes
The fastest path is to choose an execution environment, download closing price data, write the first stock-selection condition, then run backtest.sim(). If you want AI-assisted strategy writing, start directly from studio.finlab.tw.
| Use case | Recommended entry | Next step |
|---|---|---|
| No installation, test a strategy immediately | studio.finlab.tw |
Describe the strategy in natural language |
| First time using FinLab | Google Colab | Run the examples on this page |
| Existing Python environment | Local pip install finlab |
Download data and backtest |
| Complex dependency environment | Docker | Open JupyterLab |
Related guides: Data Download, Backtesting, and FAQ.
Installation
Supports Windows, macOS, Linux, and Colab; Docker also available.
Visit studio.finlab.tw to write strategies through AI conversation — no installation required.
Compatibility note
If you encounter dependency issues, try the Docker version instead.
Download Data
Use the following code to download data. You can browse available datasets.
Write a Strategy
Use simple Pandas syntax to write strategy logic. For example, a 300-day high breakout strategy: