A comprehensive stock analysis system that combines Value Investing (DCF), Trend Trading (Livermore Rules), and Market Sentiment (VIX) to generate buy signals only when all three factors align.
bash
# Install dependencies
pip3 install yfinance pandas numpy matplotlib pyyaml requests
# Set API key (optional, for enhanced financial data)
export FMP_API_KEY="your_key_here"
# Run analysis
python3 scripts/decision_engine.py AAPL
Buy Conditions:
Output: Trend score 0-100, key support/resistance levels
Buy Conditions:
Output: Sentiment score 0-100, market regime
text
BUY = Value ≥ 60 AND Trend ≥ 60 AND Sentiment ≥ 60 AND Composite ≥ 70
python
from scripts.decision_engine import StockAnalyzer
analyzer = StockAnalyzer(config_path="config.yaml")
result = analyzer.analyze("TSLA")
print(result['report'])
python
analyzer.plot_analysis(result['result'], save_path="tsla_analysis.png")
DataSourceRequiredPrice/VolumeYahoo Finance (yfinance)FreeFinancialsFMP APIOptional (free tier)VIXCBOE via YahooFreeSector ETFsYahoo FinanceFree
Edit config.yaml to customize:
The system generates a formatted report including:
text
us-stock-analyzer/
├── SKILL.md # This file
├── config.yaml # Configuration
├── requirements.txt # Python dependencies
├── scripts/
│ ├── data_fetcher.py # Data retrieval
│ ├── dcf_analyzer.py # DCF valuation
│ ├── trend_analyzer.py # Livermore trend analysis
│ ├── sentiment_analyzer.py # VIX sentiment
│ └── decision_engine.py # Three-factor engine
├── references/
│ └── methodology.md # Detailed methodology
└── examples/
└── sample_report.md # Example output
See references/methodology.md for:
This tool is for informational purposes only and does not constitute investment advice. Always conduct your own research and consider consulting a financial advisor before making investment decisions.
MIT-0 (Public Domain)