Ta Lib
C-optimized technical analysis with 150+ functions and 61 candlestick pattern...
Install
npx skills add agiprolabs/claude-trading-skills --skill ta-lib -g -a claude-code -y- Repository
- agiprolabs/claude-trading-skills507
- Category
- Engineering
- Updated
- 2mo ago
- License
- MIT
- Context cost
- Mediumabout 2,386 tokens
- Runs scripts
- Yes, review before use
What it does
C-optimized technical analysis with 150+ functions and 61 candlestick pattern recognition functions via TA-Lib
ta-lib, C-Optimized Technical Analysis
TA-Lib (Technical Analysis Library) is a C library with a Python wrapper providing 150+ technical analysis functions and 61 candlestick pattern recognition functions. It is the industry standard for performance-critical indicator computation, used in production trading systems where pandas-ta or pure-Python alternatives are too slow.
What TA-Lib Is
TA-Lib was originally written in C for financial market data analysis. The Python wrapper (TA-Lib on PyPI, imported as talib) provides:
- 150+ indicator functions across overlap, momentum, volume, volatility, cycle, and math categories
- 61 candlestick pattern recognition functions, the most comprehensive pattern library available
- C-speed computation, 10-100x faster than pure-Python equivalents on large datasets
- Two APIs: a function API (pass arrays directly) and an abstract API (pass dict of arrays)
- NumPy native, all inputs and outputs are NumPy arrays
Installation
TA-Lib requires the underlying C library to be installed first:
# macOS
brew install ta-lib
uv pip install TA-Lib numpy pandas
# Ubuntu/Debian
sudo apt-get install -y ta-lib
uv pip install TA-Lib numpy pandas
# From source (any platform)
wget https://github.com/ta-lib/ta-lib/releases/download/v0.6.4/ta-lib-0.6.4-src.tar.gz
tar -xzf ta-lib-0.6.4-src.tar.gz
cd ta-lib-0.6.4
./configure --prefix=/usr/local
make && sudo make install
uv pip install TA-Lib numpy pandas
If the C library is not installed, import talib will fail with an ImportError. The scripts in this skill include fallback logic for environments without TA-Lib installed.
