A suite of stock analysis tools using yfinance
Project description
📈 Advanced Stock Analysis Suite (yfinance)
A professional-grade Python suite for automated technical analysis of Indian stocks. This tool consolidates multiple high-performance analysis modules into a single, user-friendly execution flow with intelligent caching and centralized configuration.
🚀 Key Features
1. 🔍 LTP Near Gaps
Detects significant price gaps (bullish and bearish) and identifies stocks currently trading near these unfilled gap zones—prime areas for potential support or resistance.
2. 🧱 Fractal Support & Resistance
Uses vectorized fractal detection to identify statistically significant price levels. It calculates level strength based on historical touches and proximity.
3. 🕯️ Candle & Gap Analysis
Provides a statistical breakdown of recent price action:
- Green/Red/Doji distribution.
- Open = High / Open = Low detection.
- Sustained gap performance.
4. 🧬 Fibonacci Retracement Levels
Automates the plotting of Fibonacci levels from recent swing highs and lows, highlighting stocks trading near key levels like the 50% or 61.8% "Golden Ratio."
5. 📉 Chart Pattern Detection
Vectorized detection of major classical patterns:
- Reversals: Double Top/Bottom, Head & Shoulders (Regular/Inverse).
- Continuation: Falling/Rising Wedges, Ascending/Descending/Symmetrical Triangles.
- Trend Channels: Ascending and Descending channels.
📦 Project Structure
stock_analysis/
├── run_analysis.py # 🚀 Main entry point & CONFIG HUB
├── stock_analysis/ # Core package logic
│ ├── stock_data_manager.py # Cache & fetching
│ ├── chart_patterns.py # Pattern logic
│ ├── ... (other modules)
├── data_cache/ # Local .pkl data storage
├── outputs/ # Results, CSVs, and Charts
└── pyproject.toml # Build configuration
🛠️ Installation
- Clone or download this repository.
- Install dependencies:
pip install -r requirements.txt
🚦 Quick Start
1. Configure your Scan
Open run_analysis.py at the root. You can easily modify:
- Ticker Groups: NSE indices, NIFTY 500, Custom lists.
- Periods: Change scan duration (e.g.,
1y,2y). - Tolerances: Fine-tune how "near" a level a stock must be.
2. Run the Analysis
python run_analysis.py
💾 Intelligent Caching
This suite features a smart slicing cache. If you've fetched 1 year of data, running a 1-month candle analysis will be instantaneous, as it slices the existing local data rather than re-downloading.
📊 Outputs
Results are neatly organized in the outputs/ folder:
- Gaps Result: Detailed CSV of unfilled gaps.
- Support_Resistance: High-resolution charts with plotted levels.
- Fibonacci: CSV and charts showing retracement proximity.
- Chart_Patterns: Identified breakout/reversal opportunities.
- Candle_Analysis: Summary reports of price action statistics.
⚖️ Disclaimer
This project is for educational and research purposes only. It does not constitute financial advice. Always verify technical signals with your own due diligence before making trading decisions.
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 stock_analysis_yf-0.1.0.tar.gz.
File metadata
- Download URL: stock_analysis_yf-0.1.0.tar.gz
- Upload date:
- Size: 26.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ba7b07a7eead510ec7e965b7596ada0fed27e47ec002ccaa2691d4c040623dc
|
|
| MD5 |
454a80f451a04d06f5e105d808645a24
|
|
| BLAKE2b-256 |
b2bac195f4d7b6532068d87ba957232ea336877aadbf01c22efe504796579cac
|
File details
Details for the file stock_analysis_yf-0.1.0-py3-none-any.whl.
File metadata
- Download URL: stock_analysis_yf-0.1.0-py3-none-any.whl
- Upload date:
- Size: 29.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96e28af01439fd63bd52a749624e6da7d45ba1130ef3a19744d3a6aaf7654955
|
|
| MD5 |
87679d42516979ac6bdd7b9008cc5163
|
|
| BLAKE2b-256 |
96324eff5f9d80c53701169b0be802892cc25734e2fefca543fffba41bb050b2
|