v0.3.75 Latest
All 61 Candlestick Patterns
No C Build Needed
6 MCP Tools: yfinance-ta-mcp
yfinance-ta-patterns — Institutional Candlestick & Quant Scanner
Detects all 61 TA-Lib candlestick patterns across Equities, Crypto, Commodities, and 56 Forex pairs with zero C-build requirements, evaluates deterministic multi-factor AI Confluence (Trend + RSI + RVOL + ATR), simulates unbiased next-open (Open[i+1]) backtests, and ships a 6-tool Native MCP server.
📦 1. Installation & Compatibility Matrix
uv add yfinance-ta-patterns
| Runtime / OS | Versions | Status & Mode |
|---|---|---|
| CPython | 3.8 – 3.16 | CPython 3.8–3.15 zero-compile pure-NumPy/yfinance engine |
| Free-Threaded No-GIL | 3.13t – 3.16t (PEP 703) | CPython 3.14t verified No-GIL (3.13t wheels-only with --no-build) |
| PyPy JIT | 3.8 – 3.12 | Pure-Python fallback for all 61 patterns when NumPy/pandas provided |
| Operating Systems | Windows / Linux / macOS | Linux x86_64, Windows, macOS (optional [gemm] & [talib] extras) |
📈 2. Data Loader, AI Confluence Scorer & Analyst
quant_scan.py
from yfinance_ta_patterns import (
MarketDataLoader,
AIPatternScorer,
AIMarketAnalyst,
PatternRankingTester,
)
# Fetch OHLCV with >=200 bars for full EMA200 warm-up
df = MarketDataLoader(symbol="AAPL", period="2y", interval="1d").get_data()
# Multi-factor AI Confluence Scoring (Trend + RSI + RVOL + ATR setups)
scorer = AIPatternScorer(df)
for sig in scorer.score_all_active(min_confidence=0.60):
print(sig.pattern_name, round(sig.confidence * 100, 1), sig.grade.value, sig.action)
if sig.setup:
print(" Entry:", sig.setup.entry_price, "SL:", sig.setup.stop_loss, "TP1:", sig.setup.take_profit_1)
# LLM-ready market brief & prompt synthesis
analyst = AIMarketAnalyst(df, symbol="AAPL")
brief = analyst.generate_brief(analyst.analyze(min_confidence=0.65))
🔌 3. CLI (yftp) & Native MCP Tools (yfinance-ta-mcp)
| MCP Tool | Key Parameters | Purpose |
|---|---|---|
ta_scan_symbol | symbol, timeframe, period, min_confidence, include_news | Full asset scan with AI Confluence score, Entry/SL/TP setups & news |
ta_scan_watchlist | symbols (<=25), timeframe, min_confidence, compact | Rank candlestick setups across multi-asset portfolios |
ta_backtest_patterns | symbol, timeframe, holding_period, commission_pct | Unbiased Open[i+1] backtest reporting Win Rate, Profit Factor, Sharpe, MaxDD |
ta_get_economic_calendar | currency, importance, start_date, end_date | Macroeconomic calendar events mapped to EUR, USD, GBP, JPY |
ta_get_news | symbol, max_items | Real-time financial headlines & timestamps |
ta_list_patterns | *(none)* | Return all 61 supported patterns and backend status |
yftp CLI examples
yftp --all-patterns --symbol EURUSD,GBPUSD --timeframe 1h --ai --min-confidence 0.65
yftp --backtest --symbol EURJPY --timeframe 1h --execution next_open --min-signals 10
yftp --calendar --symbol EURUSD
yfinance-ta-mcp