Status: paused. This is a personal project from spring 2025. The pipeline works, but it isn't actively developed.
This project collects financial news articles and Reddit posts, then uses a local LLM (Llama 3 through LM Studio) to score each article for how relevant it is to the markets and how much it could move them. The scored results are then analyzed statistically and visualized.
flowchart LR
A[YahooScraperTest.py<br/>BloombergArticleScraper.py] -->|article URLs| B[ExtractArticleAsync.py<br/>async full-text extraction]
B --> C[AnalyzeArticlesJson.py<br/>LLM scoring via LM Studio]
C --> D[AnalyzeStatistics.py<br/>stats + charts]
R[RedditScraper.py<br/>r/solana poller] -.-> E[(posts JSON)]
- Collect. The Yahoo Finance and Bloomberg scrapers watch news pages for new article URLs.
RedditScraper.pypolls r/solana for new posts through the Reddit API (PRAW). - Extract.
ExtractArticleAsync.pydownloads each article concurrently withaiohttpand pulls out the clean article text. - Score.
AnalyzeArticlesJson.pysends each article to a local LLM with a strict scoring rubric:- Market Relevance (0–10): how directly the story relates to markets, stocks or economic indicators
- Market Impact (0–10): how likely it is to move prices or influence investors
- plus a short explanation. The responses are parsed with regex, and progress is saved as it goes so long runs can resume.
- Analyze.
AnalyzeStatistics.pyloads the results into pandas and produces score distributions, correlations, scores by article length, 7-day rolling averages, and an hour-by-date article heatmap.
AnalyzeImages.py is a small experiment that sends an image to a vision model in LM Studio, using either the local SDK or the HTTP API.
Python · aiohttp · BeautifulSoup · PRAW · LM Studio (Llama 3) · pandas · matplotlib · seaborn · Fire (CLI)
pip install requests fire tqdm aiohttp beautifulsoup4 praw pandas matplotlib seaborn numpy lmstudio python-dotenv- Start LM Studio, load a model, and start its local server (default
http://localhost:1234). - For the Reddit scraper only: copy
.env.exampleto.envand fill in your own Reddit API credentials. You can create a "script" app at https://www.reddit.com/prefs/apps. - Run the pipeline:
python ExtractArticleAsync.py --input_file articles.json --output_file extracted_articles.json
python AnalyzeArticlesJson.py --input_file extracted_articles.json
python AnalyzeStatistics.pyAnalyzeArticlesJson.py takes options such as --temperature, --max_tokens and --system_prompt. Run it with --help to see them all.
- No scraped articles or results are included in this repo. The article text belongs to its publishers.
- Scraping may violate the Terms of Service of the sites involved. This project was built for learning purposes.