US Stock Analyzer
by @lyflyd
Three-factor stock analysis combining DCF valuation, Livermore trend trading rules, and VIX market sentiment to generate high-confidence buy signals for US e...
clawhub install us-stock-analyzerπ About This Skill
name: us-stock-analyzer description: Three-factor stock analysis combining DCF valuation, Livermore trend trading rules, and VIX market sentiment to generate high-confidence buy signals for US equities. Use when analyzing US stocks for investment decisions, determining optimal entry points, or evaluating buy opportunities with multi-factor confirmation. version: 1.0.0 metadata: openclaw: requires: env: - FMP_API_KEY bins: - python3 - pip3 primaryEnv: FMP_API_KEY emoji: "π" homepage: https://github.com/yourusername/us-stock-analyzer install: - kind: uv package: yfinance bins: [python3] - kind: uv package: pandas bins: [python3] - kind: uv package: numpy bins: [python3] - kind: uv package: matplotlib bins: [python3] - kind: uv package: pyyaml bins: [python3] - kind: uv package: requests bins: [python3]
π US Stock Analyzer - Three-Factor Buy Signal System
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.
Quick Start
# Install dependencies
pip3 install yfinance pandas numpy matplotlib pyyaml requestsSet API key (optional, for enhanced financial data)
export FMP_API_KEY="your_key_here"Run analysis
python3 scripts/decision_engine.py AAPL
Three-Factor Framework
1οΈβ£ Value Factor (DCF) - 40% Weight
2οΈβ£ Trend Factor (Livermore) - 35% Weight
3οΈβ£ Sentiment Factor (VIX) - 25% Weight
Final Buy Signal
BUY = Value β₯ 60 AND Trend β₯ 60 AND Sentiment β₯ 60 AND Composite β₯ 70
Usage
Basic Analysis
from scripts.decision_engine import StockAnalyzeranalyzer = StockAnalyzer(config_path="config.yaml")
result = analyzer.analyze("TSLA")
print(result['report'])
With Chart Output
analyzer.plot_analysis(result['result'], save_path="tsla_analysis.png")
Data Sources
| Data | Source | Required | |------|--------|----------| | Price/Volume | Yahoo Finance (yfinance) | Free | | Financials | FMP API | Optional (free tier) | | VIX | CBOE via Yahoo | Free | | Sector ETFs | Yahoo Finance | Free |
Configuration
Edit config.yaml to customize:
Output
The system generates a formatted report including:
File Structure
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
Methodology
See references/methodology.md for:
Disclaimer
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.
License
MIT-0 (Public Domain)
π‘ Examples
Basic Analysis
from scripts.decision_engine import StockAnalyzeranalyzer = StockAnalyzer(config_path="config.yaml")
result = analyzer.analyze("TSLA")
print(result['report'])
With Chart Output
analyzer.plot_analysis(result['result'], save_path="tsla_analysis.png")
βοΈ Configuration
Edit config.yaml to customize: