📈 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.
Metadata
Release files for stock-analysis-yf 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| stock_analysis_yf-0.1.0.tar.gz | 26.9 kB | Without provenance | Details for stock_analysis_yf-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| stock_analysis_yf-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for stock_analysis_yf-0.1.0-py3-none-any.whl |
Total release size: 56.1 kB
Release files / stock_analysis_yf-0.1.0.tar.gz
| Download URL | stock_analysis_yf-0.1.0.tar.gz |
|---|---|
| Size | 26.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4ba7b07a7eead510ec7e965b7596ada0fed27e47ec002ccaa2691d4c040623dc
|
|
BLAKE2b-256 checksum How to use checksums |
b2bac195f4d7b6532068d87ba957232ea336877aadbf01c22efe504796579cac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.1
|
Release files / stock_analysis_yf-0.1.0-py3-none-any.whl
| Download URL | stock_analysis_yf-0.1.0-py3-none-any.whl |
|---|---|
| Size | 29.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
96e28af01439fd63bd52a749624e6da7d45ba1130ef3a19744d3a6aaf7654955
|
|
BLAKE2b-256 checksum How to use checksums |
96324eff5f9d80c53701169b0be802892cc25734e2fefca543fffba41bb050b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.1
|
Security for stock-analysis-yf 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.