DUEL Methodology:
Transparent Relative Stock Comparison
1. The Problem with Absolute Scoring
Most stock screeners show absolute numbers — revenue growth of 15%, ROIC of 20%, etc. But absolute numbers don't tell you who is better. A company with 15% growth might be underperforming its competitor with 30% growth, yet it still looks "good" in isolation.
Traditional rating systems (e.g., "10/10" or "A+") are even worse: they are subjective, often based on analyst opinions, and lack transparency. They don't answer the only question that matters: "Which stock is the better investment right now?"
2. The DUEL Solution: Relative Comparison
DUEL replaces absolute scoring with head‑to‑head comparison. Every factor is normalized between exactly two stocks. The winner isn't the one with the highest absolute values — it's the one that outperforms the opponent across a weighted set of fundamental metrics.
📐 Core Formula:
Score = Σ ( Wᵢ × Nᵢ ) × 100
Where Wᵢ = factor weight (sum = 1.0).
Nᵢ is a soft relative score for that factor:
if both values exist, t = (a−b) / (|a|+|b|),
then N_a = 0.5 + 0.5·t, N_b = 0.5 − 0.5·t
(so a small gap yields scores near 0.5 / 0.5, a large gap approaches 0 / 1).
Missing data → 0.35 / 0.65. Sloan Ratio and Debt/Equity are inverted (lower is better).
This approach eliminates bias from "good" vs "bad" benchmarks. It reveals who is objectively stronger at a given point in time, based purely on reported financial data.
3. Key Technical Decisions — Code Examples
Below are five critical implementation decisions that make DUEL unique, robust, and scalable. These snippets demonstrate the depth of the algorithm.
3.1. Smart Period Alignment (Annual vs Quarterly)
Companies report data in different periods. DUEL automatically detects when a quarterly/annual mismatch exists and corrects it.
Why this matters: Without this adjustment, comparing a quarterly figure against an annual figure would produce meaningless results. DUEL automatically detects and corrects this, then logs the change for full transparency.
3.2. Async Loading with Smart Caching
SEC EDGAR can be slow. DUEL uses async requests with a 6‑hour database cache to ensure fast response times.
Why this matters: Most tools either hit SEC every time (slow) or use a static cache (stale). DUEL combines async requests with a smart caching layer that updates automatically.
3.3. Multi‑Language SEO Text Generation
DUEL generates unique SEO text for every duel in 10 languages, with automatic data substitution.
Why this matters: This approach generates 100% unique content for every duel, in 10 languages, without manual intervention. This is why DUEL has SEO potential in Turkey, Korea, and Indonesia.
3.4. Universal Normalization with Inverted Factors
Not all factors work the same way — Sloan Ratio is "lower is better". DUEL handles this elegantly.
Why this matters: This elegant design handles all 8 factors with one function, automatically punishing missing data and supporting both "higher is better" and "lower is better" metrics.
3.5. Dynamic WACC Based on ROIC Quality
DUEL calculates WACC dynamically based on the company's ROIC tier, reflecting real business risk.
Why this matters: Instead of using a fixed WACC (like most tools), DUEL adjusts the discount rate based on the company's actual performance. High‑quality businesses get a lower WACC (higher valuation), while risky businesses get a higher WACC (lower valuation).
3.6. Default Factor Weights (product-aligned)
The live duel uses eight SEC factors with fixed default weights that sum to 100%. In PRO mode the same keys can be reweighted; if the custom sum is not exactly 100%, the engine falls back to these defaults.
Default weights
• GROWTH — Revenue Growth: 18%
• MARGIN CONVERSION — Operating Margin: 9% · Op. Cash Margin: 9% · FCF Margin: 9% (group 27%)
• CAPITAL EFFICIENCY — ROIC: 17% · Asset Turnover: 7% (group 24%)
• ACCRUAL QUALITY — Sloan Ratio: 17% (inverted: lower is better)
• FINANCIAL STRENGTH — Debt / Equity: 14% (inverted: lower is better)
Sum = 100%.
Grouping matches the Factor breakdown UI and the empirical five-signal structure (growth, margin conversion, capital efficiency, accrual quality, financial strength). Soft relative scoring is unchanged: each factor still contributes Wᵢ × Nᵢ.
3.7. Sector Positioning Map
After every duel, DUEL can show a Sector Positioning Map for peers in the same GICS sector (from a maintained peer list). Coordinates are computed from the same SEC fundamentals as the duel — not from price.
Axes and color
• X — Sustainable Growth: Revenue Growth × roic_multiplier(ROIC). High ROIC lifts growth; weak or negative ROIC pulls it down (piecewise multipliers, e.g. ROIC ≥ 25% → 1.18, ≥ 15% → 1.08, ≥ 8% → 1.00, ≥ 0% → 0.88, else 0.72).
• Y — Quality-Adjusted Cash Margin: Op. Cash Margin × sloan_multiplier(Sloan). Strong cash earnings quality lifts the point; elevated accruals pull it down (existing Sloan bands, e.g. Sloan ≥ 15 → 0.70 … Sloan ≤ −15 → 1.18).
• Point color — Debt / Equity: not a third axis. No D/E or non-positive equity → yellow (caution); D/E ≤ 0.50 → green; 0.50 < D/E ≤ 1.50 → grey; D/E > 1.50 → red.
Active duel tickers use the same D/E color rules, only larger markers and always-visible labels.
The map is a relative sector snapshot for education and context. It is not a price target, ranking, or trade signal. Peers are served from a short-lived positioning cache refreshed when those tickers are duelled.
3.8. Informational Margin Flags
Below the Factor breakdown, DUEL may show informational flags. They never change the duel score or weights — they only highlight tension between the three margin metrics and leverage.
Triggers
• Paper profits — Op. Cash Margin < Operating Margin × 0.7 (cash conversion lags reported operating profit).
• CapEx vacuum — FCF Margin < Op. Cash Margin × 0.3 (little free cash left after reinvestment).
• No safety cushion — FCF Margin < 0 and Debt/Equity > 1.5 (negative free cash with high leverage).
• Non-positive equity — book equity ≤ 0, so Debt/Equity is not computed (buybacks or accumulated deficit).
UI: yellow frame = margin warnings only; red frame = Non-positive equity and/or No safety cushion (risk). Several flags can appear for the same ticker.
Read flags together with the raw factor values and the Sector Map color. They answer “where does the story conflict?”, not “who won the duel?”.
3.9. Factor Δ prior (change vs previous report)
After each duel, the Factor breakdown can show Δ prior on the left and right edges of each factor row: the change versus the previous SEC report of the same period type. This is informational only — it does not enter the duel score or the weights.
How it is built
• For each ticker and period type (Y = annual, Q = quarterly), DUEL keeps at most two factor snapshots (current + prior).
• When a newer filing of the same type arrives, Δ = current value − previous value for each of the eight factors.
• Y is compared only to Y, Q only to Q — annual and quarterly are never mixed.
• No prior snapshot yet → blank cell (not zero).
• Very small moves are suppressed (noise filter).
• Display: one decimal on both sides. Raw factor levels stay as usual (% one decimal; Debt/Equity and Asset Turnover two decimals).
• For Sloan Ratio and Debt / Equity (lower is better), color is inverted: a decrease is green, an increase is red.
Storage is capped (keep-2 on write, plus a long safety window on cleanup) so the database does not grow without bound. Δ prior answers “did this metric improve or worsen since the last comparable report?” — not “who won the duel.”
3.10. Capital Allocation (3-Year, 10-K)
After a duel, DUEL can load a Capital Allocation table: where free cash went over the last three annual 10-K years. Values are in USD billions. This layer is informational only — it does not enter the duel score, weights, or PDF factor tables.
Closed cash identity
The table is built as a closed chain of sources, uses, and balances — not a random list of metrics:
• FCF = CFO − CAPEX (R&D is operating expense and already sits inside CFO; it is not subtracted again).
• Dividends / Buybacks / M&A — cash outflows to owners or for acquisitions (M&A prefers net-of-cash SEC tags when available).
• Share issuance — cash inflow from selling equity (employee option accounting is not treated as a cash raise).
• Net debt change — change in interest-bearing debt (paydown uses cash; new borrowing adds cash).
• Change in cash — year-over-year change in the cash pile.
• Cash balance (end) — year-end cash. Soft check: prior-year cash + Change in cash ≈ current Cash balance when both years are present.
Scope and display rules
• Annual 10-K only — quarterly 10-Q is excluded so seasonal noise does not reshape the three-year path.
• A dash (—) usually means no reported activity that year (no dividend, no buyback, no material M&A, no equity raise), not a broken feed.
• Cache is keyed by ticker and last 10-K date (refresh when the filing is older than a fixed window, on the order of ~300 days) so SEC is not hit on every click.
• Free tier: FCF + Cash balance for all three years; full middle rows and short signals are PRO.
Capital Allocation answers a different question than the eight duel factors or Δ prior: not “who scores higher on quality metrics?” or “did the metric improve since the last same-type filing?”, but “what did management do with the cash the business produced?”
3.11. Cross-Report Verdict (PRO)
After a duel, PRO users can open a Cross-Report Verdict table — a non-compensatory summary of how the main analytical lenses agree or conflict. It is not a single 0–100 score and does not change the duel result, weights, or PDF factor tables.
Six independent lenses
• Relative strength — the duel integer scores (and strength label) for the pair.
• Earnings quality — informational flags (paper profits, CapEx vacuum, no safety cushion, non-positive equity) plus Sloan ratio bands; Clean / Risk with a short reason when risk is present.
• Resilience — the same Fundamental Resilience Index (FRI) logic used in the STR report: base from cash-to-debt, FCF/CapEx coverage, earnings-quality ratio and liquidity runway, minus documented penalties; bands ≥70 High, ≥40 Moderate, else Low. When the full component set is unavailable, a conservative proxy is used.
• Cash stewardship — latest free-cash path from Capital Allocation (and duel FCF margin as cross-check): Strong / Neutral / Weak.
• Trajectory — majority direction of noticeable Δ prior moves (Sloan and Debt/Equity inverted); Improving / Mixed / Deteriorating, or a dash when no prior snapshot exists.
• Balance-sheet stress — OK / Elevated / Structural from Debt/Equity and equity/cushion flags.
Pattern is derived, not scored: Aligned when strength and supporting lenses point the same way; Mixed when strength and quality or resilience diverge; Divergent when the score leader carries a material quality warning. A short narrative explains the pattern in plain language.
The table loads on demand (PRO or admin key). Capital Allocation is prefetched when needed for the stewardship lens. Read the lenses side by side with the factor breakdown, flags, Δ prior, sector map, and CA — the verdict highlights conflict or agreement; it does not replace any of them.
4. Data Integrity — SEC EDGAR Only
All financial data used by DUEL is extracted directly from official SEC EDGAR filings (10‑K and 10‑Q). No analyst estimates, no proprietary data feeds — only audited, publicly available numbers.
Each metric includes a timestamp and period marker (Y = Annual, Q = Quarterly), so you always know exactly what you're looking at.
5. Expert Validation — Independent AI Assessments
The DUEL source code and methodology were independently reviewed by two leading AI systems. Below are their expert conclusions:
🤖 Grok (xAI) — Elon Musk
"8.4/10 — very strong, professional product for the niche. This is not a typical 'pet project'. It's a mature MVP with good UX, technical depth, and a clear monetisation model."
"The DCF model with Sloan Ratio adjustment and ROIC/FCF margin quality multipliers is a sophisticated approach rarely seen in retail tools. The technical quality is very high."
🧠 Gemini (Google DeepMind)
"Architecture and tech stack: 9/10. The use of Flask + async aiohttp for SEC EDGAR requests is an excellent solution for working with external APIs without blocking threads."
"Financial mathematics and SEC parsing are implemented at a high level: intelligent annual/quarterly period alignment, Sloan Ratio for earnings quality, and a full DCF model for PRO users."
6. Intellectual Property — What's Protected
The DUEL algorithm is a proprietary system. We openly share its conceptual framework and key code examples above. The core implementation details — including full normalisation logic, weight optimisation algorithms, DCF adjustment coefficients, and the data extraction pipeline — are proprietary and remain confidential.
This approach ensures transparency at the principle level while protecting the intellectual property that makes DUEL unique.
In September 2026, we open-sourced the free base 8-factor scoring algorithm on GitHub, including a fully worked example (NVDA vs AMD) — so you can verify exactly how the free comparison is calculated. The PRO-only weight optimisation, DCF valuation model, and Resilience (STR) report remain proprietary and are not published. View the open-source repository on GitHub →
7. Important Disclaimer
DUEL is not an investment advisor. All content is for informational and educational purposes only. Past data does not guarantee future results. Always conduct your own research before making investment decisions.
Try the algorithm yourself →
⚔ Go to DUEL