CLI and helpers to scan yfinance data for TA-Lib candlestick patterns.
Project description
Forex Candlestick Scanner
Python package + CLI that downloads Yahoo Finance data via yfinance and runs TA-Lib candlestick detectors for your symbol, timeframe, and date filters.
Quick start
# create env
python -m venv .venv
.\.venv\Scripts\activate # PowerShell; adjust for your shell
# install the package (editable for local dev)
pip install -e .
# run CLI (two entrypoints)
yfinance-ta-patterns --pattern KICKING --symbol EURUSD --timeframe 5m --period 60d
# or
yftp --all-patterns --symbol EURUSD --timeframe 5m --period 60d --date 2025-04-01
pyproject.toml targets Python >=3.12.
CLI usage
yfinance-ta-patterns [--pattern NAME | --all-patterns]
[--symbol EURUSD] [--period 60d]
[--timeframe 15m] [--date YYYY-MM-DD]
[--start-date YYYY-MM-DD] [--end-date YYYY-MM-DD]
--pattern: Single candlestick name (with or withoutCDLprefix).--all-patterns: Scan every TA-Lib candlestick detector.--symbol: Ticker without suffix;=Xis appended automatically for Forex (defaultEURUSD).--period: History window passed toyfinance(e.g.,60d,1mo).--timeframe: UseM1/M5/M15/M30/H1/D1or rawyfinanceintervals (1m,5m,1h,1d, etc.).--date: Filter signals for a single day.--start-date/--end-date: Inclusive range filter (cannot be combined with--date).
Examples
- All patterns for a single day:
yftp --all-patterns --symbol EURUSD --timeframe 5m --period 60d --date 2025-04-01
- All patterns across a range:
yftp --all-patterns --symbol EURUSD --timeframe 5m --period 60d --start-date 2025-04-01 --end-date 2025-04-10
- One pattern without date filter:
yftp --pattern KICKING --symbol EURUSD --timeframe 5m --period 60d
Data loader
yfinance_ta_patterns/forex_data_loader.py fetches and normalizes OHLC data. It appends =X to symbols when missing and converts timestamps to UTC before shifting to the configured timezone (Europe/Moscow by default).
Pattern analysis
yfinance_ta_patterns/pattern_analyzer.py wraps TA-Lib's CDL* functions, returning non-zero signals and applying optional date filters. When --all-patterns is used, it iterates over the full catalog and prints hits per pattern.
Pattern ranking helper (optional)
yfinance_ta_patterns/pattern_tester.py contains a backtesting-style ranking tool. It depends on utils.pattern_helper.PatternHelper to enumerate patterns; add that helper before running comparisons or exports.
Project layout
yfinance_ta_patterns/cli.py: CLI entry point and argument parsing.yfinance_ta_patterns/forex_data_loader.py: Data download and timezone normalization.yfinance_ta_patterns/pattern_analyzer.py: Candlestick signal extraction.yfinance_ta_patterns/pattern_tester.py: Experimental ranking/backtest utilities.main.py: Thin wrapper to launch the CLI.
Packaging and releases
- Nightly GitHub Actions workflow builds onefile Nuitka binaries for Windows/macOS/Linux (PyPI wheels for TA-Lib on all platforms) and publishes nightly prereleases.
- PyPI publish workflow runs on tags (needs secret
PYPI_API_TOKEN); tags likev0.1.0will build sdist/wheel and upload.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yfinance_ta_patterns-0.1.2.tar.gz.
File metadata
- Download URL: yfinance_ta_patterns-0.1.2.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7bff60eedf78642a0895dbc32614d1575593c499a90fa79c4a681f815480ff5f
|
|
| MD5 |
cb085e20e240e2736de70e7afaef750e
|
|
| BLAKE2b-256 |
e53e4bdf877c1bc414d266ae04e46e979d472d4984b0abdd2aaf4e294a10c5bf
|
File details
Details for the file yfinance_ta_patterns-0.1.2-py3-none-any.whl.
File metadata
- Download URL: yfinance_ta_patterns-0.1.2-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db32702cfd9fdc09bf0b133d5b1ffac294ce90afdaeff2dd30b51469f0630e1f
|
|
| MD5 |
6470c9ad4b7ffb84a25526172e33dccb
|
|
| BLAKE2b-256 |
e42de73a45fafc448f37ab8e5d3357ea63d1044c711414220e9fcee1bf6bfa9c
|