feat: Archive old indicator versions, focus on v8 production system

Version Management:
- v8 Money Line: PRODUCTION (8 trades, 57.1% WR, +$262.70, quality ≥95 = 100% wins)
- v5/v6/v7: ARCHIVED (historical baseline for future v9 comparison)

API Changes (app/api/analytics/version-comparison/route.ts):
- Added 'archived' flag to version stats
- Added 'production' field pointing to v8
- Updated sort order: v8 first, then archived versions
- Enhanced descriptions with PRODUCTION/ARCHIVED labels

UI Changes (app/analytics/page.tsx):
- v8 highlighted with blue gradient + 🚀 PRODUCTION badge
- Archived versions greyed out (60% opacity) + ARCHIVED badge
- Updated header: 'Indicator Versions (v8 Production)'
- Data collection notice: v8 shows 8/50 trades progress
- Kept comparison infrastructure for future v9 development

Documentation (.github/copilot-instructions.md):
- Updated Indicator Version Tracking section
- Documented perfect quality separation (≥95 = 100% wins)
- Clarified v8 production status, archived versions purpose
- Analytics UI behavior documented

Purpose: Keep comparison infrastructure for statistical validation
and future v9 testing while focusing user attention on v8 results.
This commit is contained in:
mindesbunister
2025-11-22 14:45:48 +01:00
parent 11d350cebc
commit bba91c1df8
3 changed files with 76 additions and 39 deletions

View File

@@ -1,7 +1,10 @@
/**
* Trading Bot v4 - Signal Quality Version Comparison API
* Trading Bot v4 - Indicator Version Comparison API
*
* Returns performance metrics comparing different signal quality scoring versions
* Primary: v8 Money Line (Nov 18+) - Production system
* Archived: v5/v6/unknown - Historical baseline for comparison
*
* Returns performance metrics for statistical validation and future v9 testing
*/
import { NextResponse } from 'next/server'
@@ -115,25 +118,39 @@ export async function GET() {
}
})
// Sort versions: v6 first, then v5, then unknown
const versionOrder: Record<string, number> = { 'v6': 0, 'v5': 1, 'unknown': 2 }
// Sort versions: v8 first (production), then v7, v6, v5, unknown (archived)
const versionOrder: Record<string, number> = {
'v8': 0, 'v7': 1, 'v6': 2, 'v5': 3, 'unknown': 4
}
results.sort((a, b) => {
const orderA = versionOrder[a.version] ?? 999
const orderB = versionOrder[b.version] ?? 999
return orderA - orderB
})
// Get version descriptions
// Mark archived versions
const resultsWithArchived = results.map(r => ({
...r,
archived: archivedVersions.includes(r.version)
}))
// Get version descriptions and archived status
const versionDescriptions: Record<string, string> = {
'v5': 'Buy/Sell Signal strategy (pre-Nov 12)',
'v6': 'HalfTrend + BarColor strategy (Nov 12+)',
'unknown': 'No indicator version tracked (pre-Nov 12)'
'v8': 'Money Line Sticky Trend (Nov 18+) - PRODUCTION',
'v7': 'HalfTrend with toggles (deprecated)',
'v6': 'HalfTrend + BarColor (Nov 12-18) - ARCHIVED',
'v5': 'Buy/Sell Signal (pre-Nov 12) - ARCHIVED',
'unknown': 'No version tracked (pre-Nov 12) - ARCHIVED'
}
const archivedVersions = ['v5', 'v6', 'v7', 'unknown']
return NextResponse.json({
success: true,
versions: results,
versions: resultsWithArchived,
descriptions: versionDescriptions,
production: 'v8',
archived: archivedVersions,
timestamp: new Date().toISOString()
})