Top Performer Scanner
Discover which stocks were the real market leaders each year, based on actual returns within the most liquid universe — not the mega-cap names everyone already knows.
When to use
- - "Which stocks performed best in 2024?"
- "Find the top returning stocks by year"
- "Show me the true market leaders without survivorship bias"
- "Would my strategy's filters have caught the explosive movers?"
- When building or validating a stock selection filter
What it does
Step 1: Get True Top 500 (get_true_top_500.py)
CODEBLOCK0
- 1. Downloads the complete list of US-traded symbols from the NASDAQ FTP directory
- Filters out ETFs and test issues
- Downloads 2019-2026 historical price data via Yahoo Finance (batch download)
- For each year, calculates average daily dollar volume to find the Top 500 most liquid stocks
- Computes annual returns for these 500 stocks
- Outputs the Top 15 performers per year with returns and volume data
Why this matters: Most "top performer" lists suffer from survivorship bias (they only look at stocks that still exist today) or selection bias (they only check well-known names). This script starts from the full NASDAQ directory and filters dynamically per year.
Output: INLINECODE1
CODEBLOCK1
Step 2: Feasibility Analysis (analyze_feasibility.py)
CODEBLOCK2
Tests multiple stock scanning configurations against the discovered top performers:
- - Would your filter have caught APP before its 745% run?
- How many trading days would each filter trigger on these explosive names?
- Compare tight (Top 500 volume) vs broad (Top 1000 volume) universe thresholds
This prevents building an "air-tight fortress" filter that accidentally excludes every future multibagger.
Example Output
CODEBLOCK3
Use Cases
- 1. Strategy Validation: Check if your selection filter would have caught the big movers
- Universe Design: Determine the right liquidity threshold (Top 500 vs 1000 vs 2000)
- Backtesting Reality Check: Ensure your backtest universe includes the explosive names
- Research: Study what top performers have in common (sector, cap size, volume patterns)
Filters Applied
- - Only common stocks (no ETFs, no test issues)
- Ticker length <= 4 characters, alphabetic only (excludes warrants, units, etc.)
- Start price >= $5 (excludes penny stocks)
- Liquidity ranked by average daily dollar volume per year
Dependencies
CODEBLOCK4
Internet access required for NASDAQ FTP and Yahoo Finance data.
Rules
- - Internet access is required. This skill downloads data from NASDAQ FTP (
ftp://ftp.nasdaqtrader.com) and Yahoo Finance. It will not work in offline or air-gapped environments. - Do not use results to make real trading decisions without independent verification. This tool identifies historical top performers — past performance does not predict future returns.
- The liquidity filter (Top N by dollar volume) is applied per-year, not across the entire period. A stock in the Top 500 in 2024 may not have been in the Top 500 in 2023. This is intentional to avoid survivorship bias.
- Penny stocks (start price < $5) are excluded by default. This prevents extreme percentage returns from low-priced stocks from dominating the rankings. Adjust
--min-price only if you understand the implications. - Yahoo Finance data may have gaps or adjusted prices. Cross-reference critical findings with a second data source before building strategy logic around specific stocks.
顶尖表现者扫描器
基于最具流动性股票池的实际回报,发现每年真正的市场领导者——而非那些众所周知的超大盘股。
使用场景
- - 2024年哪些股票表现最好?
- 按年份查找回报最高的股票
- 展示没有幸存者偏差的真正市场领导者
- 我的策略筛选条件能否捕捉到爆发性上涨的股票?
- 在构建或验证选股筛选条件时
功能说明
第一步:获取真正的Top 500(gettruetop_500.py)
bash
python3 gettruetop_500.py
- 1. 从纳斯达克FTP目录下载完整的美国交易代码列表
- 过滤掉ETF和测试股票
- 通过雅虎财经下载2019-2026年历史价格数据(批量下载)
- 每年计算日均成交额,找出流动性最强的Top 500只股票
- 计算这500只股票的年化回报率
- 输出每年表现最佳的Top 15只股票及其回报率和成交量数据
为何重要:大多数最佳表现者榜单都存在幸存者偏差(只关注至今仍存在的股票)或选择偏差(只检查知名股票)。本脚本从完整的纳斯达克目录出发,每年动态筛选。
输出:nasdaqtop500performers.csv
year, rank, ticker, return, avgdailyvol_m
2024, 1, APP, 7.45, 892
2024, 2, MSTR, 5.12, 2340
...
第二步:可行性分析(analyze_feasibility.py)
bash
python3 analyze_feasibility.py
针对发现的最佳表现者测试多种股票扫描配置:
- - 你的筛选条件能否在APP上涨745%之前捕捉到它?
- 每个筛选条件在这些爆发性股票上会触发多少个交易日?
- 比较严格(Top 500成交量)与宽松(Top 1000成交量)的股票池阈值
这可以防止构建一个铜墙铁壁式的筛选条件,却意外排除了所有未来的十倍股。
示例输出
================ 2024年最佳表现Top 15(纳斯达克流动性Top 500)================
1. APP : 745.1%(日均成交额:8.92亿美元)
2. MSTR : 512.3%(日均成交额:23.4亿美元)
3. PLTR : 340.8%(日均成交额:15.67亿美元)
4. CVNA : 284.2%(日均成交额:4.45亿美元)
...
使用场景
- 1. 策略验证:检查你的选股筛选条件是否能捕捉到大涨股票
- 股票池设计:确定合适的流动性阈值(Top 500 vs 1000 vs 2000)
- 回测真实性检查:确保你的回测股票池包含爆发性股票
- 研究分析:研究最佳表现者的共同特征(行业、市值规模、成交量模式)
应用筛选条件
- - 仅限普通股(无ETF,无测试股票)
- 交易代码长度<=4个字符,仅限字母(排除权证、单位股等)
- 起始价格>=5美元(排除仙股)
- 按每年日均成交额排名流动性
依赖项
bash
pip3 install pandas yfinance
需要互联网访问纳斯达克FTP和雅虎财经数据。
规则
- - 需要互联网访问。 本技能从纳斯达克FTP(ftp://ftp.nasdaqtrader.com)和雅虎财经下载数据。在离线或隔离环境中无法运行。
- 未经独立验证,请勿使用结果做出真实交易决策。 本工具识别历史最佳表现者——过去的表现不能预测未来回报。
- 流动性筛选(按成交额Top N)按年应用,而非整个期间。2024年在Top 500的股票可能在2023年不在Top 500中。这是有意为之,以避免幸存者偏差。
- 默认排除仙股(起始价格<5美元)。 这可以防止低价股票的极端百分比回报主导排名。只有在理解其影响时才调整--min-price参数。
- 雅虎财经数据可能存在缺口或调整价格。 在围绕特定股票构建策略逻辑之前,请使用第二个数据源交叉验证关键发现。