Command center

Markets, funds, signals and risk in a single view.

Data status Loading
Loading data from dashboard/data/market_snapshot.json...
Tracked assets
0
Positive candidates
0
Top candidate
-
Avg 20d volatility
-

Data coverage — daily ingestion check

Distinct tickers loaded per day and per timeframe. A strategy built on incomplete data is not reliable — this is where you catch the days that did not load, or loaded only halfway.

Date1d4h1h30m15m5m

Green = full (≥98% of the best recent day) · Amber = partial · Red = missing on a trading day · Grey = weekend / market closed or timeframe not downloaded. Generated by agents/agente_data_coverage.py.

Quick ranking

Ticker Class 1d return 20d momentum 20d vol Score

Distribution

Loading historical prices to plot asset evolution...

Normalized evolution

Base 100 to compare assets with different price levels. Ideal for spotting momentum and relative rotation.

Demo

20d Momentum

Quick read of recent strength per asset.

20d Volatility

Relative risk before discussing position sizing.

Initial scanner: sorts assets by momentum, recent return, volatility and z-score. This is a search layer, not a buy order.

Active universe (S&P 500 momentum + open positions + legacy)

Leonex rotates the universe weekly: downloads all 500 S&P components, computes 60d momentum and keeps the top-30. It ALWAYS includes tickers with open positions (to manage TP/SL/timeout even si they fall out of the top) plus legacy crypto/forex assets that we keep monitoring.

Assets in universe
-
Rebalanced?
-
Entries this cycle
-
Salidas this cycle
-
Rank Ticker 60d momentum score Class Motivo
Changes vs previous universe
Change Ticker Actual rank Score

Ticker Class Close Date 1d return 20d mom 60d mom 20d vol 20d Z Decision
Loading data from the Regime Agent...

Regime per asset

Classification based on ADX, ATR and SMA-50. Generated by agent_regimen.py

Ticker Date Regime ADX ATR SMA-50 Close Vs SMA-50

Interpretation guide

UPTREND

ADX > 25 + Price > SMA-50

The asset has strong directional momentum and trades above its 50-session average. Favorable regime for trend-following strategies.

DOWNTREND

ADX > 25 + Price < SMA-50

Strong trend but to the downside. Avoid long positions. May be a favorable environment for hedging or short strategies.

SIDEWAYS

ADX < 25

Market with no clear direction. ADX indicates trend weakness. More appropriate for mean reversion than for momentum.

CRISIS

ATR > 2x mean 60d ATR

Abnormally high volatility vs recent history. Market stress signal. Reduce exposure, widen stops or exit.

Regime-conditional signals produced by agent_senales.py: momentum in UPTREND, mean reversion (RSI<30) in SIDEWAYS, flat in CRISIS or BEARISH. Validated with Walk-Forward + DSR + Monte Carlo (agent_validacion.py --strategy regime_adaptive_v1_lo).

Carrier Health — read honesto del legacy

Síntesis cruda de los 3 indicadores de salud del carril regime_adaptive_v1_lo + Meta-Labeling. Si discrepan, este panel resume qué creer y qué no. El bridge de estrategias promovidas (Strategy Lab) tiene su propia validación independiente (DSR ≥ 0.80, walk-forward, permutación) y no se ve afectado por la salud aquí.

PBO (overfitting probability)

Meta-Labeling AUC (OOF)

Drift Monitor (rolling)

Overall verdict

Intraday Timeframe Selector (Phase A — diagnostic)

For each asset, the Sharpe of a simple momentum strategy is computed across three timeframes (daily, 1h, 4h) and the winner is chosen. Anti-flip: it only switches from daily to intraday if the improvement exceeds 0.20 Sharpe. Current phase = diagnostic only. The rollout (having regime/signals/Meta operate on the chosen timeframe) comes later with your confirmation. Generate the card with: python agents/agente_datos_intraday.pypython agents/agente_timeframe_selector.py.

Tickers analyzed
-
Kept on daily
-
Moved to 1h
-
Moved to 4h
-

Ticker Chosen Sharpe (chosen) Sharpe daily Sharpe 1h Sharpe 4h Margin vs 2nd

Strategy Lab v3 — strategies scored by their trades (anti-overfitting)

Each strategy = entry trigger + regime filter + exit config (take-profit / stop-loss / timeout). 24 entry triggers in three families — momentum/trend (volume-confirmed breakouts, aligned EMA reclaim, Donchian, MACD, ATR breakout, VWAP), mean-reversion (RSI extremes, Bollinger, down-streaks, Japanese candles), and multi-indicator confluence (entries that need two or three indicators to agree at the same time) — × 5 regime filters (strong uptrend, range-bound, pullback-in-uptrend, volatility expansion, plus unconditioned) × 4 exit configs = 480 strategies per asset. Crossing each trigger with each regime is what turns a loose indicator into a strategy with economic sense — a breakout in a trend is not the same trade as a breakout in a range. Every strategy is scored on its TRADES — each entry opens a discrete trade closed by TP / SL / timeout (Triple Barrier) — not on daily bars, so a buy-and-hold fluke with 2 trades can no longer rank high. The winner is picked by the Deflated Sharpe Ratio over trade returns (sample size = number of trades), validated walk-forward out-of-sample, and a strategy needs 40+ trades for GOLD / 25+ for SILVER. Every strategy is evaluated on 1d, 4h and 1h (the TF column) — intraday timeframes produce hundreds of trades per strategy, where the statistics are strong enough for SILVER/GOLD to be reachable honestly. Generate with: python agents/agente_strategy_lab.py.

GOLD (operate)
-
SILVER (watch)
-
BRONZE (doubtful)
-
REJECTED (ignore)
-

Tier Ticker TF Strategy Sharpe DSR OOS $10k → Return Trades Win rate Promote
How to activate a winning strategy

Copy the command from the "Promote" column and run it in the container terminal (EasyPanel → leonex-server → console). That records your choice in the asset_strategies table, and the Strategy Tracker below immediately starts a forward paper test of it.

Top-20 Rotation — bridge activo del momento

En vez de operar para siempre las estrategias que un dia fueron GOLD, la rotacion semanal rankea TODOS los candidatos elegibles de los 3 Labs (swing + scalping + custom) y selecciona las N mejores (default 20). Solo esas operan en el bridge. Las que salen del top quedan en histórico (active=0), no se borran. Anti-flicker: una entrada con menos de 4 semanas en el top se mantiene aunque caiga del ranking — evita "intercambios cosmeticos". Genera con python agents/agente_top20_selector.py --execute.

Top N configurado
Active in bridge
Last rotation
Anti-flicker

La rotación NO está activa todavía. Sin `agente_top20_selector` ejecutado, el bridge sigue operando todas las promovidas históricas (comportamiento anterior). Para activarla, lanza el agente con --execute.

Entered last rotation

Exited last rotation

Protected (anti-flicker)

# Ticker Strategy TF Tier DSR / PSR Source Weeks in top

Strategy Tracker — forward paper test of promoted strategies

When you --promote a strategy from the Strategy Lab, this tracker starts a genuine out-of-sample paper test: from that moment it counts only the trades whose entry happens after tracking began — data that was NOT used to pick the strategy. The Strategy Lab's backtest looks at the past; this measures whether the edge is real on NEW data. If a strategy holds up here its edge is genuine; if it falls apart it was overfitting that slipped through. No Alpaca orders — pure paper. Generate with python agents/agente_strategy_tracker.py.

Strategies tracked
-
With forward signals
-
Forward trades total
-

Ticker TF Strategy Tracking since Fwd trades Fwd win rate $10k → Fwd return Status

CPCV + PBO (Combinatorial Purged Cross-Validation — Lopez de Prado AFML ch.12)

CPCV splits trades into N groups and runs every combination of k test groups, producing C(N,k) parallel backtest paths with purge & embargo. The result is an empirical distribution of Sharpe ratios instead of a single point. PBO (Probability of Backtest Overfitting, Bailey-Borwein-Lopez de Prado-Zhu 2014) measures how often the best in-sample configuration falls in the bottom half out-of-sample: low PBO = robust, high PBO = noise.

PBO verdict
-
PBO score
-
Effective paths
-
Trades labeled
-
Sharpe OOS p05
-
Sharpe OOS median (p50)
-
Sharpe OOS p95
-
Sharpe OOS mean ± std
-

Configurations tested (Meta probability thresholds)

Threshold Mean train Sharpe (IS) Mean test Sharpe (OOS) Overfit gap % paths best IS % paths best OOS
Path-level detail (first 50)
Path Train N Test N Purged Embargo Best IS thr Sharpe IS Sharpe OOS OOS rank

Drift Monitor (live system health)

Compares rolling metrics of the most recent 60 trades against historical baselines. If the system degrades enough, the PAUSE_NEW_TRADES flag activates and the executor stops opening new positions (close_monitor keeps managing open ones until they exit).

System status
-
Pause new positions
-
Trades in window
-
Last evaluation
-
Metric Recent Baseline RED threshold Status Note

Recent drift evaluation history
Date Status Pause N Sharpe WinRate PF DD

Risk Monitor (event-driven live)

Real-time portfolio risk engine. Tracks drawdown vs HWM, daily P&L, position concentration, leverage, distance to Triple-Barrier stop-loss and market volatility spikes. Any CRITICAL event triggers the same PAUSE_NEW_TRADES flag used by the Drift Monitor — the executor stops opening new positions while the Close Monitor keeps managing open ones. Reset with agent_risk_monitor.py --reset-pause once the cause is resolved.

Overall severity
-
Drawdown vs HWM
-
Daily P&L
-
Leverage
-
Max position
-
HHI (concentration index)
-
Avg distance to SL
-
Vol z-score
-

Active events (this run)

Kind Severity Ticker Value Threshold Message
Recent event history
Timestamp Kind Severity Ticker Value Message
Equity curve (last 90 days)

HRP Sizing (Hierarchical Risk Parity)

When there are 2+ operable signals, Leonex assigns weights band risk contribution following the Lopez de Prado algorithm (AFML ch.16). Less volatile and less correlated assets get more weight. No matrix inversion — robust against estimation errors. With only 1 signal it keeps the fixed 5% sizing.

Method
-
Tickers in portfolio
-
Avg correlation
-
Window (days)
-
Rank Ticker Weight $ per $10K Annual vol Distribution

Causal Analysis (PC algorithm — Lopez de Prado ADIA 2026)

The Peter-Clark (PC) algorithm builds a causal DAG from conditional independence tests. It identifies which features are real CAUSES of the return (vs simple spurious correlations). This is the foundation of Causal Factor Investing: re-training Meta-Labeling restricted to causal features improves out-of-sample robustness and resists regime changes.

Observations
-
Causal features
-
Spurious features
-
Directed edges
-

Causes of the return (CAUSAL)

Spurious correlations (DO NOT USE as predictors)

DAG edges with strength
Source Type Target Strength

LLM Explanation (local Ollama)

Optional model that interprets the DAG in plain text. No tokens, no internet, all local. To activate: .\tools\install_ollama.ps1 install

Fractional Differentiation (Lopez de Prado AFML cap. 5)

Diagnostic / preparatory. For each ticker, searches the minimum fractional order d ∈ [0, 1] that makes log(price) stationary (ADF p ≤ 0.05). With d~0.4 it is typically possible to preserve >80% of the original memory while gaining stationarity — required if we ever feed raw price as a feature into the Meta. Currently the Meta uses already-stationary features (RSI, momentum, sigma, regimes), so this card is informational. Run manually with: python agents/agente_frac_diff.py.

Tickers analyzed
-
PASS / FAIL
-
d recommended (global)
-
ADF threshold
0.05

Ticker n obs ADF p (d=0) d_min ADF p (d_min) Corr with original Verdict

POOLED Portfolio Validation

Aggregates trades from all assets into a single chronological series and applies Walk-Forward + DSR + Bootstrap-H0. This indicator measures whether the system has edge, not whether each isolated asset has it.

Portfolio verdict
-
In-sample Sharpe
-
Walk-Forward Sharpe
-
MC p-value
-
DSR (Deflated)
-
Fold consistency
-
Avg WF drawdown
-
Aggregated trades
-

Assets with signal today
0
In LONG
0
In SHORT
0
Active strategy
-

Daily signal per asset

Joint reading of signals_report.json + validation_report.json. The verdict reflects whether the adaptive strategy passed the four filters: Walk-Forward Sharpe > 0, consistency ≥ 50%, DSR ≥ 0.95 and MC p-value < 0.05.

Ticker Last day Regime RSI 14 Mom 20d Signal WF Sharpe DSR MC p Verdict

Adaptive strategy rules

UPTREND

Long Momentum

Long (+1) if the 20-day return is positive. Exploits directional persistence when the ADX confirms the trend.

SIDEWAYS

Mean reversion

Long if RSI(14) < 30 (oversold). In long-short mode, short if RSI > 70. Bets on reversion to the mean in directionless markets.

DOWNTREND

Flat (long-only)

No position by default. In long-short mode, short if 20d momentum < 0. Avoids trading against the confirmed trend.

CRISIS

Out of the market

Abnormal volatility (ATR > 2x 60d average) = full stop. Protecting capital matters more than capturing extreme moves.

Triple Barrier: closed trades

Lopez de Prado style labeling: every signal !=0 is simulated as a real trade with take-profit (2σ), stop-loss (1σ) and timeout (5 days). Data from the file dashboard/data/trades_report.json.

Total trades
0
Win rate
-
Profit Factor
-
Expectancy / trade
-
Ticker Trades Win rate Avg return / trade Total return

Latest closed trades

Closed by TP, SL or timeout. The reason is noted in the Exit column.

Ticker Entry Exit Side Days Return Reason

Meta-Labeling: filter trades with ML

LightGBM classifier trained with Walk-Forward on the Triple Barrier trades. It learns which configuration of regime + RSI + sigma + momentum predicts winners. The final validator uses the trades with probability ≥ 0.55. Data: dashboard/data/meta_report.json.

Training mode

USED →
EXCLUDED →

Sampling uniqueness (Lopez de Prado AFML cap.4)

When two Triple Barrier trades overlap in time (same ticker, intersecting lifetimes), their information is correlated. Training the Meta with sample_weight = avg_uniqueness corrects for this and prevents the classifier from overestimating Sharpe.

Avg uniqueness
-
Trades with overlap (<0.95)
-
Information ratio
-

Model
-
AUC OOF (primary)
-

AUC OOF (comparison)

Delta AUC (primary − comparison)

Baseline win rate
-
Original trades
-
Primary features
Comparison features

prob_win threshold Accepted trades % retained Win rate Profit Factor Expectancy Total return

Top features by weight

Custom / PineScript strategies — translated & rigorously evaluated

PineScript runs only inside TradingView — Leonex cannot execute it. So a strategy's logic (entry / exit rules) is translated into Leonex's model and evaluated here with the same rigour as the Strategy Lab: discrete trades (TP / SL / timeout), transaction cost deducted, walk-forward out-of-sample, and a confidence score. With 1 strategy that score is the PSR (Probabilistic Sharpe Ratio — odds the edge is real given the sample); with 2+ it becomes the DSR, which also discounts multiple testing. To add a strategy, paste its PineScript to Claude — it gets translated into agents/custom_strategies.py.

Runs only this agent — no S&P 500 re-download — so it finishes in a few minutes. Use it after pasting a new PineScript, or whenever the full pipeline did not reach the Custom Lab step.

TierStrategyTFSourceTrades Win ratePFConfidenceOOS$10k →Return

Per-asset breakdown — top 15 tickers per strategy × TF

For each (strategy, TF), the 15 tickers where the rule trades best ranked by tier and PSR. Tier is computed per ticker with its own PSR — a rule can have a solid edge in 8 tickers and be noise in the other 500. The "Reason" column says why each ticker landed in its tier.

StrategyTFTickerTier TradesWRPFPSR Reason

Portfolio Lab — the Fundamental Law of Active Management

Grinold & Kahn: Information Ratio ≈ IC × √breadth. You don't need one genius GOLD strategy — combine many strategies with a small but genuine edge, weakly correlated, and the basket beats any of them alone. This takes the best non-rejected strategy of each ticker, re-simulates it, and combines them weighted by inverse volatility (equal risk per strategy, so a volatile name can't dominate). A basket of BRONZEs can be, together, gold-grade.

Portfolio Sharpe
PSR (edge is real)
Max drawdown
$10k →

TickerTFStrategyPremiumTierWeightSingle Sharpe

Permutation Test — is the edge real, or luck? (Aronson)

Monte-Carlo permutation test (David Aronson). For each top strategy it keeps the real price series but shuffles the entry timing — same number of entries, random bars — hundreds of times, and measures how often pure luck matches the strategy. The p-value is that fraction: p ≤ 0.05 means the entry timing has genuine skill; a high p-value means entering at random does just as well — the trigger adds nothing. An independent third lens, alongside the DSR and CPCV/PBO.

VerdictTickerTFStrategyTrades Real / tradeRandom medianp-value

Carver Forecast — continuous signals + volatility targeting

Robert Carver's framework. Instead of on/off signals, each rule (EWMAC trend at three speeds + breakout) produces a continuous forecast from −20 (strong down) to +20 (strong up). They're combined per asset, and the suggested position scales with the forecast and the inverse of volatility — equal risk per position, so a volatile name can't dominate. A parallel analysis layer: it shows what a Carver-style trend system would hold, it doesn't execute.

DirTickerForecastEWMAC 16/64 EWMAC 32/128EWMAC 64/256Breakout Ann volWeight

Horizon Champions — the best rod of each category

Every non-rejected strategy classified by its design horizon — how long it holds a trade (timeframe × exit timeout). SHORT, MEDIUM and LONG compete in separate categories, so a great short-term strategy isn't buried under the long-term ones. And since short- and long-horizon edges are weakly correlated, holding the champion of each is genuine diversification.

PineScript inbox — paste a strategy to evaluate it across the universe

Paste your PineScript code below and hit Save. The server stores it to agents/pending_pinescripts/ with a timestamp. Translation to Python is still manual: after saving, paste the same code in your chat with Claude — I'll translate it into agents/custom_strategies.py. After deploying, the Custom Lab (in the Strategy Lab Swing page) re-evaluates all custom strategies across every ticker × timeframe (incl. scalping 30m / 15m / 5m) and produces the top-15 ticker breakdown you'll see in the Per-asset table below.

Strategy Lab Scalping — 30m / 15m / 5m, net of transaction costs

Same engine as the swing Strategy Lab (trigger + filter + exit, scored on TRADES, Deflated Sharpe Ratio, walk-forward out-of-sample), but on scalping timeframes and with a mandatory transaction-cost model: every trade pays a round-trip cost (spread + slippage) before Sharpe / DSR / tiers are computed — at 5min that cost decides whether a strategy wins or loses, so a cost-free backtest would be pure fiction. Honest caveat: yfinance only keeps ~60 days of intraday data = one market regime; treat these as provisional — the forward tracker validates over time. Generate with python agents/agente_strategy_lab_scalping.py.

GOLD (operate)
-
SILVER (watch)
-
BRONZE (doubtful)
-
REJECTED (ignore)
-

TierTickerTFStrategySharpe DSROOS$10k →ReturnTradesWin rate
Read before investing. Working tool, not advice — decisions are yours. TER and ISIN vary by share class and platform: confirm them on the fund factsheet (quefondos / Morningstar) before investing. Returns are net of fees; past performance does not guarantee future results. The Spanish tax-free transfer ("traspaso") benefit applies to mutual funds, not to ETFs or ETCs.
Macro / geopolitical context (consensus of research houses, May 2026)
Fed (US)
On hold, possibly 1‑2 cuts
Toward 3.0–3.25%. End of Powell's term in May 2026 adds uncertainty.
ECB (Eurozone)
Rates on hold
Inflation projected 2.6% (2026) → 2.0% (2027); energy pressured by Middle East.
US equities
High concentration
Top 10 of the S&P 500 are >40% of the index. Demanding valuation.
Emerging markets
More favorable backdrop
Growth ~4% in 2026; more constructive environment per several houses.
Gold
~$4,521/oz
+41% year-on-year. At highs after a strong run. Only via ETC (not transfer-eligible).
Diversification takeaway
Global + tilts
US concentration is the argument not to overweight US/tech. Your call.
Transfer-eligible index funds by asset class
Class Fund Manager Index ISIN TER % Return Type Acc/Dist Platforms Transfer Notes
TER: green ≤0.12% · amber 0.12–0.25% · red >0.25%. Return shown as '26 YTD · '25 · 5y (2021-25) where available, net of fees. Type = Index vs Active.
Roboadvisors / managed platforms (reference)
Indexa Capital
Market-cap weighted
Vanguard inst. classes (Global IE00BFPM9N11, ESG EM IE00BNDQ1L38). Avg fund TER ~0.098%; total cost ~0.21–0.69%/yr.
Finizens
Maximum diversification
Blackrock/Vanguard/Amundi. Adds global small caps and a REIT index fund alongside equity/bonds.
inbestMe
More customizable
iShares (Class D) + Vanguard inst. classes; SRI/value variants. Composition by amount. From €1,000.
Openbank (Wealth)
Managed, monthly review
Committee rebalances monthly. Reference ETFs (N. America IE00B14X4M10, Japan IE00B02KXH56, EM IE00B0M63177). From €500.
Renta 4
DIY catalog
Distributes transfer-eligible Vanguard/Amundi index funds (Global, US500, European…). Compare classes/TER with MyInvestor.
MyInvestor
Widest DIY catalog
~217 index funds (Vanguard, iShares, Fidelity, Amundi, NN) with no minimum and no custody/transfer fee.
Model portfolios (examples, not advice)
Two illustrative examples with the verified funds above. Not advice: the weights are educational — adjust them to your horizon, risk tolerance and plan. The upside: because these are transfer-eligible funds, you can rebalance between them tax-free.
Portfolio A · Simple global
A single fund, maximum simplicity, zero rebalancing.
FundISIN%TER
Vanguard Global Stock Index (All Cap, incl. emerging)IE00B03HCZ61100%0.18
Weighted TER0.18%
Cheaper 2-fund variant (you rebalance): 88% iShares Developed World (IE000ZYRH0Q7, 0.06%) + 12% Vanguard Emerging Markets (IE0031786696, 0.23%) → TER ≈ 0.08%.
Portfolio B · Diversified with tilts + REITs
Reduces US/tech weight of the global index and adds real estate.
FundISIN%TER
Vanguard Global Stock Index (All Cap)IE00B03HCZ6140%0.18
Vanguard European Stock IndexIE000798770815%0.12
iShares US Equity IndexIE000N4ZYX2815%0.05
Vanguard Emerging Markets Stock IndexIE003178669610%0.23
Vanguard Japan Stock IndexIE000728603610%0.16
iShares Developed Real Estate IndexIE00B83YJG3610%0.22
Weighted TER≈ 0.16%
Fits the macro read: S&P 500 concentration (>40% in 10 stocks) is the argument not to overweight US/tech. Your call.
Note on gold and commodities
There is no transfer-eligible pure-gold index fund in Spain: direct exposure to the gold price is via an ETC (Invesco/iShares Physical Gold), which does not enjoy the tax-free transfer. Alternatives within the mutual-fund wrapper: (1) gold-miner funds (equity, more volatile, do not track the price 1:1; usually actively managed), or (2) holding gold as an ETC outside the transfer logic. Same for broad commodities. That is why here we cover equity (global/regions) and real estate (REITs), which do have transfer-eligible index funds.
Loading Alpaca paper trading data...
Cuando esta activado, oculta del Daily plan, Executor actions e Trade journal las filas que se saltaron por fuera_de_universo_alpaca o por PAUSE_NEW_TRADES. Se sigue mostrando todo lo demas (incluido ya_existe_posicion_abierta, que es informacion util).
Connection status
-
Equity
$100,000.00
P&L today
-
Buying power
$400,000.00

Sizing engine (Thorp Kelly + Carver Vol Target)

Each trade is sized via fractional Kelly using prob_win from Meta-Labeling and the TP/SL payoff ratio of the Triple Barrier (default b=2). The aggregate portfolio is then scaled to a target annual volatility (Carver). HRP redistributes between correlated assets when 2+ signals are active.

Active method
-
Kelly fraction
-
Target vol (annual)
-
Max position
-

Daily plan

Live signals today where Meta-Labeling predicted prob_win ≥ 0.55. Current mode: read_only. Two buttons below: the first only simulates, the second sends the orders to Alpaca paper.

Ticker Universe Side Regime RSI Momentum 20d Meta prob Note

Promoted strategies bridge — what's live today

For each promoted strategy (the SILVERs/GOLDs you activated with Promote), the bridge recompiles the same trigger × regime filter on the latest bar of its timeframe and checks whether the entry conditions fire today. If they do, the entry is merged into the Daily plan above so the Executor can size it and send the order. If they don't, you see exactly why not per strategy. This is the only feed of promoted-strategy signals into Alpaca paper.

Promoted strategies
-
Live entries today
-
Last bridge run
-

Intraday bridge (5m / 15m / 30m / 1h / 4h):

Tarda 10-20 min. Para automatizar promociones intraday (5m/15m/30m), configura un cron en n8n que llame a POST /api/bridge-intraday?mode=execute cada 15-30 min en horario US market (13:30-20:00 UTC L-V). El daily cron de las 12:00 UTC sigue corriendo el pipeline completo aparte.

TickerTFStrategy Live?TriggerRegime RSI 14Mom 20Last bar Why

Executor actions (history)

Table of everything the agent has decided in each execution: planned, simulated, sent, rejected or skipped. Useful as an audit.

Date Mode Ticker Side Qty Price Notional Prob Status Notes

Open positions

Cada fila lleva un boton Close que cierra solo esa posicion (sell market) sin tocar las demas. Util cuando tienes varias abiertas y quieres salir de una sin esperar al Close Monitor.

Ticker Side Quantity Entry Entry time Actual Market value P&L P&L % Action

Trade Journal — decision narrative

Every Executor decision (executed, vetoed, skipped, planned) appears here with a natural-language explanation. The verdict of the qualitative Judge shows as a tag: APPROVE (green), CAUTION (amber) or VETO (red). If Ollama is running, the narratives are written by the local model; otherwise a Python template with the relevant data.

Strictness Judge
-
Auto-approve mode
-
Approved today
-
Vetoed today
-

Close Monitor (live Triple Barrier)

For each open position, Leonex computes its take-profit (2σ), stop-loss (1σ) and timeout (5 days) at the moment of entry. This monitor compares the current price against those limits and closes automatically when one is hit. Without it, positions stay open forever.

Ticker Entry Current Return TP target SL target Days / timeout Decision

Recent Orders

Ticker Side Type Quantity Filled Avg price Status Created

Setup recordatorio (Alpaca paper en EasyPanel)

1. Cuenta gratuita en alpaca.markets → "Paper Trading" (no live).
2. API Keys → Generate: anota la Key ID y la Secret.
3. EasyPanel → app leonexEnvironment: añade ALPACA_API_KEY y ALPACA_API_SECRET (o ALPACA_SECRET_KEY; el cliente acepta cualquiera de los dos).
4. Save y redeploya el contenedor.
5. En este dashboard, pulsa Diagnose Alpaca connection y verifica veredict OK - all green. Si falla, el JSON del diagnóstico te dice exactamente qué env var falta o qué error devuelve Alpaca.

Loading data from Fundamental Agent...

Automated Fundamental Analysis

EDGAR Extraction (XBRL) y Text Analysis (LLM Ollama) a Valuation Templates. Generated by agent_fundamental.py

Ticker Original Template Status Output File
Data
Active
Scanner
Active
Anti-overfitting
Active
Risk
Active

Agents Plan

Agent Inspiration Responsibility Status
Leonex Operational Library: free books with legal links, project figures, the 5 pillars of Lopez de Prado, statistical concepts for swing trading, ranking of external sources and a 5-phase study plan. Everything you need to know to build without overfitting.

Leonex pillars

Free Books and public domain

Filtered by category. The Access column indicates whether the source is 100% legal and free, partial (preview or individual chapters) or requires purchase. For commercial books we only link to the publisher; unauthorized copies on open archives are outside Leonex's scope.

Category Title Author Access Why it matters Link
Technical Center: here you can see existing Python modules, how to run them and which module to build next. The dashboard remains read-only; real orders are excluded until paper trading.

Automation (n8n cron en EasyPanel)

Leonex corre en EasyPanel. La automatización ya NO es Windows Task Scheduler — eso pertenece a la época del PC local. Hoy los disparos del pipeline los hace n8n golpeando los endpoints HTTP del servidor (leonex_server.py) según un cron centralizado.

Daily pipeline
12:00 UTC

POST /api/refresh-async (fire-and-forget)

Intraday bridge
cada 15m (13:30-20:00 UTC)

POST /api/bridge-intraday?mode=execute durante US open

Refresh trades
on-demand

botón "Refresh trades only" del dashboard (~30s)

Drift sticky exit
3 GREEN seguidos

anti-flicker; YELLOW preserva pausa previa

Endpoints útiles del servidor

POST /api/refresh-async — pipeline diario completo POST /api/bridge-intraday?mode=execute — bridge intradía (5m/15m/30m) POST /api/refresh-trades-only — solo executor + close monitor (~30s) POST /api/promote?ticker=X&strategy=...&timeframe=... — promueve estrategia GET /api/diagnose-alpaca — diagnóstico de conexión Alpaca POST /api/close-position?ticker=X — cierra una posición concreta

El cron de n8n se configura desde el workflow editor. Si añades un endpoint nuevo, recuerda actualizar el workflow correspondiente en n8n.

Working commands

Estos KPIs reflejan los parámetros configurados en el sizing engine y el modo del executor. El estado en vivo (drawdown actual, posiciones abiertas, vol spike, concentración) está en la card Risk Monitor de la sección Paper Trading.
Max Drawdown alert
15%

Risk Monitor dispara RED si el rolling DD supera este umbral.

Vol target portfolio
20%

Volatilidad anualizada objetivo del sizing (Carver).

Kelly fraction
Half (0.50)

Half-Kelly aplicado al edge estimado por estrategia (Thorp).

Execution mode

Leído de paper_report.json (auto_approve + simulated_only).

Exposure per Class

Resumen del entorno actual y endpoints del servidor desplegado en EasyPanel. Para refrescar los datos usa los botones de la sección Paper Trading; el servidor levanta al arrancar el contenedor (no hay servidor local manual).

How Leonex works — the data flow

From raw market data to a paper trade, and the research labs that run alongside. Everything is rebuilt by the pipeline; each box below is an agent.

MARKET DATA yfinance — ~500 S&P 500 tickers daily + 1h/4h + 30m/15m/5m intraday → SQLite (prices, prices_intraday) DAILY TRADING PIPELINE → paper order Regime Signals Triple Barrier Causal Meta-Label Validation Executor trend · range entry events label TP/SL/time real vs spurious ML: take it? + CPCV · PBO → Alpaca paper RESEARCH LABS · run alongside, read the same data Strategy Lab — Swing 1d / 4h / 1h · scored by Deflated Sharpe Strategy Lab — Scalping 30m / 15m / 5m · net of transaction cost Carver continuous forecasts + volatility targeting Portfolio Lab combine strategies (Grinold-Kahn) Permutation Test edge real or luck (Aronson) Custom Lab translated PineScript strategies Strategy Tracker forward paper test (true out-of-sample) MONITORING & HEALTH Data Coverage is the daily data complete? Drift Monitor has the edge decayed? Risk Monitor drawdown · leverage · vol spikes

Green = the core daily pipeline that ends in a paper order. Purple/blue = research labs that score and combine strategies. Amber = health checks. The labs and monitors never block the pipeline — they inform your decisions.

What each page does

PageWhat it shows / what it's for
OverviewCommand center: tracked assets, top candidates, and the Data Coverage panel — your daily check that the data loaded fully.
ChartsNormalized price evolution (base 100) to compare momentum, volatility and rotation across assets.
ScannerTactical ranking of the universe to spot opportunities before they reach the validation pipeline.
RegimeMarket regime per asset — trend vs range, from ADX/ATR/moving averages. Tells you when the environment is wrong for a strategy.
SignalsThe core trading pipeline: adaptive signals, Triple Barrier labels, the Causal graph, Meta-Labeling (ML), Validation and CPCV/PBO.
Strategy Lab — SwingBest swing strategies per asset (1d/4h/1h), plus the Portfolio Lab, Permutation Test, Carver forecasts, Custom strategies and the forward Tracker.
Strategy Lab — ScalpingScalping strategies on 30m/15m/5m, net of transaction cost, with the "BRONZE one step from SILVER" view.
Paper TradingAlpaca paper connection (risk-free): the daily plan filtered by Meta-Labeling, position sizing, and the trade journal.
FundamentalsFundamental valuation from financial data (module under construction).
FundsIndex-fund layer — a tax-efficient way to rotate exposure.
AgentsThe AI agents that make up the system and their operational role.
LibraryReference material — key authors and an applied study plan.
CodeScripts, commands and upcoming modules.
RiskRisk limits, drawdown, sizing and the Risk Monitor — system survival.
LogsTechnical status and the commands to feed the dashboard.
GuideThis page — the data-flow infographic and the glossary.

Glossary

The terms that show up across Leonex, in plain language.

TermMeaning
Sharpe ratioReturn per unit of risk (volatility). Higher = better risk-adjusted return.
PSR — Probabilistic Sharpe RatioProbability the true Sharpe is genuinely above 0, given the sample size and non-normal returns. Used when there is a single strategy.
DSR — Deflated Sharpe RatioPSR after discounting multiple testing: if you tried hundreds of strategies, the best looks great by luck. DSR deflates that. The anti-overfitting backbone (López de Prado).
Triple BarrierEach entry opens a trade closed by one of three barriers: take-profit, stop-loss, or a time limit. Turns signals into discrete, scoreable trades.
Walk-forward / OOSOut-of-sample testing: evaluate the strategy on data it was never fitted on. An edge that only works in-sample is overfitting.
CPCVCombinatorial Purged Cross-Validation — many train/test splits to stress-test a strategy against luck.
PBOProbability of Backtest Overfitting — the odds the backtest's winner is a fluke.
Tier — GOLD / SILVER / BRONZE / REJECTEDQuality grade of a strategy from its DSR, trade count and profit factor. GOLD = high confidence; BRONZE = positive edge but not high-confidence; REJECTED = no edge.
TriggerThe entry event — RSI oversold, MACD cross, volume-confirmed breakout, etc.
Regime filterA context mask: only allow the entry when the market regime fits (strong uptrend, range-bound, pullback…). A breakout in a trend is not the same trade as a breakout in a range.
Exit configThe take-profit / stop-loss / timeout settings that close a trade.
RegimeThe market environment — trend vs range — measured with ADX, ATR and moving averages.
Meta-LabelingA secondary ML model that decides whether to actually take each trade the primary signal flagged (López de Prado).
HRP — Hierarchical Risk ParitySizing a portfolio by risk contribution and correlation structure instead of by raw capital.
Kelly criterionThe bet size that maximises long-term compounded growth (Thorp).
Transaction costCommission + spread + slippage subtracted from every trade. Modelled on Interactive Brokers Pro (~0.03% round-trip on liquid names).
Profit factorGross wins ÷ gross losses. Above 1 means profitable overall.
ExpectancyThe average return per trade.
Max drawdownThe worst peak-to-trough fall of the equity curve.
Permutation test / p-valueShuffle the entry timing at random hundreds of times; the p-value is how often pure luck matches the strategy. p ≤ 0.05 = genuine timing skill (Aronson).
EWMACExponentially Weighted Moving Average Crossover — Carver's trend-following rule.
Forecast (Carver)A continuous signal from −20 (strong down) to +20 (strong up). The strength matters, not just on/off.
Volatility targetingSizing each position so it contributes equal risk — a volatile asset gets a smaller position.
Breadth / Fundamental LawGrinold & Kahn: Information Ratio ≈ skill × √breadth. Many small, independent, weakly-positive bets beat one big one.
Return premium (Ilmanen)The economic reason a strategy earns money — momentum, mean-reversion, reversal. No clear premium = more likely a data-mining fluke.
Forward trackingTesting a promoted strategy on brand-new data going forward — the truest out-of-sample test.
DriftWhen a strategy's edge decays because the market regime changed.