import React from 'react'; import { Settings, X } from 'lucide-react'; import 'katex/dist/katex.min.css'; import { BlockMath, InlineMath } from 'react-katex'; interface ScannerBlueprintModalProps { isOpen: boolean; onClose: () => void; } export default function ScannerBlueprintModal({ isOpen, onClose }: ScannerBlueprintModalProps) { React.useEffect(() => { const handleKeyDown = (e: KeyboardEvent) => { if (e.key === 'Escape') { onClose(); } }; if (isOpen) { window.addEventListener('keydown', handleKeyDown); } return () => { window.removeEventListener('keydown', handleKeyDown); }; }, [isOpen, onClose]); if (!isOpen) return null; return (
{/* Modal Header */}

Anomalies Scanner - Operational Blueprint

System User Manual & Interface Mechanics

{/* Modal Body */}

Scanner Metrics & Signals

Operational details of the anomaly scanner, technical velocity thresholds, and valuation overlays.

{/* Core Mechanics */}

1. 52-Week Drop Mechanics

Filters the stock database for liquid companies trading at significant percentage discounts relative to their 52-week peak. The core threshold computes:

An alert is triggered when the price deviation exceeds a designated threshold (e.g. ), representing a 30% drop from the rolling high. It isolates severe drawdowns caused by asymmetric market overreactions, validating whether the pricing is a statistical dislocation or a permanent valuation impairment.

2. Welles Wilder RSI-14 Velocity

Uses the smoothed Welles Wilder Relative Strength Index to identify deep oversold thresholds (RSI ). Wilder smoothing calculations utilize modified EMAs for trend velocity:

where and represent upward and downward price changes. Relative Strength is . Momentum velocity measures standard deviation shocks in the indicator to forecast buy-exhaustion and selloff capitulations.

3. FMP Valuation Overlay

Integrates trailing Price-to-Earnings (P/E), Price-to-Book (P/B), and Dividend Yield (%), alongside the PEG-to-Forward P/E transition. Detail how PEG resolves to a growth rate and computes implicit Forward P/E:

When the pricing drop matches these valuation filters, the system triggers a **High-Conviction Value Alert** to signal structural undervaluation rather than a value trap.

{/* Interface Specifications */}

User Actions & Interface Mechanics

Diagnostic Drawers: Clicking on any row in the scanner table opens an interactive drawer where you can analyze the drop catalyst: *Systemic Selloff, Supply Chain Disruption, Executive Shift, Regulatory Issue / Fine,* or *Earnings Miss*.

GJR-GARCH Rebound Probability: The drawer displays a real-time rebound probability score. The GJR-GARCH model calculates conditional downside volatility, while the selected catalyst dynamically adjusts the rebound expectations based on historical asset-recovery statistics.

Deep-Check Search Mask: Permits manual lookup of individual tickers. Ingests cash flow and balance sheet metrics from the backend API, displaying current Sloan ratios and GJR-GARCH conditional Value-at-Risk limits.

); }