AI Stock Screener Skill
AI-powered stock screening system inspired by TrendSpider, Trade Ideas (Holly AI), and Zen Ratings.
Overview
The AI Screener combines multiple analysis methods to identify high-potential trading opportunities:
- Multi-Factor Scoring: 100+ factors across Fundamentals, Technicals, Momentum, Sentiment
- Pattern Recognition: Automated chart pattern detection
- AI Neural Model: Trained on historical data to predict price movements
- Natural Language Queries: Ask in plain English (e.g., "show me oversold tech stocks with strong earnings")
- Real-time Scanning: Continuous market monitoring with alerts
Key Features
1. Multi-Factor Rating System (Inspired by Zen Ratings)
7 Component Grades:
| Grade |
Factors |
Weight |
| Fundamentals |
P/E, P/B, ROE, Debt/Equity, Margins |
15% |
| Growth |
Revenue growth, EPS growth, Guidance |
15% |
| Momentum |
RSI, MACD, Price vs MAs, Volume |
20% |
| Safety |
Beta, Drawdown history, Volatility |
10% |
| Sentiment |
Analyst ratings, News sentiment, Social |
15% |
| Value |
DCF vs Price, PEG, Dividend yield |
15% |
| AI Score |
Neural network prediction |
10% |
Overall Rating: A (top 5%), B (top 20%), C (middle), D (bottom 20%), F (bottom 5%)
2. Automated Technical Analysis (Inspired by TrendSpider)
Auto-Detected Patterns:
- Head & Shoulders / Inverse
- Double Top / Double Bottom
- Triangles (Ascending, Descending, Symmetrical)
- Wedges (Rising, Falling)
- Flags and Pennants
- Cup and Handle
- Channels (Ascending, Descending)
Auto-Drawn Lines:
- Support and Resistance zones
- Trendlines
- Fibonacci retracements
- Moving Average crossovers
3. Holly AI (Inspired by Trade Ideas)
Entry Signal Detection:
- Scans all stocks every minute
- Identifies high-probability setups
- Provides entry, target, and stop-loss levels
- Confidence score (1-100)
- One-click trade execution
Holly's Daily Picks:
- Morning gap plays
- Momentum trades
- Mean reversion setups
- Breakout candidates
4. Natural Language Screening
Example Queries:
"Show me tech stocks under $50 with RSI below 30 and positive earnings growth"
"Find dividend stocks yielding over 4% with low debt"
"Which crypto has the highest momentum this week?"
"Stocks breaking out of consolidation today"
Usage
Quick Scan
import { AIScreener } from './ai-screener';
const screener = new AIScreener();
// Get top rated stocks
const topPicks = await screener.getTopRated({
market: 'US_STOCKS',
minRating: 'A',
limit: 20
});
// Natural language query
const results = await screener.query("oversold large cap tech stocks");
// Pattern scan
const patterns = await screener.scanPatterns({
symbols: ['AAPL', 'GOOGL', 'MSFT', 'NVDA'],
patterns: ['double_bottom', 'breakout']
});
Real-time Alerts
// Start real-time scanning
screener.startScanner({
markets: ['US_STOCKS', 'CRYPTO'],
conditions: [
{ type: 'breakout', threshold: 2 }, // 2% breakout
{ type: 'rsi', direction: 'oversold', threshold: 30 },
{ type: 'volume_spike', multiple: 3 } // 3x average volume
],
onAlert: (alert) => {
kit.notify(`🚨 ${alert.symbol}: ${alert.message}`);
}
});
Factor Analysis
// Deep dive on a single stock
const analysis = await screener.analyze('NVDA');
console.log(analysis);
/*
{
symbol: 'NVDA',
overallRating: 'A',
confidence: 87,
grades: {
fundamentals: 'B',
growth: 'A+',
momentum: 'A',
safety: 'B',
sentiment: 'A',
value: 'C',
ai: 'A'
},
signals: [
{ type: 'MACD_CROSS', direction: 'bullish', strength: 'strong' },
{ type: 'ABOVE_50MA', days: 45 },
{ type: 'ANALYST_UPGRADE', source: 'Goldman Sachs', rating: 'Buy' }
],
patterns: [
{ type: 'ascending_triangle', confidence: 78, breakout_target: 950 }
],
aiPrediction: {
direction: 'up',
probability: 0.72,
priceTarget: { '7d': 920, '30d': 980, '90d': 1050 }
}
}
*/
Data Sources
- Price Data: TradingView, Alpha Vantage, Yahoo Finance
- Fundamentals: Financial Modeling Prep, Polygon.io
- Sentiment: Twitter/X, Reddit, StockTwits, News APIs
- Analyst Data: Benzinga, TipRanks, Zacks
AI Model Architecture
Input Layer (Features)
├── Technical Indicators (50+)
├── Fundamental Ratios (30+)
├── Sentiment Scores (10+)
├── Macro Indicators (10+)
└── Price Action (OHLCV patterns)
↓
Hidden Layers
├── LSTM for time series
├── Attention mechanism for feature importance
└── Ensemble with gradient boosting
↓
Output Layer
├── Direction (up/down/neutral)
├── Magnitude prediction
├── Confidence score
└── Time horizon (1d, 7d, 30d, 90d)
K.I.T. Advantages
| Feature |
TrendSpider |
Trade Ideas |
Zen Ratings |
K.I.T. |
| Monthly Cost |
$54-$297 |
$89-$167 |
$19-$39 |
FREE |
| Self-Hosted |
❌ |
❌ |
❌ |
✅ |
| Custom Models |
❌ |
❌ |
❌ |
✅ |
| Multi-Asset |
Stocks only |
Stocks only |
Stocks only |
✅ All |
| Automation |
Basic |
Bots |
❌ |
Full |
| Open Source |
❌ |
❌ |
❌ |
✅ |
Configuration
ai_screener:
enabled: true
markets:
- US_STOCKS
- CRYPTO
- FOREX
scan_interval: 60 # seconds
ai_model: ensemble # or 'lstm', 'gradient_boost'
min_confidence: 70
alerts:
telegram: true
discord: true
email: false
data_sources:
prices: tradingview
fundamentals: fmp
sentiment: aggregated
Files
ai-screener.ts - Main screener implementation
factors.ts - Factor definitions and calculations
patterns.ts - Chart pattern recognition
nlp-query.ts - Natural language query parser
models/ - Pre-trained AI models
1---2name: ai-screener3description: AI Stock Screener Skill4---5# AI Stock Screener Skill67AI-powered stock screening system inspired by TrendSpider, Trade Ideas (Holly AI), and Zen Ratings.89## Overview1011The AI Screener combines multiple analysis methods to identify high-potential trading opportunities:12- **Multi-Factor Scoring**: 100+ factors across Fundamentals, Technicals, Momentum, Sentiment13- **Pattern Recognition**: Automated chart pattern detection14- **AI Neural Model**: Trained on historical data to predict price movements15- **Natural Language Queries**: Ask in plain English (e.g., "show me oversold tech stocks with strong earnings")16- **Real-time Scanning**: Continuous market monitoring with alerts1718## Key Features1920### 1. Multi-Factor Rating System (Inspired by Zen Ratings)2122**7 Component Grades:**23| Grade | Factors | Weight |24|-------|---------|--------|25| **Fundamentals** | P/E, P/B, ROE, Debt/Equity, Margins | 15% |26| **Growth** | Revenue growth, EPS growth, Guidance | 15% |27| **Momentum** | RSI, MACD, Price vs MAs, Volume | 20% |28| **Safety** | Beta, Drawdown history, Volatility | 10% |29| **Sentiment** | Analyst ratings, News sentiment, Social | 15% |30| **Value** | DCF vs Price, PEG, Dividend yield | 15% |31| **AI Score** | Neural network prediction | 10% |3233**Overall Rating:** A (top 5%), B (top 20%), C (middle), D (bottom 20%), F (bottom 5%)3435### 2. Automated Technical Analysis (Inspired by TrendSpider)3637**Auto-Detected Patterns:**38- Head & Shoulders / Inverse39- Double Top / Double Bottom40- Triangles (Ascending, Descending, Symmetrical)41- Wedges (Rising, Falling)42- Flags and Pennants43- Cup and Handle44- Channels (Ascending, Descending)4546**Auto-Drawn Lines:**47- Support and Resistance zones48- Trendlines49- Fibonacci retracements50- Moving Average crossovers5152### 3. Holly AI (Inspired by Trade Ideas)5354**Entry Signal Detection:**55- Scans all stocks every minute56- Identifies high-probability setups57- Provides entry, target, and stop-loss levels58- Confidence score (1-100)59- One-click trade execution6061**Holly's Daily Picks:**62- Morning gap plays63- Momentum trades64- Mean reversion setups65- Breakout candidates6667### 4. Natural Language Screening6869**Example Queries:**70```71"Show me tech stocks under $50 with RSI below 30 and positive earnings growth"72"Find dividend stocks yielding over 4% with low debt"73"Which crypto has the highest momentum this week?"74"Stocks breaking out of consolidation today"75```7677## Usage7879### Quick Scan80```typescript81import { AIScreener } from './ai-screener';8283const screener = new AIScreener();8485// Get top rated stocks86const topPicks = await screener.getTopRated({ 87 market: 'US_STOCKS',88 minRating: 'A',89 limit: 20 90});9192// Natural language query93const results = await screener.query("oversold large cap tech stocks");9495// Pattern scan96const patterns = await screener.scanPatterns({97 symbols: ['AAPL', 'GOOGL', 'MSFT', 'NVDA'],98 patterns: ['double_bottom', 'breakout']99});100```101102### Real-time Alerts103```typescript104// Start real-time scanning105screener.startScanner({106 markets: ['US_STOCKS', 'CRYPTO'],107 conditions: [108 { type: 'breakout', threshold: 2 }, // 2% breakout109 { type: 'rsi', direction: 'oversold', threshold: 30 },110 { type: 'volume_spike', multiple: 3 } // 3x average volume111 ],112 onAlert: (alert) => {113 kit.notify(`🚨 ${alert.symbol}: ${alert.message}`);114 }115});116```117118### Factor Analysis119```typescript120// Deep dive on a single stock121const analysis = await screener.analyze('NVDA');122console.log(analysis);123/*124{125 symbol: 'NVDA',126 overallRating: 'A',127 confidence: 87,128 grades: {129 fundamentals: 'B',130 growth: 'A+',131 momentum: 'A',132 safety: 'B',133 sentiment: 'A',134 value: 'C',135 ai: 'A'136 },137 signals: [138 { type: 'MACD_CROSS', direction: 'bullish', strength: 'strong' },139 { type: 'ABOVE_50MA', days: 45 },140 { type: 'ANALYST_UPGRADE', source: 'Goldman Sachs', rating: 'Buy' }141 ],142 patterns: [143 { type: 'ascending_triangle', confidence: 78, breakout_target: 950 }144 ],145 aiPrediction: {146 direction: 'up',147 probability: 0.72,148 priceTarget: { '7d': 920, '30d': 980, '90d': 1050 }149 }150}151*/152```153154## Data Sources155156- **Price Data**: TradingView, Alpha Vantage, Yahoo Finance157- **Fundamentals**: Financial Modeling Prep, Polygon.io158- **Sentiment**: Twitter/X, Reddit, StockTwits, News APIs159- **Analyst Data**: Benzinga, TipRanks, Zacks160161## AI Model Architecture162163```164Input Layer (Features)165├── Technical Indicators (50+)166├── Fundamental Ratios (30+)167├── Sentiment Scores (10+)168├── Macro Indicators (10+)169└── Price Action (OHLCV patterns)170 ↓171Hidden Layers172├── LSTM for time series173├── Attention mechanism for feature importance174└── Ensemble with gradient boosting175 ↓176Output Layer177├── Direction (up/down/neutral)178├── Magnitude prediction179├── Confidence score180└── Time horizon (1d, 7d, 30d, 90d)181```182183## K.I.T. Advantages184185| Feature | TrendSpider | Trade Ideas | Zen Ratings | K.I.T. |186|---------|-------------|-------------|-------------|--------|187| Monthly Cost | $54-$297 | $89-$167 | $19-$39 | FREE |188| Self-Hosted | ❌ | ❌ | ❌ | ✅ |189| Custom Models | ❌ | ❌ | ❌ | ✅ |190| Multi-Asset | Stocks only | Stocks only | Stocks only | ✅ All |191| Automation | Basic | Bots | ❌ | Full |192| Open Source | ❌ | ❌ | ❌ | ✅ |193194## Configuration195196```yaml197ai_screener:198 enabled: true199 markets:200 - US_STOCKS201 - CRYPTO202 - FOREX203 scan_interval: 60 # seconds204 ai_model: ensemble # or 'lstm', 'gradient_boost'205 min_confidence: 70206 alerts:207 telegram: true208 discord: true209 email: false210 data_sources:211 prices: tradingview212 fundamentals: fmp213 sentiment: aggregated214```215216## Files217218- `ai-screener.ts` - Main screener implementation219- `factors.ts` - Factor definitions and calculations220- `patterns.ts` - Chart pattern recognition221- `nlp-query.ts` - Natural language query parser222- `models/` - Pre-trained AI models