Repository inventory

koreal6803/finlab-ai

Skills indexed from this repository, with install-style signals scoped to the repo.
1 skills260 GitHub stars0 weekly installsTypeScriptGitHubOwner profile

Overview

This skill is a concise, execution-first guide to the FinLab quantitative trading package for the Taiwan stock market. It focuses on practical workflows for data access, factor construction, backtesting, and moving from simulation to live orders. Use it to quickly produce reproducible strategies, run backtests, and get actionable metrics and reports.

How this skill works

The guide walks through a 5-step workflow: fetch FinLab tables with data.get(), build factors and boolean conditions using FinLabDataFrame helpers, construct a position DataFrame, run sim() for backtesting, and optionally convert results to live orders via OrderExecutor. It highlights token setup (.env), quota handling, and running code so users see results rather than copy-pasting instructions.

When to use it

  • You need rapid backtest results and metrics for Taiwan (TSE/OTC) strategies.
  • You are building factor-based stock selection using FinLab data and indicators.
  • You want to convert backtest outputs to broker orders for execution.
  • You must diagnose lookahead bias, data frequency or universe issues.
  • You want to compare multiple strategies and print clear reports/charts.

Best practices

  • Persist FINLAB_API_TOKEN in a .env and load with python-dotenv for reproducible runs.
  • Always run code and present numeric results or open saved charts; avoid handing off execution to users.
  • Use shift(1) and FinLabDataFrame methods to prevent lookahead bias; never reindex manually.
  • Test with sim(..., upload=False) for experiments; set upload=True only for production-ready strategies.
  • Respect daily quota limits; detect free tier and surface upgrade guidance when quota errors occur.

Example use cases

  • Build a monthly rebalanced low P/B strategy: fetch price and PB, rank by PB, is_smallest(10), sim(resample='M').
  • Backtest a momentum+liquidity screen: close.rise(10) & volume.average(20) > threshold, limit top N by market value.
  • Compare two risk-managed variants: run sim() with different stop_loss/take_profit and print a comparison table.
  • Convert a successful backtest to live orders: Position.from_report(report) -> OrderExecutor -> create_orders().
  • Run factor analysis and IC tests using built-in factor-analysis helpers to refine signals.

FAQ

Free tier resets at 8:00 AM Taiwan time (UTC+8). Inform users about upgrade to VIP (5000 MB) and show the payment link for higher quota.

How do I avoid lookahead bias?

Use time-shifts (e.g., shift(1)), FinLabDataFrame methods for indicators, and never assign new indices or use positional iloc that references future rows.

1 skills

More from this maintainer
Other repositories and skills published under the same GitHub owner.
Skills library
Jump back to the full directory or explore grouped topics.
Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational