feat: strategy builder
This commit is contained in:
@@ -1594,7 +1594,7 @@ export const usePriceStrategy = () =>
|
||||
|
||||
export type OptimizeConstraints = {
|
||||
max_legs: number
|
||||
delta_threshold: number
|
||||
delta_threshold: number | null
|
||||
max_loss_cap?: number | null
|
||||
objective: 'net_pnl' | 'return_on_risk' | 'prob_weighted'
|
||||
top_n?: number
|
||||
|
||||
@@ -427,10 +427,11 @@ function OptimizerPanel({
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label className="text-slate-400 block mb-1">Seuil neutralité Δ</label>
|
||||
<label className="text-slate-400 block mb-1">Seuil neutralité Δ (optionnel)</label>
|
||||
<input
|
||||
type="number" step={0.01} min={0} value={constraints.delta_threshold}
|
||||
onChange={(e) => setConstraints({ ...constraints, delta_threshold: parseFloat(e.target.value) || 0 })}
|
||||
type="number" step={0.01} min={0} placeholder="illimité"
|
||||
value={constraints.delta_threshold ?? ''}
|
||||
onChange={(e) => setConstraints({ ...constraints, delta_threshold: e.target.value === '' ? null : parseFloat(e.target.value) })}
|
||||
className="w-full bg-dark-700 border border-slate-700/50 rounded px-2 py-1.5 text-slate-200"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user