feat: market event
This commit is contained in:
@@ -402,6 +402,7 @@ function EventDetail({
|
||||
pricesMode?: string
|
||||
lagMin?: number
|
||||
lagDays?: number
|
||||
lagDebug?: { output_ids: string[]; edges_to_output: number; edges_with_lag_days: number; used_all_edges: boolean }
|
||||
} | null>(null)
|
||||
const [graphData, setGraphData] = useState<GraphData | null>(null)
|
||||
|
||||
@@ -557,6 +558,7 @@ function EventDetail({
|
||||
pricesMode: d.prices_mode,
|
||||
lagMin: d.effective_lag_min,
|
||||
lagDays: d.effective_lag_days,
|
||||
lagDebug: d.lag_debug,
|
||||
})
|
||||
if (d.graph_json?.nodes?.length) setGraphData(d.graph_json)
|
||||
await loadAnalyses()
|
||||
@@ -878,6 +880,7 @@ function EventDetail({
|
||||
const lagMin = anResult.lagMin ?? 0
|
||||
const lagDays = anResult.lagDays ?? 0
|
||||
const driftEntries = Object.entries(anResult.drift ?? {})
|
||||
const dbg = anResult.lagDebug
|
||||
return (
|
||||
<div className="bg-slate-900/70 border border-slate-700/40 rounded px-3 py-2 space-y-1.5 text-[10px] font-mono">
|
||||
<div className="flex items-center gap-2 flex-wrap">
|
||||
@@ -895,6 +898,15 @@ function EventDetail({
|
||||
{mode !== 'intraday_5m' && lagDays === 0 && (
|
||||
<span className="text-slate-600 italic">lag J = 0 (jour J)</span>
|
||||
)}
|
||||
{dbg && dbg.used_all_edges && (
|
||||
<span className="text-yellow-500/80 italic">⚠ fallback edges (output_ids vides)</span>
|
||||
)}
|
||||
{dbg && (
|
||||
<span className="text-slate-600">
|
||||
edges→out: <span className="text-slate-400">{dbg.edges_to_output}</span>
|
||||
{' '}| edges lag_j: <span className="text-slate-400">{dbg.edges_with_lag_days}</span>
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
{driftEntries.map(([inst, d]) => (
|
||||
<div key={inst} className="flex items-center gap-2 flex-wrap border-t border-slate-800/60 pt-1.5">
|
||||
|
||||
Reference in New Issue
Block a user