Back to Portfolio

LLM Advisor

An autonomous trading system that combines STDEV mean-reversion signals with Gemini market-analysis overlays and strict execution risk controls.

PythonGemini APIAlpacaPandasBacktesting
USER: Analyze SPY sentiment
AGENT: Volatility high. Reducing position size.

Ask the Data

This assistant answers from LLM Advisor documentation and Supabase telemetry. Ask about run health, risk controls, signal flow, or how live metrics relate to the write-ups on this page.

LLM Advisor Chat

Assistant: project docs plus live telemetry for run health, risk controls, and trading loop behavior.

Ask about the LLM Advisor workflow, telemetry, risk controls, or how signals map to actions. I use docs and Supabase metrics.

Key Performance Indicators

Agentic Workflow

1. Sentiment Analysis

Every 15 minutes (runtime default), the loop runs market analysis with Gemini 3 Flash. It returns threshold multipliers and confidence signals that adjust technical gates without bypassing hard risk limits.

2. Statistical Execution

The execution engine computes rolling mu/sigma/z-score states and evaluates MR/TC setups against configured thresholds before sending bracketed orders through Alpaca.

Live Monitoring Dashboard

This dashboard is fed by the telemetry API. Production serves Supabase telemetry only, while local file fallback is reserved for non-production debugging.

Data source: No telemetry
Telemetry as-of: N/A
Last generated: N/A
Anchor date: N/A
Loading telemetry...
Coverage window: 0 run day(s)
Trades indexed: 0
Order events indexed: 0
Runtime loops seen: N/A
Feed mode: Unknown
Last Price Update

N/A

N/A

P/L Windows

N/A (7d)

1d: N/A | 30d: N/A

Recent Trades

0

Count in last 7 days of sample window.

Success Rate

N/A

0 trades available.

Risk/Reward

N/A

Avg win: N/A | Avg loss: N/A

Agent State

NO FEED

Loop: N/A | Symbols: N/A

Signal Flow

0

Rejected: 0 | Parser errors: 0

Order Attempts

0

Filled: 0 | Failed: 0

Recent Trades

No trades found in telemetry yet.

Recent Execution Events

No signal or order lifecycle events found yet.

Model Visuals

Feature-importance plots from current training artifacts.

SPY feature importances

SPY feature importance

QQQ feature importances

QQQ feature importance

IWM feature importances

IWM feature importance

Automated Risk Manager

The runtime configuration enforces strict limits before execution: bounded risk per trade, minimum reward/risk, fixed session windows, and end-of-day flattening.

src/core/config.py + config/thresholds.py
# Runtime defaults (overridable via env)
max_risk_per_trade_percent = 1.0
min_risk_reward_ratio = 1.5
trading_window_start = "09:30"
trading_window_end = "12:00"
end_of_day_close_time = "15:50"

# Base STDEV thresholds
mr_arm_z = 1.2
mr_trigger_z = 0.6
tc_arm_z = 1.8
tc_trigger_z = 0.6
atr_multiplier_sl = 1.4
atr_percentile_cap = 85.0

Notebook Analyses

Week-2 notebook work is now scaffolded to publish reproducible analysis artifacts for this project.

Offline simulation snapshot

Versioned JSON under public/data/llm_advisor_backtest_snapshot.json — reproducible headline stats for portfolio / LinkedIn, with explicit limitations (technical replay only; no LLM overlay in this batch).

Data Caveat

Metrics shown here are evidence-backed but mixed-source. If the feed mode is Backtest stream, P/L and win-rate reflect historical simulation artifacts; if it is Live stream, values come from persisted runtime telemetry. Deep-dive claims are restricted to what is currently materialized in those sources.