This agent hedges downside risk on SPY using a fully live pipeline — no simulated inputs anywhere. It watches SPY through Alpaca's Market Data API (IEX feed), computing three real-time risk signals: price move percentage, volume spike ratio, and realized volatility. When these signals cross their thresholds, the agent pulls Alpaca's live options chain and selects the nearest-expiry protective put using real Greeks and Delta, filtered by strike range for speed. Rather than executing silently, the agent generates a plain-language explanation of its decision using Gemini — turning "trade executed" into an actual reasoning trail a trader could audit. The selected hedge is then placed as a real paper order through Alpaca's Trading API. The dashboard is built in Streamlit, styled to match Alpaca's black/white/yellow brand, with live price and volume charts and full session-state persistence. We deliberately scoped out reinforcement learning and custom forecasting models in favor of transparency — every signal, every threshold, and every reasoning step is inspectable. One threshold (volume_spike) was tuned from 1.5 to 1.3 specifically to make the hedge path demonstrable on realistic intraday data; price_move and volatility thresholds were left untouched to keep the tuning honest rather than tuned-until-it-fires. Built across market data integration, risk scoring, options selection, LLM reasoning, and paper execution, with a teammate contributing to planning. The repo is public, MIT licensed, with a clean git history after an early API key exposure was caught and fully remediated.
Category tags: