Technical Pattern Analysis
A rule‑based pattern detection engine with optional LSTM filtering. Designed for educational exploration of equity price data.
Live Scan
Engine
Real‑time pattern detection on streaming data. Includes LSTM post‑filtering (optional).
Historic
Backtester
Walk‑forward validation on local datasets. Compare against baseline strategies.
This tool does not provide investment advice. All patterns and signals are experimental and should not be used for real trading decisions. Past performance is not indicative of future results.
Pattern Detection
Rule‑Based Geometry
Uses argrelextrema to find peaks/troughs and applies strict geometric constraints (symmetry, slope, retracement) to identify formations.
LSTM Confidence Filter
Optional PyTorch LSTM trained on‑the‑fly to adjust confidence scores. Does not influence detection, only post‑processing.
Evaluation
Walk‑Forward Validation
Expanding window backtesting avoids look‑ahead bias. Reports Sharpe, max drawdown, and win rate.
Baseline Comparisons
Compares pattern signals against Buy‑and‑Hold and SMA crossover to assess added value.
Transparency
Unit Tests
Deterministic pattern detectors are covered by pytest with synthetic test cases.
Results Notebook
Jupyter notebook with example detections and performance metrics overlaid on price charts.
Supported Patterns
Head & Shoulders
Bearish reversal: left shoulder → head → right shoulder, with neckline breakout.
Double Bottom
Bullish reversal: two troughs of similar level, neckline breakout above.
Cup and Handle
Bullish continuation: rounded cup followed by handle, breakout above rim.
Symmetrical Triangle
Consolidation with converging trendlines; breakout can be bullish or bearish.