finlab

Installation
Summary

Quantitative trading strategy development, backtesting, and live execution using FinLab's data and simulation engine.

  • Fetch 900+ financial data columns (price, fundamentals, valuation, institutional trading) via data.get() with universe filtering by market and industry
  • Build stock selection strategies using FinLabDataFrame methods: trend detection, moving averages, ranking, and factor combinations with boolean logic
  • Backtest strategies with sim() including risk management (stop-loss, take-profit, trailing stops), rebalancing schedules, fees, and taxes
  • Execute live trades via broker integration (Sinopac) by converting backtest positions to orders through OrderExecutor
  • Requires Python 3.10+, uv package manager, and FinLab API token (free tier: 500 MB/day; VIP: 5000 MB/day)
SKILL.md

FinLab Quantitative Trading Package

Prerequisites

Before running any FinLab code, verify these in order:

  1. uv is installed (Python package manager):

    uv --version
    

    If uv is not installed, tell the user to install it.

    After installing, ensure uv is on PATH:

    source $HOME/.local/bin/env 2>/dev/null  # Add uv to current shell
    
Installs
1.1K
GitHub Stars
360
First Seen
Jan 25, 2026