## TL;DR
AI has become the central technology in quantitative finance -- from reinforcement learning agents that discover optimal trading strategies to NLP models that extract sentiment from earnings calls in milliseconds. While hedge funds closely guard their AI systems, the underlying techniques (deep RL, alternative data analysis, transformer-based time series models) are transforming how financial markets operate.

## Core Explanation
Algorithmic trading AI stack: (1) Alpha generation -- predict future price movements using ML on market data (price/volume), fundamental data (financial statements), and alternative data (satellite, sentiment, web); (2) Portfolio optimization -- allocate capital across assets to maximize risk-adjusted return (Markowitz mean-variance with ML-estimated covariance, or end-to-end RL); (3) Order execution -- minimize market impact when trading large orders (RL learns to split orders optimally to avoid moving the price); (4) Risk management -- Value-at-Risk (VaR) prediction, tail risk modeling, and real-time position monitoring.

## Detailed Analysis
Deep RL for trading: the MDP formulation -- state (price history, technical indicators, portfolio positions, market regime), action (buy/sell/hold with quantity, or continuous allocation weights), reward (daily PnL, Sharpe ratio, or risk-adjusted return). Key challenges: (1) Non-stationarity -- market dynamics change, model must adapt; (2) Low signal-to-noise ratio -- price movements are largely random, overfitting to noise is the primary failure mode; (3) Transaction costs -- must model commissions, slippage, and market impact; (4) Regime changes -- bull market strategy fails in bear markets, AI must detect regime shifts. Alternative data revolution: satellite imagery of Walmart parking lots (predicted quarterly earnings 2 weeks before announcement, 2015 landmark study by RS Metrics). NLP on earnings call transcripts -- detect linguistic cues (CEO hesitation, word choice, tone) correlated with future performance. Credit card transaction data -- estimated company revenue before quarterly reports. Sentiment analysis of social media (StockTwits, Reddit r/wallstreetbets) -- NLP models quantify retail investor sentiment as a trading signal. The AI arms race in finance means that as more firms deploy similar techniques, alpha decays -- the edge shifts from model architecture to data quality and execution speed. Practical considerations: backtesting overfitting (the "defunct strategy" problem -- a strategy that looks great in backtest fails in production because 10,000 strategies were tested and the best one was cherry-picked), paper trading vs. live trading gap (market impact not captured in simulation), and regulatory compliance (SEC and ESMA algorithmic trading regulations requiring kill switches and pre-trade risk checks).