feat: instrument model
This commit is contained in:
@@ -1295,6 +1295,31 @@ function TimelineView({ instrument }: { instrument: string }) {
|
||||
className="flex items-center gap-1 text-xs text-sky-400 hover:text-sky-300 border border-sky-700/40 rounded px-2 py-0.5 transition-colors disabled:opacity-40">
|
||||
<Activity className="w-3 h-3"/> {importingCal ? '…' : 'Import calendrier'}
|
||||
</button>
|
||||
<button onClick={() => {
|
||||
// Guidance event : pousse la courbe depuis le début avec absorption lente
|
||||
const simStart = data[0]?.date ?? new Date().toISOString().slice(0, 10)
|
||||
const simLen = Math.max(30, data.length)
|
||||
const bias = data[0]?.structural_pips ?? 0
|
||||
const guidId = 'guidance_structural'
|
||||
setVirtuals(prev => {
|
||||
if (prev.some(v => v.id === guidId)) return prev // déjà présent
|
||||
return [{
|
||||
id: guidId,
|
||||
date: simStart,
|
||||
category: 'unclassified',
|
||||
pips: bias,
|
||||
label: 'Guidance macro',
|
||||
absorption_days: simLen,
|
||||
rise_days: 0,
|
||||
plateau_days: 0,
|
||||
decay_type: 'linear',
|
||||
}, ...prev]
|
||||
})
|
||||
}}
|
||||
className="flex items-center gap-1 text-xs text-amber-400 hover:text-amber-300 border border-amber-700/40 rounded px-2 py-0.5 transition-colors"
|
||||
title="Injecte une force directionnelle lente depuis le début de la simulation">
|
||||
<TrendingUp className="w-3 h-3"/> Guidance
|
||||
</button>
|
||||
<button onClick={() => setVirtuals(v => [...v, newVirtualEvent()])}
|
||||
className="flex items-center gap-1 text-xs text-violet-400 hover:text-violet-300 border border-violet-700/40 rounded px-2 py-0.5 transition-colors">
|
||||
<Plus className="w-3 h-3"/> Manuel
|
||||
|
||||
Reference in New Issue
Block a user