|
|
|
|
@ -98,7 +98,6 @@ interface DupState {
|
|
|
|
|
end: string | null;
|
|
|
|
|
no_trades: boolean;
|
|
|
|
|
fixed_capital: boolean;
|
|
|
|
|
daily_budget_reset: boolean;
|
|
|
|
|
parking: string | null;
|
|
|
|
|
idle_alpha: string | null;
|
|
|
|
|
form4_sleeve: string | null;
|
|
|
|
|
@ -117,7 +116,6 @@ function makeDupState(task: BacktestTask): DupState {
|
|
|
|
|
end: !isYear ? task.end_date ?? null : null,
|
|
|
|
|
no_trades: task.no_trades ?? false,
|
|
|
|
|
fixed_capital: task.fixed_capital ?? false,
|
|
|
|
|
daily_budget_reset: task.daily_budget_reset ?? false,
|
|
|
|
|
parking: task.parking ?? null,
|
|
|
|
|
idle_alpha: task.idle_alpha ?? null,
|
|
|
|
|
form4_sleeve: task.form4_sleeve ?? null,
|
|
|
|
|
@ -214,7 +212,6 @@ export function BacktestPage() {
|
|
|
|
|
const [capital, setCapital] = useState('10000');
|
|
|
|
|
const [noTrades, setNoTrades] = useState(false);
|
|
|
|
|
const [fixedCapital, setFixedCapital] = useState(false);
|
|
|
|
|
const [dailyBudgetReset, setDailyBudgetReset] = useState(false);
|
|
|
|
|
const [directMode, setDirectMode] = useState(true);
|
|
|
|
|
const [parking, setParking] = useState('');
|
|
|
|
|
const [idleAlpha, setIdleAlpha] = useState('');
|
|
|
|
|
@ -247,7 +244,6 @@ export function BacktestPage() {
|
|
|
|
|
setNoTrades(s.no_trades ?? false);
|
|
|
|
|
dupFixedCapitalRef.current = s.fixed_capital ?? false;
|
|
|
|
|
setFixedCapital(s.fixed_capital ?? false);
|
|
|
|
|
setDailyBudgetReset(s.daily_budget_reset ?? false);
|
|
|
|
|
setParking(s.parking ?? '');
|
|
|
|
|
setIdleAlpha(s.idle_alpha ?? '');
|
|
|
|
|
setForm4Sleeve(s.form4_sleeve ?? '');
|
|
|
|
|
@ -390,7 +386,6 @@ export function BacktestPage() {
|
|
|
|
|
: (endDate || null),
|
|
|
|
|
no_trades: noTrades,
|
|
|
|
|
fixed_capital: fixedCapital,
|
|
|
|
|
daily_budget_reset: dailyBudgetReset,
|
|
|
|
|
parking: parking || null,
|
|
|
|
|
idle_alpha: idleAlpha || null,
|
|
|
|
|
form4_sleeve: form4Sleeve || null,
|
|
|
|
|
@ -833,10 +828,6 @@ export function BacktestPage() {
|
|
|
|
|
<input type="checkbox" checked={fixedCapital} onChange={e => setFixedCapital(e.target.checked)} style={{ width: 13, height: 13 }} />
|
|
|
|
|
<span style={{ fontFamily: 'var(--font-mono)', fontSize: 12, color: fixedCapital ? 'var(--orange)' : 'var(--text3)' }}>Fixed Capital (Simple Return)</span>
|
|
|
|
|
</label>
|
|
|
|
|
<label style={{ display: 'flex', alignItems: 'center', gap: 6, cursor: 'pointer' }}>
|
|
|
|
|
<input type="checkbox" checked={dailyBudgetReset} onChange={e => setDailyBudgetReset(e.target.checked)} style={{ width: 13, height: 13 }} />
|
|
|
|
|
<span style={{ fontFamily: 'var(--font-mono)', fontSize: 12, color: dailyBudgetReset ? 'var(--purple)' : 'var(--text3)' }}>Daily Budget Reset</span>
|
|
|
|
|
</label>
|
|
|
|
|
<label style={{ display: 'flex', alignItems: 'center', gap: 6, cursor: selectedExps.length === 1 ? 'pointer' : 'not-allowed', opacity: selectedExps.length === 1 ? 1 : 0.4 }}>
|
|
|
|
|
<input
|
|
|
|
|
type="checkbox"
|
|
|
|
|
@ -1089,7 +1080,7 @@ export function BacktestPage() {
|
|
|
|
|
<td style={{ padding: '11px 14px', fontFamily: 'var(--font-mono)', fontSize: 13, color: 'var(--cyan)', whiteSpace: 'nowrap' }}>
|
|
|
|
|
${task.capital?.toLocaleString() ?? '—'}
|
|
|
|
|
</td>
|
|
|
|
|
<td style={{ padding: '11px 14px', whiteSpace: 'nowrap', display: 'flex', gap: 4, alignItems: 'center' }}>
|
|
|
|
|
<td style={{ padding: '11px 14px', whiteSpace: 'nowrap' }}>
|
|
|
|
|
{task.fixed_capital && (
|
|
|
|
|
<span style={{
|
|
|
|
|
fontFamily: 'var(--font-mono)', fontSize: 10,
|
|
|
|
|
@ -1099,15 +1090,6 @@ export function BacktestPage() {
|
|
|
|
|
borderRadius: 3, padding: '1px 5px',
|
|
|
|
|
}}>FC</span>
|
|
|
|
|
)}
|
|
|
|
|
{task.daily_budget_reset && (
|
|
|
|
|
<span style={{
|
|
|
|
|
fontFamily: 'var(--font-mono)', fontSize: 10,
|
|
|
|
|
color: 'var(--purple)',
|
|
|
|
|
background: 'color-mix(in srgb, var(--purple) 12%, transparent)',
|
|
|
|
|
border: '1px solid color-mix(in srgb, var(--purple) 25%, transparent)',
|
|
|
|
|
borderRadius: 3, padding: '1px 5px',
|
|
|
|
|
}}>DBR</span>
|
|
|
|
|
)}
|
|
|
|
|
</td>
|
|
|
|
|
<td style={{ padding: '11px 14px', fontFamily: 'var(--font-mono)', fontSize: 12, color: 'var(--text2)' }}>
|
|
|
|
|
{task.start_date ? (
|
|
|
|
|
|