Skip to content

S&P 500 StockPicker

A unified valuation framework that analyzes all 503 S&P 500 companies using three complementary models — DCF, Earnings Power Value, and Asset Valuation — combined with a quality scoring system.

View live dashboard

The Framework

Most stock screeners use a single valuation method. This framework triangulates three independent approaches and overlays a quality filter — if a stock looks cheap on all three models and scores high on quality, it's a stronger signal.

DCF Valuation

3-scenario discounted cash flow with bear/base/bull cases and probability weighting.

EPV Analysis

Earnings Power Value — what the business is worth at current earnings, no growth assumed.

Asset Valuation

Net asset value with sector-specific adjustments for tangible and intangible assets.

Quality Scoring

Revenue quality, capital allocation, management effectiveness — weighted composite score.

Architecture

01

Data Layer

Python + yfinance

Pulls financials, price history, and fundamentals for all S&P 500 companies. Batch processing with error handling for bankrupt/delisted tickers.

02

Analysis Engine

Python (unified_framework.py)

Runs DCF, EPV, and asset valuation models. Computes quality scores. Generates ratings (Strong Buy → Sell) with entry points.

03

Data Store

JSON (stock_data.json)

503 stocks with pre-computed valuations, ratings, and metrics. Loaded at build time — zero API calls from the frontend.

04

Frontend

Next.js + React

Sortable, filterable table with sector/rating dropdowns, search, and CSV export. Sticky headers, mobile-responsive.

How AI Built It

01

Framework Design

Described the valuation approach in plain language: "merge conservative value investing with quality assessment." AI generated the mathematical models and Python implementation.

02

Data Pipeline

Prompted: "analyze all S&P 500 stocks using this framework." AI built the batch processing script, handled API rate limits, edge cases (bankrupt companies, missing data), and output formatting.

03

Frontend Table

Iterated on sorting logic, filter UX, and mobile layout through conversation. Fixed rating sort order (Strong Buy > Buy > Hold > Sell) and numeric column defaults through prompt refinement.

04

Quality Assurance

AI identified 135 fake placeholder stocks in the dataset, flagged SBNY as bankrupt, and floored negative intrinsic values to $0. Caught issues a manual review would miss.

Results

503

Stocks Analyzed

3

Valuation Models

11

Sectors Covered

0

Manual Calculations

What's Next

  • Backtesting engine — validate the framework against 10 years of historical data
  • Automated weekly refresh — cron job to keep all 503 valuations current
  • Portfolio builder — construct and track model portfolios based on framework ratings