Skip to content

Latest commit

Β 

History

154 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

RedHood Systems

AI-Powered Market Intelligence Dashboard

Portfolio Project by Tazeem Chowdhury Transforming information overload into actionable trading insights using AI

Status Python License CI


Project Overview

Problem: Retail traders spend 2-4 hours daily monitoring 20+ information sources (X/Twitter, Substack) to identify market opportunities. This creates information overload and missed signals.

Solution: RedHood Systems aggregates multi-source feeds and uses Claude AI to extract the top 3 market narratives with entropy risk scoring (quantified uncertainty) and trade hypotheses. Every run generates a styled RedHood Reads HTML report and persists all data to SQLite.

Impact: Reduces research time by 80% (from 180 min β†’ 30 min) while improving signal quality through systematic AI analysis.


Key Features

  • AI Narrative Extraction: Claude AI (Opus 4.8) processes 50+ feeds to identify top market themes
  • Entropy Risk Scoring: Quantifies market uncertainty (1-10 scale) using physics-inspired framework
  • Thermodynamic Regime Detection: Auto signal generation from market temperature/entropy state (redhood_regime_detector.py)
  • Trade Hypothesis Generation: Specific, actionable trade ideas with entry/exit logic
  • Hypothesis Grading: 0–20 quality grade (Specificity / Catalyst / Risk Management / Cohesion) + A–F letter, with long-side ticker extraction (redhood_grader.py, score_narratives.py)
  • Long-Only P&L Tracking: $2,500-per-ticker ledger over extracted tickers via yfinance (redhood_pnl.py)
  • Star-Schema Persistence: Runs, feeds, narratives, tickers, grades, prices, earnings + Power BI views in redhood.db
  • Power BI Export: SQLite β†’ Power BI pipeline with Power Query (M), DAX measures, and report layout (powerbi/)
  • RedHood Reads HTML Report: Styled editorial card report generated every run
  • Account Management: CLI tool to manage tracked X/Twitter accounts
  • Trading System Analysis: Thermodynamic position-sizing model via run.ps1
  • Multi-Source Aggregation: X/Twitter (via Nitter RSS, no API key required), Substack RSS, and public Telegram channels (via the t.me/s/ web preview, no bot token required β€” includes @redhoodtrades)

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Data Sources                   β”‚  Nitter RSS (X/Twitter), Substack RSS,
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  Telegram (t.me/s/ preview), Yahoo Finance
              β”‚
              β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Python Aggregator              β”‚  redhood_aggregator.py
β”‚  - Feed collection              β”‚  + redhood_regime_detector.py (regime)
β”‚  - AI narrative extraction      β”‚  + ticker_extraction.py (tickers/sides)
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚              β”‚
       β–Ό              β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ SQLite DB  β”‚  β”‚ RedHood Reads   β”‚
β”‚ redhood.db β”‚  β”‚ HTML Report     β”‚
β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
      β”‚
      β”œβ”€β”€β–Ά score_narratives.py ──▢ grades + long tickers (redhood_grader.py)
      β”œβ”€β”€β–Ά redhood_pnl.py ───────▢ long-only P&L ledger (yfinance)
      └──▢ powerbi/export_to_powerbi.py ──▢ Power BI (Power Query + DAX)

Quick Start

Prerequisites

  • Python 3.9+
  • Anthropic API key (Get one here)
  • PowerShell 5+ (Windows, for run.ps1)

Installation

# Clone the repository
git clone https://github.com/tazeemc/Redhood-Systems.git
cd Redhood-Systems

# Install dependencies
pip install -r requirements.txt
# (yfinance is optional β€” only needed for redhood_pnl.py / scoring with --with-pnl)

# Set up environment variables
echo ANTHROPIC_API_KEY=sk-ant-your-key-here > .env

Run via PowerShell (Recommended)

# Last 45 minutes (default), includes trading system analysis
.\run.ps1

# Last 5 hours, custom symbols
.\run.ps1 -Hours 5 -Symbols "AAPL","MSFT"

# Last 24 hours (full day)
.\run.ps1 -Hours 24

# RedHood aggregator only (skip trading analysis)
.\run.ps1 -SkipTrading

# Trading analysis only
.\run.ps1 -SkipRedHood

Run Python Directly

# Default (last ~10 minutes)
python redhood_aggregator.py

# Last 24 hours
python redhood_aggregator.py --hours 24

Score, Grade & Track P&L

# Grade every narrative + extract long-side tickers (idempotent)
python score_narratives.py

# Score only recent narratives, also refresh prices/P&L
python score_narratives.py --since 2026-03-01 --with-pnl

# Long-only P&L leaderboard ($2,500/ticker; needs yfinance)
python redhood_pnl.py --report

Run Tests & Static Analysis

pip install pytest ruff

# Unit tests (44 tests β€” extraction, grading, Telegram scraper, DB schema)
pytest

# Static analysis (also runs in CI on every push/PR)
ruff check .

Manage Tracked Accounts

# List all tracked Twitter accounts
python accounts_db.py --list

# Add an account
python accounts_db.py --add SomeHandle --category macro --notes "Description"

# Toggle active/inactive
python accounts_db.py --toggle FirstSquawk

Example Output

πŸ“° Fetching RSS feeds...
   βœ… Found 18 RSS items

🐦 Fetching Twitter feeds...
   πŸ“‹ Active accounts from DB: @unusual_whales, @FirstSquawk, @AutismCapital...
   βœ… Found 12 tweets

πŸ“’ Fetching Telegram channels...
   πŸ“‹ Channels: @redhoodtrades
   βœ… Found 9 Telegram messages

πŸ“Š Total feeds collected: 39

🧠 AI Analysis Phase...
βœ… Extracted 3 narratives

============================================================
πŸ“‹ DAILY BRIEF - TOP NARRATIVES
============================================================

[1] Fed Signals Dovish Pivot
    Entropy Risk: 🟒 LOW (3/10)
    πŸ’‘ Hypothesis: Long QQQ calls, 2-week timeframe
    πŸ“ Rationale: Multiple Fed speakers indicate willingness to pause
        rate hikes if inflation continues cooling.
    πŸ“… Catalysts: CPI data, FOMC minutes

πŸ’Ύ Results saved to: data/redhood_insights_20260222_083045.json
πŸ“° Report saved to:  data/redhood_reads_20260222_083045.html
πŸ—„οΈ  DB: run #5 saved β€” 30 feeds, 3 narratives

Project Structure

Redhood-Systems/
β”œβ”€β”€ redhood_aggregator.py       # Main aggregator + RedHood Reads HTML generator
β”œβ”€β”€ redhood_regime_detector.py  # Thermodynamic regime detection + auto signals
β”œβ”€β”€ ticker_extraction.py        # Extract tickers + Long/Short/Hedge sides from hypotheses
β”œβ”€β”€ redhood_grader.py           # Hypothesis grader (0–20 / A–F) + long-ticker extraction
β”œβ”€β”€ score_narratives.py         # CLI: grade narratives β†’ narrative_tickers + narrative_grades
β”œβ”€β”€ redhood_pnl.py              # CLI: long-only P&L ledger via yfinance
β”œβ”€β”€ backfill.py                 # Backfill narrative_tickers from historical narratives
β”œβ”€β”€ accounts_db.py             # CLI: manage tracked X/Twitter accounts in SQLite
β”œβ”€β”€ models.py                  # SQLite star schema (tables + Power BI views) + init helpers
β”œβ”€β”€ demo.py                    # Demo mode with sample data (no API key required)
β”œβ”€β”€ run.ps1                    # PowerShell runner: trading analysis + aggregator
β”œβ”€β”€ redhood.db                 # SQLite database (star schema)
β”œβ”€β”€ requirements.txt           # Python dependencies
β”œβ”€β”€ pyproject.toml             # pytest + ruff configuration
β”œβ”€β”€ tests/                     # Unit test suite (pytest, network-free)
β”œβ”€β”€ .github/workflows/ci.yml   # CI: ruff static analysis + pytest matrix
β”œβ”€β”€ .env                       # ANTHROPIC_API_KEY (not committed)
β”œβ”€β”€ powerbi/                   # Power BI export pipeline
β”‚   β”œβ”€β”€ export_to_powerbi.py   #   SQLite β†’ Power BI dataset
β”‚   β”œβ”€β”€ power_query.m          #   Power Query (M) source
β”‚   β”œβ”€β”€ dax_measures.dax       #   DAX measures
β”‚   └── report_layout.md       #   Report layout spec
β”œβ”€β”€ docs/                      # Published RedHood Reads + Power BI integration guide
β”œβ”€β”€ PRD_RedHood_Systems.md    # Product Requirements Document
β”œβ”€β”€ Market_Research_Analysis.md# Competitive analysis & market sizing
β”œβ”€β”€ CASE_STUDY.md              # Portfolio case study
β”œβ”€β”€ README.md                  # This file
└── data/                      # Output directory (gitignored)
    β”œβ”€β”€ redhood_insights_*.json # Raw feed + narrative data
    β”œβ”€β”€ redhood_reads_*.html    # Styled RedHood Reads report
    └── TradingAnalysis_*.json  # Trading system output

Portfolio Artifacts

This repository contains key documents demonstrating PM skills:

1. Product Requirements Document (PRD)

  • File: PRD_RedHood_Systems.md
  • Contents: Problem statement, user personas, feature specs, success metrics, roadmap
  • Demonstrates: Strategic thinking, user research, technical specification

2. Market Research & Competitive Analysis

  • File: Market_Research_Analysis.md
  • Contents: TAM/SAM/SOM analysis, competitive landscape, pricing strategy, GTM plan
  • Demonstrates: Business acumen, market sizing, competitive positioning

3. Working Prototype

  • File: redhood_aggregator.py
  • Contents: Production Python code β€” feed scraping, Claude AI integration, HTML report generation, SQLite persistence
  • Demonstrates: Technical execution, coding ability, systems thinking

Technical Stack

Backend:

  • Python 3.9+
  • Anthropic Claude API (claude-opus-4-8)
  • feedparser (RSS + Nitter RSS parsing)
  • urllib + regex (public Telegram channel scraping via t.me/s/)
  • python-dotenv (environment config)
  • yfinance (optional β€” long-only P&L tracking)

Data Storage:

  • SQLite via redhood.db β€” star schema (twitter_accounts, runs, feeds, narratives, narrative_feeds, narrative_tickers, narrative_grades, tickers, prices, earnings, date_dim) plus Power BI compatibility views (dim_runs, fact_narratives, fact_narratives_ticker, fact_prices, fact_narrative_grades, …)

Reporting & BI:

  • Self-contained HTML β€” RedHood Reads editorial card (Playfair Display + IBM Plex Mono design)
  • Power BI export pipeline β€” Power Query (M) + DAX measures (powerbi/)

Trading Analysis (PowerShell):

  • Yahoo Finance API (market data)
  • Thermodynamic position-sizing: temperature, entropy, momentum, RSI

Deployment:

  • Local execution (MVP)
  • AWS Lambda + CloudWatch (planned)
  • React dashboard (planned)

Roadmap

Phase 1: MVP (Complete)

  • RSS feed aggregation (Substack)
  • X/Twitter via Nitter RSS (no API key required)
  • Claude AI narrative extraction
  • Entropy risk scoring
  • SQLite persistence (runs, feeds, narratives)
  • Account management CLI (accounts_db.py)
  • RedHood Reads HTML report (generated each run)
  • Trading system analysis with thermodynamic sizing (run.ps1)
  • .env support for API key management

Phase 2: Enhanced Analysis

  • Thermodynamic regime detection + auto signal generation
  • Ticker/side extraction into a star-schema bridge table
  • Hypothesis grading (0–20 / A–F) + narrative scoring CLI
  • Long-only P&L tracking ($2,500/ticker, via yfinance)
  • Power BI export pipeline (Power Query + DAX)
  • Historical backtesting of signal accuracy
  • Sentiment trend tracking across runs
  • Live ticker data in HTML report

Phase 3: Web Dashboard (Planned)

  • React frontend
  • FastAPI backend
  • User authentication
  • Trade journal UI
  • Deployed demo (Vercel)

Phase 4: Scale (Post-MVP)

  • Real-time alerts (Telegram bot)
  • Mobile app (React Native)
  • B2B features (team collaboration)
  • API access for developers

Success Metrics

Product Metrics:

  • Time saved: 2.5 hours β†’ 30 min (83% reduction)
  • Signal accuracy: 65% of flagged narratives = profitable trades
  • User engagement: 5+ DAU with 70% weekly retention

Business Metrics:

  • Target: 50 users (10 paid) in Month 1
  • ARPU: $49/month
  • Churn: <20% monthly
  • LTV:CAC ratio: >3:1

Contributing

This is a portfolio project, but feedback is welcome!

How to provide feedback:

  1. Open an issue with suggestions
  2. Fork and submit a PR with improvements
  3. Reach out directly: ctazeem@gmail.com

License

MIT License - feel free to use this code for your own projects.


About the Creator

Tazeem Chowdhury Scrum Master | Product Manager | Markets Analyst

  • Background: Engineering degree with specialization in business analysis, data analytics, and enterprise service delivery. Currently pursuing CBAP and PMP certifications.
  • Experience:
    • Project coordination and infrastructure delivery (Nav Canada, Mitel)
    • Business requirements gathering and solution design (RBC Capital Markets, IRCC)
    • Enterprise software implementation and QA (consulting engagements)
    • Cloud infrastructure and data visualization (Azure, Power BI)
    • Financial markets and cryptocurrency research and analysis
  • LinkedIn: linkedin.com/in/tazeemchowdhury
  • Twitter/X: @redhoodcapital
  • Telegram: @redhoodtrades
  • Email: ctazeem@gmail.com
  • Substack: RedHood Reads

Why I Built This:

As a trader and market analyst, I was spending 3+ hours daily across Twitter, Substack, and financial feeds hunting for signals and synthesizing fragmented data. RedHood Systems automates the entire research pipeline β€” from feed aggregation to AI-extracted narratives to styled HTML briefings β€” demonstrating full-stack product thinking and technical execution.


Resources & References

AI & APIs:


Contact

Have questions about the project or want to discuss product opportunities?

Email: ctazeem@gmail.com LinkedIn: linkedin.com/in/tazeemchowdhury Newsletter: RedHood Reads on Substack Twitter/X: @redhoodcapital Telegram: @redhoodtrades


Last Updated: July 2, 2026 Version: 1.3 (Telegram source + $BLSH ticker)

About

Trade News Aggregator

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages