Closes #017 - Fix KaTeX rendering corruption and inject detailed blueprint contents
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import React from 'react';
|
||||
import { Settings, X } from 'lucide-react';
|
||||
import 'katex/dist/katex.min.css';
|
||||
import { BlockMath, InlineMath } from 'react-katex';
|
||||
|
||||
interface EconometricsBlueprintModalProps {
|
||||
isOpen: boolean;
|
||||
@@ -25,7 +27,7 @@ export default function EconometricsBlueprintModal({ isOpen, onClose }: Economet
|
||||
|
||||
return (
|
||||
<div className="fixed inset-0 z-50 flex items-center justify-center bg-slate-900/85 backdrop-blur-md p-4 sm:p-6 md:p-8 animate-fade-in">
|
||||
<div className="bg-slate-900 border border-slate-800/80 rounded-3xl w-full max-w-4xl h-[80vh] flex flex-col overflow-hidden shadow-2xl relative text-slate-355">
|
||||
<div className="bg-slate-900 border border-slate-800/80 rounded-3xl w-full max-w-5xl h-[85vh] flex flex-col overflow-hidden shadow-2xl relative text-slate-355">
|
||||
|
||||
{/* Modal Header */}
|
||||
<div className="flex justify-between items-center px-6 py-4 bg-slate-950/45 border-b border-slate-800/60">
|
||||
@@ -49,33 +51,48 @@ export default function EconometricsBlueprintModal({ isOpen, onClose }: Economet
|
||||
|
||||
<div className="border-b border-slate-800/80 pb-3">
|
||||
<h3 className="text-base font-bold text-slate-200">Event Studies & Models</h3>
|
||||
<p className="text-xs text-slate-400 mt-1">Operational details of the econometric event study solver.</p>
|
||||
<p className="text-xs text-slate-400 mt-1">Operational details of the econometric event study solver, timeline configuration, and abnormal returns calculations.</p>
|
||||
</div>
|
||||
|
||||
{/* Core Mechanics */}
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
|
||||
<div className="p-4 rounded-xl border border-slate-800/60 bg-slate-950/40 space-y-2">
|
||||
<h4 className="text-xs font-bold text-indigo-400 uppercase tracking-wider font-mono">1. Event Window Parameter Configuration</h4>
|
||||
<p className="text-xs text-slate-400 leading-relaxed font-sans">
|
||||
Allows defining the timeline partitions for analysis:
|
||||
* **Estimation Window**: Historical baseline period (e.g. 120 days) used to estimate the normal asset return relationships.
|
||||
* **Gap Window**: Separation buffer (e.g. 10 days) to prevent event-related leakages from skewing parameters.
|
||||
* **Event Window**: Analysis window surrounding the event day (e.g. [-5, +5]).
|
||||
</p>
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-6">
|
||||
<div className="p-5 rounded-2xl border border-slate-800/60 bg-slate-950/40 space-y-3 flex flex-col">
|
||||
<h4 className="text-xs font-bold text-indigo-400 uppercase tracking-wider font-mono">1. Event Window Configuration</h4>
|
||||
<div className="text-xs text-slate-400 leading-relaxed font-sans space-y-2 flex-1">
|
||||
<p>
|
||||
Allows defining the timeline partitions for analysis. The **120-day Estimation Window** serves to isolate market beta (<InlineMath math="\beta_i" />) and baseline alpha (<InlineMath math="\alpha_i" />) from standard market returns using OLS estimation:
|
||||
</p>
|
||||
<BlockMath math="R_{it} = \alpha_i + \beta_i R_{mt} + \epsilon_{it}" />
|
||||
<p>
|
||||
The **10-day Gap Window** acts as a strict mathematical **Isolation Shield** to prevent information leakage, pre-event front-running, or insider-related abnormal volatility from contaminating the baseline parameters.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="p-4 rounded-xl border border-slate-800/60 bg-slate-950/40 space-y-2">
|
||||
<div className="p-5 rounded-2xl border border-slate-800/60 bg-slate-950/40 space-y-3 flex flex-col">
|
||||
<h4 className="text-xs font-bold text-indigo-400 uppercase tracking-wider font-mono">2. Abnormal Returns (AR)</h4>
|
||||
<p className="text-xs text-slate-400 leading-relaxed font-sans">
|
||||
Computes daily differences between the actual stock return and its expected "normal" return (using market-adjusted models or CAPM parameters derived during the estimation window).
|
||||
</p>
|
||||
<div className="text-xs text-slate-400 leading-relaxed font-sans space-y-2 flex-1">
|
||||
<p>
|
||||
Computes daily differences between the actual stock return (<InlineMath math="R_{it}" />) and its expected normal return:
|
||||
</p>
|
||||
<BlockMath math="AR_{it} = R_{it} - (\hat{\alpha}_i + \hat{\beta}_i R_{mt})" />
|
||||
<p>
|
||||
where <InlineMath math="\hat{\alpha}_i" /> and <InlineMath math="\hat{\beta}_i" /> are the OLS parameters estimated over the estimation window, and <InlineMath math="R_{mt}" /> represents the actual market benchmark index return on day <InlineMath math="t" />. This isolates the asset's idiosyncratic reaction to event-specific shocks.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="p-4 rounded-xl border border-slate-800/60 bg-slate-950/40 space-y-2">
|
||||
<div className="p-5 rounded-2xl border border-slate-800/60 bg-slate-950/40 space-y-3 flex flex-col">
|
||||
<h4 className="text-xs font-bold text-indigo-400 uppercase tracking-wider font-mono">3. Cumulative Abnormal Returns (CAR)</h4>
|
||||
<p className="text-xs text-slate-400 leading-relaxed font-sans">
|
||||
Integrates and sums the daily abnormal returns across the event window. Determines whether an event (e.g. earnings release, regulatory fine, supply-chain shock) created statistically significant excess wealth changes.
|
||||
</p>
|
||||
<div className="text-xs text-slate-400 leading-relaxed font-sans space-y-2 flex-1">
|
||||
<p>
|
||||
Integrates and sums the daily abnormal returns across the specified event window to track the cumulative market shocks:
|
||||
</p>
|
||||
<BlockMath math="CAR_i(t_1, t_2) = \sum_{t=t_1}^{t_2} AR_{it}" />
|
||||
<p>
|
||||
where <InlineMath math="t_1" /> and <InlineMath math="t_2" /> define the bounds of the event window. This determines whether an event (e.g. earnings release, regulatory fine, supply-chain shock) created statistically significant excess wealth changes.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -87,7 +104,7 @@ export default function EconometricsBlueprintModal({ isOpen, onClose }: Economet
|
||||
<strong className="text-indigo-400 font-semibold">Event Parameters Input Mask:</strong> Edit estimation days, gap days, event horizons, and click **"Run Event Study Solver"**. Initiates server-side calculations.
|
||||
</p>
|
||||
<p>
|
||||
<strong className="text-indigo-400 font-semibold">CAR Event Charts:</strong> Renders a Recharts line chart illustrating the trajectory of Cumulative Abnormal Returns ($CAR$) across the event window. A significant deviation from zero indicates market inefficiency or corporate information shocks.
|
||||
<strong className="text-indigo-400 font-semibold">CAR Event Charts:</strong> Renders a Recharts line chart illustrating the trajectory of Cumulative Abnormal Returns (<InlineMath math="CAR" />) across the event window. A significant deviation from zero indicates market inefficiency or corporate information shocks.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user