promote residual momentum ranking
This commit is contained in:
@@ -41,16 +41,16 @@ export function ActivationSettings() {
|
||||
<p className="mt-1 text-xs text-gray-500">
|
||||
What counts as a signal worth acting on. Drives the Dashboard's "Qualified" metric, the
|
||||
Signals "Qualified only" view, and the Track Record's qualified stats. The core selection is
|
||||
<span className="text-gray-300"> cross-sectional momentum</span> — the ticker must rank in the
|
||||
top slice of the universe by 12-1 month momentum, the one signal the backtest showed predicts
|
||||
forward returns. R:R and confidence stay as floors. Tune the cutoff against the Track Record's
|
||||
<span className="text-gray-300"> residual cross-sectional momentum</span> — the ticker must rank in the
|
||||
top slice of the universe by beta-adjusted 12-1 month momentum, the production signal promoted
|
||||
from the backtest. R:R and confidence stay as floors. Tune the cutoff against the Track Record's
|
||||
momentum sweep to see what actually wins.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="grid gap-4 md:grid-cols-3">
|
||||
<label className="block space-y-1">
|
||||
<span className="text-xs text-gray-400">Min Momentum Percentile</span>
|
||||
<span className="text-xs text-gray-400">Min Residual Momentum Percentile</span>
|
||||
<input
|
||||
type="number"
|
||||
min={0}
|
||||
@@ -60,7 +60,7 @@ export function ActivationSettings() {
|
||||
onChange={(e) => setForm((prev) => ({ ...prev, min_momentum_percentile: Number(e.target.value) }))}
|
||||
className="w-full input-glass px-3 py-2 text-sm"
|
||||
/>
|
||||
<span className="text-[11px] text-gray-600">Ticker's 12-1 momentum rank. 80 = top 20% of the universe. 0 disables. The core gate.</span>
|
||||
<span className="text-[11px] text-gray-600">Ticker's residual 12-1 momentum rank. 80 = top 20% of the universe. 0 disables. The core gate.</span>
|
||||
</label>
|
||||
<label className="block space-y-1">
|
||||
<span className="text-xs text-gray-400">Min Risk:Reward (1 : x)</span>
|
||||
@@ -100,7 +100,7 @@ export function ActivationSettings() {
|
||||
Require a directional call (exclude NEUTRAL)
|
||||
<span className="mt-0.5 block text-[11px] text-gray-500">
|
||||
On by default. A NEUTRAL ("No Clear Setup") recommendation isn't a tradeable signal, so it
|
||||
never qualifies or becomes a top pick. Turn off to also count no-clear-direction momentum leaders.
|
||||
never qualifies or becomes a top pick. Turn off to also count no-clear-direction residual momentum leaders.
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
|
||||
@@ -308,11 +308,11 @@ export function BacktestPanel() {
|
||||
{report.sweep && report.sweep.length > 0 && report.sweep[0].min_momentum_percentile != null && (
|
||||
<div>
|
||||
<p className="mb-2 text-xs font-medium uppercase tracking-widest text-gray-500">
|
||||
Momentum-percentile sweep
|
||||
Residual-momentum percentile sweep
|
||||
</p>
|
||||
<p className="mb-2 text-[11px] text-gray-500">
|
||||
How many setups qualify — and how they perform — at each momentum-rank cutoff (floors
|
||||
held fixed). 80 = only the top 20% of the universe by 12-1 momentum each week; 0 =
|
||||
How many setups qualify — and how they perform — at each production-rank cutoff (floors
|
||||
held fixed). 80 = only the top 20% of the universe by residual 12-1 momentum each week; 0 =
|
||||
floors only. Lower = more trades, watch that expectancy holds. Your current setting is
|
||||
highlighted; set it in Admin → Settings → Activation.
|
||||
</p>
|
||||
@@ -320,7 +320,7 @@ export function BacktestPanel() {
|
||||
<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 momentum %ile</th>
|
||||
<th className="px-4 py-2.5">Min residual %ile</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>
|
||||
@@ -541,10 +541,7 @@ export function BacktestPanel() {
|
||||
Strategy variants
|
||||
</p>
|
||||
<p className="mb-2 text-[11px] text-gray-500">
|
||||
{report.strategy_variants.note ?? 'Research-only portfolio variants.'}{' '}
|
||||
<span className="text-gray-300">
|
||||
Residual momentum stays research-only until a variant beats production under the promotion rules.
|
||||
</span>
|
||||
{report.strategy_variants.note ?? 'Research-only portfolio variants.'}
|
||||
</p>
|
||||
<div className="glass overflow-x-auto">
|
||||
<table className="w-full text-sm">
|
||||
|
||||
@@ -24,7 +24,7 @@ export interface FieldPoint {
|
||||
interface StandingMatrixProps {
|
||||
symbol: string;
|
||||
composite: number | null; // X for the highlighted dot (authoritative, from the scores endpoint)
|
||||
momentum: number | null; // Y for the highlighted dot (the ticker's 12-1 momentum percentile)
|
||||
momentum: number | null; // Y for the highlighted dot (residual 12-1 momentum percentile)
|
||||
field: FieldPoint[]; // every tracked ticker, for the background cloud
|
||||
gateMomentum: number; // Y divider = the activation gate's momentum percentile
|
||||
status: 'top-pick' | 'qualified' | 'none';
|
||||
@@ -186,7 +186,7 @@ export default function StandingMatrix({
|
||||
<p className="mt-1 text-sm leading-snug text-gray-400">{v.note}</p>
|
||||
<div className="mt-3 space-y-1 text-xs text-gray-500">
|
||||
<StatRow label="Quality (composite)" value={`${Math.round(here.composite)}`} />
|
||||
<StatRow label="Momentum percentile" value={`${Math.round(here.momentum)}`} />
|
||||
<StatRow label="Residual momentum percentile" value={`${Math.round(here.momentum)}`} />
|
||||
{confidence != null && <StatRow label="Long confidence" value={`${Math.round(confidence)}%`} />}
|
||||
</div>
|
||||
</>
|
||||
@@ -206,7 +206,7 @@ export default function StandingMatrix({
|
||||
</div>
|
||||
<p className="mt-2 text-[11px] leading-relaxed text-gray-600">
|
||||
Each dot is a tracked ticker; <span className="text-gray-300">this one is highlighted</span>. The dashed line is the
|
||||
activation gate ({Math.round(gate)}th-pct momentum) — above it qualifies for a top pick. Click any peer to open it.
|
||||
activation gate ({Math.round(gate)}th-pct residual momentum) — above it qualifies for a top pick. Click any peer to open it.
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -33,9 +33,9 @@ export function qualifiesSetup(setup: TradeSetup, config: ActivationConfig): boo
|
||||
return false;
|
||||
}
|
||||
if ((setup.confidence_score ?? 0) < config.min_confidence) return false;
|
||||
// Cross-sectional momentum is the core selection (long-only). While the gate is
|
||||
// active, shorts never qualify; the percentile floor is enforced only when a
|
||||
// percentile is attached, otherwise defer to the floors.
|
||||
// Residual cross-sectional momentum is the core selection (long-only). While
|
||||
// the gate is active, shorts never qualify; the percentile floor is enforced
|
||||
// only when a percentile is attached, otherwise defer to the floors.
|
||||
if (config.min_momentum_percentile > 0) {
|
||||
if (setup.direction === 'short') return false;
|
||||
if (setup.momentum_percentile != null && setup.momentum_percentile < config.min_momentum_percentile) {
|
||||
@@ -53,7 +53,7 @@ export function qualifiesSetup(setup: TradeSetup, config: ActivationConfig): boo
|
||||
|
||||
/**
|
||||
* Symbol of the current single 'top pick' — the #1 row the dashboard highlights:
|
||||
* the highest 12-1 momentum percentile among qualified setups (or among all
|
||||
* the highest residual 12-1 momentum percentile among qualified setups (or among all
|
||||
* setups when none qualify). Returns null when there are no setups. Keep in step
|
||||
* with the Top Setups ranking in DashboardPage.
|
||||
*/
|
||||
@@ -74,7 +74,7 @@ export function topPickSymbol(
|
||||
/** Short human summary of the active gate, e.g. for tooltips/labels. */
|
||||
export function activationSummary(config: ActivationConfig): string {
|
||||
const parts = [];
|
||||
if (config.min_momentum_percentile > 0) parts.push(`top ${(100 - config.min_momentum_percentile).toFixed(0)}% momentum`);
|
||||
if (config.min_momentum_percentile > 0) parts.push(`top ${(100 - config.min_momentum_percentile).toFixed(0)}% residual momentum`);
|
||||
parts.push(`R:R ≥ ${config.min_rr.toFixed(1)}`, `conf ≥ ${config.min_confidence.toFixed(0)}%`);
|
||||
if (config.exclude_neutral) parts.push('directional');
|
||||
if (config.require_high_conviction) parts.push('high-conviction');
|
||||
|
||||
@@ -77,7 +77,7 @@ export default function DashboardPage() {
|
||||
);
|
||||
|
||||
// Show qualified setups first; fall back to the full list when none qualify.
|
||||
// Rank by 12-1 momentum percentile so the strongest names sit at the top.
|
||||
// Rank by residual 12-1 momentum percentile so the strongest names sit at the top.
|
||||
const showingQualified = qualifiedSetups.length > 0;
|
||||
const topSetups: TradeSetup[] = useMemo(() => {
|
||||
const pool = showingQualified ? qualifiedSetups : trades.data ?? [];
|
||||
@@ -214,7 +214,7 @@ export default function DashboardPage() {
|
||||
<th className="px-4 py-3 text-right">Entry</th>
|
||||
<th className="px-4 py-3 text-right">R:R</th>
|
||||
<th className="px-4 py-3 text-right">Target Prob</th>
|
||||
<th className="px-4 py-3 text-right">Momentum</th>
|
||||
<th className="px-4 py-3 text-right">Residual Mom.</th>
|
||||
<th className="hidden px-4 py-3 md:table-cell">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -216,7 +216,7 @@ export default function TickerDetailPage() {
|
||||
[setupsForSymbol],
|
||||
);
|
||||
|
||||
// Standing matrix: this ticker's momentum percentile + long confidence (from its
|
||||
// Standing matrix: this ticker's residual momentum percentile + long confidence (from its
|
||||
// setup), the field (every ticker's composite × momentum) for the cloud, and
|
||||
// whether it qualifies / is the top pick.
|
||||
const myMomentum = longSetup?.momentum_percentile ?? shortSetup?.momentum_percentile ?? null;
|
||||
@@ -296,7 +296,7 @@ export default function TickerDetailPage() {
|
||||
<StatusPill
|
||||
tone="blue"
|
||||
label="★ Top Pick"
|
||||
title="Current top pick — highest-momentum qualified setup right now"
|
||||
title="Current top pick — highest residual-momentum qualified setup right now"
|
||||
/>
|
||||
)}
|
||||
{hasOpenTrade && (
|
||||
|
||||
Reference in New Issue
Block a user