Skip to content

n4vx/SP1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SP1 — Full Port the #1

What if you always held the largest US company by market cap?

Simple strategy: own whichever company is #1 by market cap. When leadership changes, switch at the next open. That's it.

Backtest Results

Results (2012 - Present)

Metric #1 Market Cap S&P 500
CAGR 17.6% 14.2%
Outperformance +3.4%/yr

The strategy has held AAPL, MSFT, XOM, and NVDA over the backtest period, with only ~15 switches in 13+ years.

What's Inside

backtest.py — Python backtest using Yahoo Finance data. Tracks historical #1 transitions (Apple, Microsoft, Exxon, NVIDIA), simulates the switching strategy, and compares against SPY. Outputs stats + chart.

Live Dashboard — Next.js app showing the current #1 company, the gap to #2, and a live top-5 leaderboard. Minimal dark UI, deployed on Vercel.

Run the Backtest

pip install yfinance pandas numpy matplotlib
python backtest.py

Disclaimer

This is a research project, not financial advice. Past performance does not guarantee future results.

About

Full port the #1 US company by market cap. Backtested against S&P 500 since 2012 — Python backtest + live Next.js dashboard.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors