← Back to Projects

Case Study

Generative AI in Stock Portfolio Management

URECA paper testing Perplexity-built S&P 500 portfolios. The high-risk book returned 31.5% over three months, but the edge came from sector tilts, not stock-picking.

Executive Summary

Co-authored URECA paper (Jain, Shah, Lee, Ha; supervisor Dr. Danling Jiang) testing whether prompt-engineered LLMs can build equity portfolios that reflect different investor risk preferences. Using the Perplexity API on WRDS Compustat data, we generated three portfolio types: High Risk, Low Risk, and No Risk Specification.

Problem & Constraints

Can a system trained on text meaningfully contribute to portfolio construction? The study stays inside the S&P 500 with dynamic index membership, no look-ahead bias, and a full audit trail of prompts and outputs.

Architecture

WRDS SQL extraction → Perplexity API prompt engineering (3 risk profiles) → Portfolio Validation & Cleaning → Return Computation & Rebalancing → Performance metrics vs SPY benchmark.

Methodology

  • Extracted adjusted prices and S&P 500 membership from Compustat via WRDS SQL
  • Prompted Perplexity for 25-stock portfolios with JSON output (high/low/no-risk specifications)
  • Validated tickers against index membership, renormalized weights, handled missing prices conservatively
  • Evaluated Apr 30 - Aug 6, 2025 with cumulative returns, Sharpe, beta, drawdowns, sector allocation

Results & Metrics

StrategyTotal ReturnSharpeBeta vs SPY
High Risk31.53%7.545-0.267
Low Risk3.87%4.795-0.138
No Risk Spec20.88%5.5400.817
SPY (benchmark)2.97-8.30%-1.000

High-risk portfolios concentrated in Tech. Returns traced to sector and style exposures, not persistent stock-selection alpha.

Tech Stack

Python, SQL, WRDS/Compustat, Perplexity API, pandas, matplotlib

Future Work

Longer evaluation horizons, transaction cost modeling, hybrid LLM + quantitative risk control systems.

Links