Dhruv.Contact
Back home

CNN Stock Screener

Abstract

A batch US equity screener that fuses CNN Markets and Finviz analyst forecasts into a proprietary ASR (Analyst Synthesis Rating), then emits a score-weighted portfolio — a fast Python CLI for quantitative screening workflows.

Highlights

  • Batch US equity scan comparing CNN Markets and Finviz analyst forecasts
  • Proprietary ASR (Analyst Synthesis Rating) scoring per ticker
  • Outputs score-weighted portfolio recommendations via Python CLI
PythonCLIFinvizQuantitative FinanceStock Screener

Multi-Source Analyst Stock Screener

Batch scanner for US equities comparing CNN Markets and Finviz analyst forecasts, scoring each stock with a proprietary ASR (Analyst Synthesis Rating), and outputting a score-weighted portfolio.

Stack

  • Python 3.10+ (stdlib + optional tqdm)
  • CNN — 1Y price targets + analyst rating counts
  • Finviz — consensus target price + recommendation (1=Strong Buy … 5=Sell)
  • NASDAQ symbol directories (~5.4k common stocks)

Usage

python3 run_screener.py
python3 run_lightweight.py          # rescore from cache
python3 run_screener.py --from-cache
python3 run_screener.py --min-analysts 15 --min-asr 70 --min-agreement 70

ASR Rating (proprietary, 0–100)

ComponentWeightSource
Upside30 ptsCNN + Finviz consensus, 6M scaled
Risk20 ptsCNN low-target floor, target spread
Coverage15 ptsCNN analyst count
Consensus20 ptsCNN vs Finviz agreement
Sentiment15 ptsCNN buy % + Finviz recommendation

Grades: A+ (90+) → F (<45). Labels: Strong Buy, Buy, Moderate Buy, Hold/Watch, Weak, Avoid.

Filters (defaults)

ParamDefault
Min CNN analysts15
Min ASR score65
Min source agreement60%
Min 1Y median upside15%
Max 1Y median upside80%
Max low-target downside15%

When both CNN and Finviz data exist, stocks must show bullish consensus and sufficient agreement.

Pipeline

  1. Load ticker universe
  2. Fetch CNN forecast + ratings, Finviz target/recommendation (cached)
  3. Build cross-source consensus
  4. Compute ASR score, filter, rank
  5. Allocate $ budget across top picks

Output

output/
  portfolio_report.html
  latest_scan.json
  forecast_cache.json
  sheets/01_scan_summary.csv
  sheets/02_portfolio_buys.csv
  sheets/03_top_picks_all.csv

Layout

screener/
  cnn.py         CNN forecast + ratings
  finviz.py      Finviz analyst data
  consensus.py   cross-source comparison
  rating.py      ASR proprietary score
  scoring.py     filter + rank
  scanner.py     orchestration
  report.py      html/csv export

Disclaimer

Research tool only — not financial advice.


Author: Dhruv Hegde · CS @ University of Michigan

License: MIT

Connect with Dhruv Hegde

More of Dhruv Hegde's open-source work on GitHub and LinkedIn.

More projects

← Project gallery