| Rank | Algorithm | Asset | Grade | Sharpe | Win Rate | Profit Factor | Total PnL | Trades |
|---|
| Rank | Algorithm | Asset | Grade | Sharpe | Sortino | Win Rate | Profit Factor | Avg Win | Avg Loss | Total PnL | Max DD | Trades |
|---|
| Algorithm | Trades | Wins | Losses | Win Rate | Avg Return | Total PnL | Avg Hold (h) |
|---|
| Symbol | Algorithm | Direction | Asset | Entry | Exit | Return % | PnL $ | Exit Reason | Hold (h) |
|---|
| Symbol | Algorithm | Direction | Asset | Entry Price | Current | Unrealized % | PnL $ | Hold (h) |
|---|
These pages show real-time, forward-looking stock data — not historical backtests. They track live positions, institutional data, and consensus picks with real market verification.
Data Source: Historical OHLCV data from daily_prices table (Yahoo Finance & Finnhub). 2-year window: Feb 2024 – Feb 2026.
Entry Signals: Generated by each algorithm using its own indicator set (RSI, MACD, Bollinger, etc.). Stored in stock_picks, miracle_picks2, miracle_picks3 tables.
Exit Logic: Bar-by-bar simulation checking: (1) If intraday low ≤ stop-loss price → exit at SL, (2) If intraday high ≥ take-profit price → exit at TP, (3) If holding days ≥ max_hold → exit at close.
Commission Model: Questrade tiered commissions ($4.95–$9.95 per trade) + 0.1% slippage per side.
Position Sizing: 5% of capital per position, capped at $2,000. Max 20% per sector. Starting capital: $10,000.
Embargo: 2-day embargo after pick date to prevent look-ahead bias.
Execution: Backtests run nightly via GitHub Actions (refresh-stocks-portfolio.yml, weekdays 23:30 UTC). Results cached in report_cache table.
Sharpe Ratio = (Mean Daily Return / Std Dev) × √252. Measures risk-adjusted return. >2.0 = excellent, >1.0 = good, <0 = losing money.
Sortino Ratio = (Mean Return / Downside Deviation) × √252. Like Sharpe but only penalizes downside volatility.
Profit Factor = Sum(Wins) / |Sum(Losses)|. >1.5 = strong, 1.0–1.5 = marginal, <1.0 = losing money.
Win Rate = Wins / Total Trades × 100. Note: win rate alone is misleading — a 40% WR with big winners can beat 60% WR with small winners.
Max Drawdown = Largest peak-to-trough decline in portfolio value. Measures worst-case scenario.
Expectancy = (WR × AvgWin) – ((1–WR) × AvgLoss). Expected return per trade. Must be positive for long-term profitability.
Grading Scale: A+ (Sharpe >4), A (Sharpe 2–4), B (Sharpe 1–2), C (Sharpe 0.5–1), D (Sharpe <0.5).
Paper Trading: $10,000 simulated capital. 5% position sizing (~$500 per trade). Max 10 concurrent positions.
Data Sources: Finnhub (stocks), FreeCryptoAPI (crypto), TwelveData (forex). Sub-minute refresh.
20 Algorithms: 19 technical + Challenger Bot (smart money consensus). Each generates signals independently.
Regime Gating: 19/20 algorithms use HMM regime detection (bull/sideways/bear). Signals suppressed when regime disagrees with trade direction.
Position Management: Auto SL/TP enforcement. Max hold caps: Crypto 24h, Stocks 72h, Forex 48h. Sector concentration max 2 per group.
Self-Learning: Parameters optimized via grid search on closed trades. Learned vs Original tracked in lm_algo_performance table.
| Component | Source File | API Endpoint | Description |
|---|---|---|---|
| Backtest Engine (v1) | findstocks/api/backtest.php |
Run Backtest | Configurable TP/SL/hold, Questrade fees, vol filtering, embargo |
| Backtest Engine (v2) | findstocks/portfolio2/api/backtest.php |
Run Backtest v2 | Concurrent positions, dynamic capital allocation, equity curve |
| What-If Scenarios | findstocks/portfolio2/api/whatif.php |
10 Scenarios | 10 presets: DayTrader, Swing, Conservative, Momentum Ride, etc. |
| Horizon Picks | findstocks/portfolio2/api/horizon_picks.php |
3 Horizons | Quick Gains (10/5/10d), Swing (20/8/60d), Long-Term (40/15/252d) |
| Short Backtest | findstocks/api/short_backtest.php |
Short Trades | Inverse logic with SPY regime detection (bull/bear/sideways) |
| Algo Performance | live-monitor/api/algo_performance.php |
30-Day Summary | Learned vs Original comparison, daily snapshots, virtual what-if |
| Live Trading | live-monitor/api/live_trade.php |
Dashboard | Paper trading with 20 algorithms, auto SL/TP, regime gating |
| Sharpe Report | scripts/comprehensive_performance_report.py |
JSON Report | Per-algorithm Sharpe, Sortino, Calmar, grades, benchmarks |
| Signal Engine | live-monitor/api/live_signals.php |
Fetch Signals | 20 algorithms with technical indicators, confidence scoring |
| Performance Report | scripts/comprehensive_performance_report.py |
Full Report | 2-year backtest with exit reason breakdown, sector analysis |
| Consensus Tracker | findstocks/portfolio2/api/consensus_performance.php |
Consensus | 2+ algo agreement tracking, $200/day challenge, pattern learning |
| Learning System | findstocks/portfolio2/api/learning.php |
— | Grid search TP/SL/hold optimization per algorithm + asset class |
| Algorithm | Type | Where To See Picks | Where To See Performance |
|---|---|---|---|
| Cursor Genius | Technical | Daily Picks | L vs O Dashboard |
| ETF Masters | Sector ETF | Daily Picks | Leaderboard |
| Sector Momentum | Sector Rotation | Daily Picks | Leaderboard |
| Ichimoku Cloud | Trend | Live Monitor | L vs O Dashboard |
| StochRSI Crossover | Momentum | Live Monitor | L vs O Dashboard |
| Challenger Bot | Smart Money | Smart Money (Showdown tab) | Live Monitor |
| Consensus | Multi-Algo Vote | Consolidated Picks | L vs O Dashboard |
| Trend Following | Trend | Horizon Picks | Leaderboard |
| Mean Reversion | Reversion | Horizon Picks | Leaderboard |
| Blue Chip Growth | Fundamental | Daily Picks | Leaderboard |