redesign activation gate to expected value + make pipelines cron-configurable
Diagnosing "no qualified signals for 5 days": setups were generated but none qualified. The gate required BOTH a high min_rr (2.0) AND a high min_target_probability (60), which became contradictory after the Jun-15 probability recalibration — probability already embeds R:R via the 1/(rr+1) ruin term, so high-R:R targets are inherently low-probability and nothing cleared both. Gate is now expected value (R): p*rr - (1-p) from the primary target's probability. R:R and confidence stay as floors; high-conviction / exclude-conflicts / min-target-probability become optional tighteners (default off). Defaults: min_expected_value=0.15, min_rr=1.2, min_confidence=55. EV is only enforced when computable. Migration 009 clears stored activation_* rows so the new defaults apply. Backtest sweeps min_expected_value instead of target probability. Scheduling: pipelines are now cron-configurable in Admin -> Jobs. daily_pipeline (full, default 0 7 * * *) plus a new light intraday_pipeline (OHLCV + outcome eval, default hourly US session) that keeps prices/live-R:R current without setup churn. Fundamentals on its own early weekly cron. Timezone configurable (default Europe/Berlin). Moving interval->CronTrigger also fixes the restart-deferral bug where an interval job's countdown resets on every process restart. 319 backend unit tests pass; frontend tsc clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -161,18 +161,19 @@ export function BacktestPanel() {
|
||||
{report.sweep && report.sweep.length > 0 && (
|
||||
<div>
|
||||
<p className="mb-2 text-xs font-medium uppercase tracking-widest text-gray-500">
|
||||
Min target-probability sweep
|
||||
Min expected-value sweep
|
||||
</p>
|
||||
<p className="mb-2 text-[11px] text-gray-500">
|
||||
How many setups qualify — and how they perform — at each gate threshold (other
|
||||
gate conditions held fixed). Lower = more trades, watch that expectancy holds.
|
||||
Your current setting is highlighted; set it in Admin → Settings → Activation.
|
||||
How many setups qualify — and how they perform — at each expected-value gate (other
|
||||
gate conditions held fixed). EV is in R: 0.15 means +0.15× your risk per trade on
|
||||
average. Lower = more trades, watch that expectancy holds. Your current setting is
|
||||
highlighted; set it in Admin → Settings → Activation.
|
||||
</p>
|
||||
<div className="glass overflow-x-auto">
|
||||
<table className="w-full text-sm">
|
||||
<thead>
|
||||
<tr className="border-b border-white/[0.06] text-left text-xs uppercase tracking-wider text-gray-500">
|
||||
<th className="px-4 py-2.5">Min Target Prob</th>
|
||||
<th className="px-4 py-2.5">Min EV (R)</th>
|
||||
<th className="px-4 py-2.5 text-right">Qualified</th>
|
||||
<th className="px-4 py-2.5 text-right">Wins</th>
|
||||
<th className="px-4 py-2.5 text-right">Losses</th>
|
||||
@@ -183,12 +184,12 @@ export function BacktestPanel() {
|
||||
</thead>
|
||||
<tbody>
|
||||
{report.sweep.map((row) => {
|
||||
const current = Math.abs(row.min_target_probability - report.min_target_probability) < 0.5;
|
||||
const current = Math.abs(row.min_expected_value - report.min_expected_value) < 0.001;
|
||||
return (
|
||||
<tr key={row.min_target_probability} className={`border-b border-white/[0.04] ${current ? 'bg-blue-400/10' : ''}`}>
|
||||
<tr key={row.min_expected_value} className={`border-b border-white/[0.04] ${current ? 'bg-blue-400/10' : ''}`}>
|
||||
<td className="num px-4 py-2.5 text-gray-200">
|
||||
{current && <span className="mr-1 text-blue-300">★</span>}
|
||||
{row.min_target_probability}%
|
||||
{row.min_expected_value.toFixed(2)}
|
||||
</td>
|
||||
<td className="num px-4 py-2.5 text-right text-gray-200">{row.total}</td>
|
||||
<td className="num px-4 py-2.5 text-right text-emerald-400">{row.wins}</td>
|
||||
|
||||
Reference in New Issue
Block a user