Make data-driven investment decisions with confidence. This tool aggregates analyst recommendations, price targets, and fundamental metrics into a single, clear display—helping you identify opportunities, manage your portfolio, and make educated investment choices.
Created by: plessas - eToro Popular Investor Important: This tool provides analysis only, not investment advice. All investment decisions are your own responsibility.
Instead of manually checking multiple websites for analyst ratings, price targets, and financial metrics, this tool:
✅ Aggregates Data: Pulls analyst consensus from 20+ investment banks via Yahoo Finance ✅ Analyzes Metrics: Evaluates 15+ financial indicators (upside potential, analyst ratings, P/E ratios, ROE, etc.) ✅ Generates Signals: Applies systematic criteria to suggest BUY, SELL, HOLD, or INCONCLUSIVE ✅ Calculates Position Sizes: Recommends allocation based on risk-adjusted framework ✅ Produces Reports: Exports results to CSV and HTML for easy review
What this is: A research tool that organizes publicly available analyst data into actionable insights. What this is NOT: Investment advice, a guarantee of returns, or a fully automated trading system.
- Export your portfolio from eToro (Portfolio → Export to CSV)
- Save as
yahoofinance/input/portfolio.csv
- Run analysis:
python trade.py -o p
- View results in console or check
yahoofinance/output/portfolio.html
That's it! You'll see color-coded recommendations (🟢 BUY, 🔴 SELL, ⚪ HOLD) for each position.
# 1. Install dependencies
pip install -r requirements.txt
# 2. Analyze specific stocks
python trade.py -o i -t AAPL,MSFT,GOOGL
# 3. Screen market opportunities
python trade.py -o m
# 4. Generate buy recommendations
python trade.py -o t -t b
📖 New to this? See the complete User Guide for detailed instructions.
- Throughput: ~100 securities per second (vectorized operations)
- Batch Processing: 5,544 securities in approximately 15 minutes
- API Optimization: 48-hour cache layer reducing redundant API calls by ~80%
- Concurrency: 15 parallel request threads with adaptive rate limiting
- Primary: Yahoo Finance API (yfinance)
- Supplementary: YahooQuery API (PEG ratios, missing metrics)
- Coverage: 20+ investment bank analyst recommendations
- Update Frequency: Real-time market data with cached analyst consensus
The framework employs a sophisticated five-tier classification with region-specific adjustments:
Tier | Market Cap Range | Example Companies | Strategy Focus |
---|---|---|---|
MEGA | ≥ $500B | AAPL, MSFT, GOOGL | Blue-chip stability |
LARGE | $100B - $500B | NFLX, DIS, UBER | Established growth |
MID | $10B - $100B | ROKU, SNAP, DOCN | Growth opportunities |
SMALL | $2B - $10B | Emerging leaders | Higher growth potential |
MICRO | < $2B | Micro-cap stocks | Speculative positions |
Regional Adjustments:
- US: Baseline criteria for NYSE/NASDAQ securities
- EU: Modified thresholds for European exchanges (.L, .PA, .AS)
- HK: Adjusted parameters for Hong Kong/Asian markets (.HK)
Trading signals are generated through a systematic evaluation process:
- Data Collection: Aggregate analyst recommendations, price targets, and fundamental metrics
- Confidence Validation: Require minimum 4 analysts and 4 price targets
- Criteria Application: Apply tier and region-specific thresholds
- Signal Classification: Categorize as BUY, SELL, HOLD, or INCONCLUSIVE
Position sizes are calculated using a risk-adjusted framework:
- Base position scaled by market capitalization tier
- Adjustments for expected return (EXRET)
- Beta-weighted volatility adjustments
- Maximum position constraints
# Clone repository
git clone https://github.com/weirdapps/etorotrade
cd etorotrade
# Create virtual environment
python -m venv myenv
source myenv/bin/activate # Windows: myenv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Interactive mode
python trade.py
# Analyze portfolio
python trade.py -o p
# Market screening
python trade.py -o m
# Trade signal generation
python trade.py -o t -t b # Buy signals
python trade.py -o t -t s # Sell signals
# Portfolio analysis with position sizing
python trade.py -o p -pv 50000 # $50,000 portfolio value
# Geographic exposure analysis
python scripts/analyze_geography.py
# Sector allocation analysis
python scripts/analyze_industry.py
# Specific ticker analysis
python trade.py -o i -t AAPL,MSFT,GOOGL
Signal | Criteria | Interpretation |
---|---|---|
BUY | Meets all tier-specific buy thresholds | Positive analyst consensus with favorable risk/reward |
SELL | Triggers any sell condition | Deteriorating fundamentals or overvaluation |
HOLD | Between buy and sell thresholds | Fairly valued at current levels |
INCONCLUSIVE | Insufficient analyst coverage | Requires additional research |
- UPSIDE: Percentage difference between current price and analyst target
- %BUY: Percentage of analysts with buy recommendations
- EXRET: Expected return (upside × buy percentage / 100)
- SIZE: Calculated position size based on risk parameters
- PP: Twelve-month price performance
- EG: Year-over-year earnings growth
- PEF/PET: Forward P/E to Trailing P/E ratio comparison
The system generates both CSV and HTML reports in yahoofinance/output/
:
portfolio.csv/html
- Current holdings analysismarket.csv/html
- Market screening resultsbuy.csv/html
- Securities meeting buy criteriasell.csv/html
- Securities meeting sell criteria
Create yahoofinance/input/portfolio.csv
:
symbol,totalInvestmentPct,totalNetProfitPct,instrumentDisplayName
AAPL,5.2,12.5,Apple Inc
MSFT,4.8,8.3,Microsoft Corporation
Trading thresholds can be modified in config.yaml
:
- Tier-specific buy/sell criteria
- Regional adjustments
- Position size parameters
- Risk management constraints
- Vectorized pandas operations for efficient data processing
- Set-based filtering algorithms (O(n) vs O(n²))
- Asynchronous API requests with connection pooling
- Memory-efficient streaming for large datasets
- Automatic retry with exponential backoff
- Graceful degradation for missing data
- Comprehensive logging for debugging
- Circuit breaker pattern for API failures
- Type hints throughout codebase
- Comprehensive test coverage
- Continuous integration pipeline
- SonarCloud quality gates
The tool provides transparency into ETF holdings:
- Geographic exposure decomposition
- Sector allocation analysis
- Underlying asset classification
- Concentration risk assessment
- Analysis based on publicly available data
- No intraday trading signals
- No derivative strategies
- Historical performance not indicative of future results
- This tool provides analysis only, not investment advice
- All investment decisions should incorporate multiple sources
- Past signals do not guarantee future performance
- Users assume all investment risk
# Run all tests
pytest tests/
# Run specific test suites
pytest tests/unit/ # Unit tests
pytest tests/integration/ # Integration tests
pytest tests/e2e/ # End-to-end tests
# Code quality checks
flake8 yahoofinance/ trade_modules/ --max-line-length=100
mypy yahoofinance/ trade_modules/ --ignore-missing-imports
# Coverage report
pytest --cov=yahoofinance --cov=trade_modules --cov-report=html
Contributions are welcome. Please ensure:
- All tests pass (
pytest tests/
) - Code follows PEP 8 style guidelines
- Type hints are included for new functions
- Documentation is updated accordingly
- Security best practices are followed
- User Guide - Getting started and common workflows
- Technical Architecture - System design and implementation details
- Position Sizing - Risk management algorithms and methodology
- CI/CD Pipeline - Testing, quality gates, and deployment procedures
MIT License - See LICENSE file for details
For issues or questions, please use the GitHub issue tracker.
Last Updated: October 2025
Disclaimer: This tool is designed for quantitative analysis and research purposes only. It does not constitute investment advice. Users should conduct their own due diligence and consider consulting with qualified financial advisors before making investment decisions. Past performance does not guarantee future results.