Jacob McCarthy

From market data to a live dashboard.

Noise to Action began with a Python script that batch-looped the same constrained portfolio prompt through two models. I engineered those responses into fixed portfolios, then built an automated pipeline that pulls new market closes, calculates the results, generates fresh commentary, and publishes it all to a live dashboard.

Noise to Action dashboard showing a portfolio leaderboard, selected portfolio metrics, benchmark trend, and ticker-level returns.
The live dashboard · results are interim through January 2027

One answer was never enough.

A single model answer is a poor test. I sampled GPT-4o and Gemini 2.0 at three depths, then aggregated ticker frequency and proposed weight to make six comparable portfolios. That construction was a data engineering project on its own. Once the holdings were fixed, I built the recurring system that keeps prices, calculations, and interpretations current.

10 / 50 / 100responses per model
6 + 2model portfolios + random controls
SPY + DIAmarket benchmarks

It started with a script. Now it runs as a system.

I batch-looped one prompt through two models.

I wrote a Python script that looped the exact same constrained stock-picking prompt in batches through GPT-4o and Gemini 2.0: 10, 50, and 100 runs per model. The script collected those response sets for the ticker and weight aggregation that produced the portfolios.

One fixed promptPython batch loopsResponse sets

The prompt asked for five US-listed securities and an even split of a $1,000 budget.

Then I had to turn messy answers into actual portfolios.

The responses were not the portfolios. I consolidated each model-and-sample group by ticker frequency and accumulated proposed weight, then resolved that evidence into one fixed five-holding portfolio. Six model portfolios came out of that process; two independent Python-random portfolios became controls.

Raw responsesFrequency + weight aggregationSix model portfolios

This one-time construction is separate from the live market refresh. Holdings do not rebalance as prices move.

A scheduled Python job pulls the market into the experiment.

The recurring pipeline requests daily closing-price histories for every holding and for SPY and DIA. It turns yfinance's different response shapes into one date-and-ticker table, coerces prices to numbers, checks required columns, and retries symbols missing from the bulk download.

Yahoo Finance closesNormalize + validateRetry missing tickers

The job uses the latest available market close; the browser does not call Yahoo Finance.

The math is deterministic, all the way down to each holding.

Python divides each original dollar allocation by its first valid inception close to fix the share count. It joins those shares to daily prices, values each position, sums portfolio histories, and calculates returns, rankings, benchmark comparisons, and holding-level drivers. Incomplete latest price rows are held back so they do not distort the comparison.

Allocation ÷ inception close = sharesShares × daily close = valueValues → returns + rankings

These computed figures are the source of truth. No language model performs the portfolio math.

The explanation updates when the numbers do.

Once Python has built a structured metrics snapshot, GPT-4o mini interprets it in plain language for the dashboard. The response is normalized into a saved insight record. If the model call or API key fails, the pipeline can still provide a deterministic summary from those same metrics.

Computed metricsGPT-4o mini commentarySaved insight record

The commentary can change with each refresh; the underlying returns do not depend on it.

Everything lands in a dashboard that keeps updating.

A GitHub Actions job checks the US market window, runs the Python refresh on eligible two-hour intervals, and exports histories, holdings, metrics, and the latest insight into one JSON artifact. Committing that artifact can trigger a Vercel deployment. The Next.js dashboard reads the latest published snapshot and lets visitors trace a rank back to its benchmark path and individual holdings.

Scheduled Python refreshDashboard JSONNext.js on Vercel

Market and LLM credentials stay in the job, outside the visitor's browser.

See the result. Follow the evidence.

Noise to Action dashboard preview with portfolio leaderboard, selected portfolio, benchmark trend, and holdings.
Dashboard preview · the live version refreshes as the experiment runs

See the field.

Scan all model portfolios, random controls, and benchmarks before picking a result to investigate.

Follow the evidence.

Compare a portfolio’s path with a benchmark, then inspect the holdings behind its return.

Read the interpretation.

The insight layer puts the latest computed movement into plain language without becoming the source of truth.

What runs where.

Python owns the data.

data_loader.py gets and repairs close histories. calculations.py builds the price, return, benchmark, and holdings datasets. insights.py turns a computed metrics payload into commentary.

Actions owns the refresh.

The scheduled workflow runs the insight and export jobs during eligible market hours. It commits the updated dashboard.json artifact, which can trigger a fresh Vercel build.

The browser owns exploration.

Next.js fetches the published JSON without caching, then handles portfolio selection, benchmark switching, charts, and holdings drilldowns. It receives no market or OpenAI credentials.

Live now. Still collecting evidence.

The dashboard is hosted and updating while the year-long experiment runs. The pipeline does the financial work; the LLM helps explain it. The final comparison comes in January 2027.

Explore the live projectSee another project