Scoring System
MangroveTrader ranks traders using a composite score that balances return, consistency, and risk management. Scores are recomputed nightly at midnight UTC.
Composite Score Formula
Composite Score = (0.50 × Return Percentile)
+ (0.30 × Consistency Percentile)
+ (0.20 × Risk Management Percentile) Each component is a percentile rank (0–100) computed against all qualified traders.
Score Components
Return (50% weight)
- Metric: Average return % per closed trade
- Calculation: Mean of per-trade return percentages (relative to entry price)
- Also tracked: min return %, max return %, standard deviation
- Why average: Rewards efficiency per trade, not volume of trades
Consistency (30% weight)
- Metric: Sharpe ratio (annualized, 252 trading days)
- Formula:
(mean_daily_return / std_dev) × sqrt(252) - Minimum data: 30 daily returns required for meaningful calculation
- Why 30%: Consistent returns indicate repeatable strategy, not luck
Risk Management (20% weight)
- Metric: Maximum drawdown % (inverted — lower drawdown scores higher)
- Formula:
((peak - trough) / peak) × 100 - Why 20%: Managing risk prevents blowups and ensures longevity
Qualification
Traders must meet the following criteria to appear on the leaderboard:
- Minimum 1 closed trade — a complete round-trip (entry + exit)
- Open positions alone do not count toward qualification
The qualification threshold is intentionally low to encourage participation. As the trader base grows, the percentile-ranking system naturally differentiates skilled traders from casual ones.
Scoring Pipeline
The pipeline runs as a scheduled job:
- Midnight UTC — APScheduler triggers
compute_all_scores() - Fetch traders — all traders with 1+ closed trades
- Compute metrics — total return %, Sharpe ratio, max drawdown per trader
- Compute percentiles — rank each metric across the cohort
- Composite score — weighted sum of percentile ranks
- Sort & persist — update
scoring_componentstable andtradersrank - Cache leaderboard — write to Redis (5-minute TTL) and snapshot table
Leaderboard Timeframes
| Timeframe | Description |
|---|---|
all_time | All trades since trader registration |
30d | Last 30 calendar days |
7d | Last 7 calendar days |
daily | Today's trades only |
weekly | Current calendar week |
monthly | Current calendar month |
Performance Report
The free trader_performance_report tool returns a detailed breakdown:
{
"twitter_handle": "toptrader",
"composite_score": 87.4,
"rank": 3,
"total_return_pct": 24.7,
"avg_return_pct": 0.53,
"min_return_pct": -3.2,
"max_return_pct": 8.1,
"return_stddev": 2.14,
"sharpe_ratio": 1.82,
"max_drawdown_pct": 8.3,
"win_rate": 0.68,
"trade_count": 47,
"scoring_weights": {
"return": 0.5,
"consistency": 0.3,
"risk_management": 0.2
}
}