About QuantMyStocks
QuantMyStocks publishes a weekly momentum leaderboard for the four major US equity indices — S&P 500, S&P 400 (Mid-Cap), S&P 600 (Small-Cap) and NASDAQ-100 — and lets users backtest momentum strategies against decades of historical data, or automate them with a connected broker. All content is educational; nothing on the site is investment advice or a personalized recommendation.
How the momentum ranking works
Each Sunday the pipeline computes, for every stock in each index universe, a risk-adjusted relative-strength score: roughly, its multi-window price change normalised by its rolling volatility and the index's own volatility. Scores are then ranked within each index, and the leaderboard exposes the top names. Two important properties:
- Rankings are weekly, computed on Sunday from Friday's close.
- The score is relative — a stock can climb the ranks even in a falling market, because everyone fell less.
- It's risk-adjusted — a noisy 20% mover and a steady 10% mover can rank similarly.
- It is purely a past-performance signal. Momentum is a known factor (Jegadeesh & Titman, 1993; Asness, Moskowitz, Pedersen, 2013) but factor returns are not guaranteed, can decay, and can suffer sharp drawdowns.
What the blog covers
The QuantMyStocks Blog is auto-drafted from the same data the leaderboard runs on, then reviewed by an editor before going live. Posts fall into four categories:
- Happening this week — upcoming earnings for current leaders + announced index composition changes (pinned at the top of the blog).
- Weekly movers — a Sunday recap of the rank changes and biggest week-over-week moves by index.
- Large moves — focused dispatches when a current leader has a notable single-day move.
- Index recomposition — when S&P or NASDAQ adds/removes a constituent.
Data sources
Price history is sourced from Yahoo Finance via the publicyfinancelibrary; index constituents are scraped from the canonical Wikipedia pages on each index. The pipeline runs daily on a small DigitalOcean droplet and the rankings themselves are deterministic for a given (date, index) — re-running the same week on the same data produces the same output.
Important — what this is not
QuantMyStocks does not give buy/sell recommendations, price targets, or personalised advice. Past performance does not guarantee future results. Backtested returns are hypothetical and do not reflect trading costs, taxes, or slippage in the way live trading does. Trading stocks involves risk, including the loss of principal. See the full Disclaimer & Risk Disclosure for details.
Frequently asked questions
Can I run QuantMyStocks on Alpaca, Webull, or Tradier?
Yes. The trading bot is open-source and you self-host it on your own GitHub Actions, Docker, or cloud-VM deployment. You fork the qms-trading-bot repository, add your broker API keys (Alpaca, Webull, or Tradier) and a leaderboard token from QuantMyStocks to your fork's GitHub Actions secrets, and enable the workflow. Paper-trading mode is supported on Alpaca for testing without real capital at risk. Multiple index universes (S&P 500 / 400 / 600 / NASDAQ-100) can be traded simultaneously with independent capital allocations.
Where do my broker API keys live? Does QuantMyStocks store them?
No. Your broker API keys live in your own GitHub repository's Actions secrets (or your .env file if you self-host locally, or your cloud provider's secret manager if you deploy to AWS/GCP/Azure). The bot reads them at execution time inside your infrastructure. QuantMyStocks only hosts the public momentum-leaderboard API the bot calls; the broker connection is entirely between your deployment and your broker.
How often does the portfolio rebalance?
The default cadence is a weekly rebalance triggered Monday 09:30–10:00 ET, aligned to the US market open and the prior Sunday momentum-ranking refresh. This matches the standard cross-sectional momentum implementation and avoids overtrading the noise inside a week. The schedule is a cron expression in your fork's workflow file, so less-frequent or more-frequent cadences are a one-line change.
How is this different from Composer or Quantconnect?
Composer is a SaaS strategy-builder that executes in its own in-house brokerage; QuantConnect is a hosted code-first platform you write Python or C# strategies on. QuantMyStocks publishes the strategy and the bot as open-source code: you self-host the bot, your capital and broker connection stay where they are (Alpaca / Webull / Tradier), and there's no QMS-side execution layer. QMS is more focused (momentum only, weekly), more transparent (the code and the rankings are public), and keeps your credentials on your infrastructure.
Is no-code algorithmic trading realistic for retail investors?
The strategy is no-code — you don't write or maintain Python. The deployment is low-code: forking a GitHub repo and pasting environment variables into Actions secrets. Modern broker APIs (Alpaca, Webull, Tradier) make order routing programmable, and a momentum rebalance is a small enough state machine — read leaderboard, diff against current holdings, place orders — that running it safely doesn't require bespoke code. The real risks for retail are behavioural: turning the bot off after a drawdown, over-leveraging, or running too many strategies at once.
Does momentum investing work in down markets?
Momentum is a relative signal, so it produces a leaderboard even in a bear market — the ranked names are simply the ones falling least. Empirically, the momentum factor has positive long-run premia (Jegadeesh & Titman 1993; Asness, Moskowitz & Pedersen 2013) but suffers sharp "momentum crashes" at sentiment turning points. The standard mitigations are diversification across index universes, a moderate cash sleeve, and a slower rebalance cadence — all configurable on the platform.
Where does the price and ranking data come from?
Daily stock and index prices are sourced from Yahoo Finance via the yfinance Python library. Index constituents (S&P 500 / 400 / 600 and NASDAQ-100) are scraped from the canonical Wikipedia pages on each index. The momentum pipeline is deterministic for a given (date, index): the same input produces the same leaderboard, so the rankings can be independently re-derived.
Contact
Questions, corrections, or partnership inquiries: use the contact form.