Quality Score Engine
Explainable quality scoring across 12 dimensions with Graham-aligned weighting and ESG overlays.
Weighted Quality Model
Transforms raw fundamentals into weighted quality dimensions and a 0-100 composite score.
export function calculateQualityDimensions(fm: FinancialMetrics): QualityDimension[] {
return DIMENSIONS.map(cfg => {
const score = clamp(cfg.scorer(fm), 0, 100)
return {
name: cfg.name,
score,
weight: cfg.weight,
description: cfg.description,
value: cfg.raw(fm),
benchmark: cfg.benchmark
}
})
}
export function calculateOverallScore(dimensions: QualityDimension[]): number {
const weighted = dimensions.reduce((sum, d) => sum + d.score * (d.weight / 100), 0)
return clamp(weighted, 0, 100)
}Data Sources
- Polygon Fundamentals
Quarterly fundamentals, balance sheet depth, and sector benchmarks.
View documentation → - Alpha Vantage
Historical ratios and earnings trends powering momentum overlays.
View documentation → - IEX Cloud Snapshot
Live price and volume snapshots for intraday confidence adjustments.
View documentation →
Open Hooks
- useRealTimeData
Streams authenticated market snapshots for live scoring overlays.
app/hooks/useRealTimeData.ts - useAnimationPerformance
Dial down heavy visualizations on lower-tier devices and reduced-motion profiles.
app/hooks/useAnimationPerformance.ts