Your AI co-pilot for FIRE investing
Inspiration
The FIRE (Financial Independence, Retire Early) movement has inspired millions to take control of their financial futures. But here's the problem: markets don't sleep, and neither should your portfolio monitoring.
I've watched friends obsessively check stock prices during work hours, miss critical buying opportunities overnight, and panic-sell during market dips because they didn't have the full picture. Traditional portfolio trackers are passive β they show you what happened, but they don't act on your behalf.
The "Aha!" Moment: What if we could build an AI agent that monitors your portfolio 24/7, analyzes not just prices but also market sentiment from news, and proactively alerts you to opportunities and risks? An agent that combines real-time data, sentiment analysis, and intelligent decision-making to protect your path to financial independence.
That's how FIRE Sentinel was born.
What it does
FIRE Sentinel is an autonomous AI portfolio monitoring system that:
- Monitors Stock Prices - Fetches real-time prices using Alpha Vantage with Yahoo Finance fallback
- Scrapes Financial News - Pulls latest articles from Google News RSS (unlimited, free)
- Analyzes Sentiment - Uses VADER sentiment analysis to gauge market mood
- Calculates Risk - Combines price movements and sentiment to assess portfolio risk
- Generates Smart Alerts - Sends actionable notifications via email/Slack for:
- π― Target profit reached (take profits!)
- π Stop loss triggered (cut losses!)
- π Significant price drops
- π Price surges
- π° Strong BUY signals
- β οΈ Strong SELL signals
- π¨ High risk warnings
The Magic: It doesn't just tell you what happened β it tells you what to do about it.
How we built it
Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Agent Orchestrator β
β (Coordinates entire workflow) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββΌββββββββββββββββββββ
βΌ βΌ βΌ
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
βPrice Monitor β βNews Scraper β βRisk Assessor β
β β β β β β
βAlpha Vantage β βGoogle News β βVADER β
β+ Yahoo β βRSS Feed β βSentiment β
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
β β β
βββββββββββββββββββββΌββββββββββββββββββββ
βΌ
ββββββββββββββββ
βAlert Engine β
β β
βEmail / Slack β
ββββββββββββββββ
Tech Stack
Core:
- Python 3.10+ - Main language
- Pydantic - Data validation and modeling
- asyncio - Concurrent data fetching
Data Sources:
- Alpha Vantage API - Primary stock price data
- yfinance - Fallback price data (eliminates rate limits!)
- Google News RSS - Free, unlimited news articles
- feedparser - RSS parsing
AI/ML:
- VADER Sentiment Analysis - News sentiment scoring
- Custom Risk Algorithm - Combines price + sentiment
Alerts:
- Python SMTP - Email delivery
- Slack Webhooks - Team notifications
Development:
- Prompt-Driven Development (PDD) - AI-assisted code generation
- pytest - Testing framework
- Git/GitHub - Version control
Key Implementation Details
1. Dual-Source Price Monitoring
def get_price_change(symbol: str, period: str) -> PriceChange:
try:
# Try Alpha Vantage first
return get_price_change_alpha_vantage(symbol, period)
except APIError:
# Fallback to Yahoo Finance
return get_price_change_yfinance(symbol, period)
Why? Alpha Vantage has strict rate limits (25 req/day free tier). Yahoo Finance provides unlimited fallback.
2. Direct RSS Scraping
def _parse_rss_directly(symbol: str, limit: int = 20) -> List[NewsArticle]:
url = f"https://news.google.com/rss/search?q={symbol}+stock"
feed = feedparser.parse(url)
# Parse and filter articles from last 48 hours
Why? No API keys, no rate limits, no costs. Just pure RSS parsing.
3. Sentiment-Driven Risk Assessment
The risk calculation combines multiple signals:
$$\text{Risk Score} = w_1 \cdot \text{Price Change} + w_2 \cdot \text{Sentiment} + w_3 \cdot \text{Volatility}$$
Where:
- Price drops > 5% β High risk
- Negative sentiment (< -0.3) β High risk
- Combined signals β Intelligent recommendations
4. Smart Buy/Sell Recommendations
STRONG BUY Signal:
- Price drop β₯ 5% AND positive sentiment (> 0.2)
- Interpretation: Market overreacted, fundamentals strong
STRONG SELL Signal:
- Price drop β₯ 5% AND negative sentiment (< -0.3)
- Interpretation: Fundamental problems, cut losses
5. Target Profit & Stop Loss
Automated profit-taking and loss-cutting:
$$\text{Profit/Loss \%} = \frac{\text{Current Price} - \text{Purchase Price}}{\text{Purchase Price}} \times 100$$
- Alert when profit β₯ target (e.g., 20%)
- Alert when loss β₯ stop loss (e.g., 10%)
Challenges we ran into
Challenge 1: API Rate Limits
Problem: Alpha Vantage free tier allows only 25 requests/day. With 5 stocks and hourly monitoring, we'd hit limits in 5 hours.
Solution: Implemented Yahoo Finance as automatic fallback. Now we have unlimited price data!
# Graceful degradation
try:
price = get_alpha_vantage_price(symbol)
except RateLimitError:
price = get_yahoo_finance_price(symbol) # Unlimited!
Challenge 2: News API Costs
Problem: Most news APIs (NewsAPI, Alpha Vantage News) have strict limits or require paid plans.
Solution: Discovered Google News RSS feeds are free, unlimited, and don't require API keys! Built custom RSS parser with VADER sentiment analysis.
Impact: $0/month for unlimited news vs. $50-200/month for paid APIs.
Challenge 3: Toolhouse SDK Integration
Problem: Toolhouse SDK is designed for LLM tool calling, not direct action execution. The run_action() method doesn't exist.
Solution: Replaced with Python's built-in smtplib for email and Slack webhooks. More reliable, no external dependencies.
Challenge 4: Threshold Management
Problem: Different stocks need different thresholds (TSLA is volatile, AAPL is stable).
Solution: Implemented per-stock threshold overrides with portfolio-level defaults:
{
"symbol": "TSLA",
"threshold": {
"price_drop_percent": 5.0,
"target_profit_percent": 25.0,
"stop_loss_percent": 12.0
}
}
Challenge 5: Timezone Issues
Problem: News articles published "1 hour ago" might be in different timezones, causing false negatives.
Solution: Extended time window from 24 to 48 hours and added timezone-aware date parsing.
Accomplishments that we're proud of
- β Zero-Cost News Scraping - Eliminated $50-200/month API costs by using Google News RSS feeds
- β Intelligent Recommendations - Not just alerts, but actionable BUY/SELL/HOLD advice based on price + sentiment
- β Robust Fallbacks - System never fails due to rate limits (Alpha Vantage β Yahoo Finance fallback)
- β Clean Architecture - Modular, testable, maintainable code with 7 core modules
- β Comprehensive Testing - 15 test files covering all modules with real-world scenarios
- β Production-Ready - Error handling, logging, retry logic, and graceful degradation
- β Well-Documented - 14 markdown docs explaining every feature and design decision
- β Real-Time Analysis - Reduced analysis time from 30s to 5s using async Python
- β Flexible Thresholds - Per-stock threshold overrides for different risk profiles
- β $0/month Operating Cost - Runs entirely on free-tier APIs
What we learned
Technical Learnings
- Async Python is Powerful - Concurrent API calls reduced analysis time from 30s to 5s
- RSS is Underrated - Free, reliable, and perfect for news aggregation
- Graceful Degradation - Always have a fallback (Alpha Vantage β Yahoo Finance)
- Sentiment Analysis Works - VADER accurately captures market mood from headlines
- Pydantic is Amazing - Type safety and validation prevented countless bugs
Product Learnings
- Users Want Actionable Insights - Not just "price dropped 5%" but "SELL NOW: Stop loss triggered"
- Context Matters - Combining price + sentiment gives better signals than either alone
- Automation Reduces Stress - Users don't want to check prices constantly
- Thresholds Must Be Flexible - One size doesn't fit all stocks
AI/Prompt Engineering Learnings
- Prompt-Driven Development (PDD) - Used AI to generate initial module code from detailed prompts
- Iterative Refinement - Started with basic monitoring, evolved to intelligent recommendations
- Documentation is Key - Well-documented prompts β better AI-generated code
What's next for FIRE (The Financial Independence, Retire Early) Sentinel
Short-Term (Next 3 Months)
- Machine Learning Predictions - Train LSTM models on historical data to predict price movements with 70%+ accuracy
- Mobile App - React Native app with push notifications for instant alerts on your phone
- Backtesting Engine - Test your strategies on 5+ years of historical data before risking real money
- Social Sentiment Integration - Add Twitter/Reddit sentiment analysis using NLP to catch viral trends early
Medium-Term (6-12 Months)
- Portfolio Optimization - AI-powered rebalancing suggestions based on Modern Portfolio Theory (MPT)
- Crypto Integration - Monitor Bitcoin, Ethereum, and top 50 cryptocurrencies with 24/7 volatility alerts
- Multi-Currency Support - Track international stocks (LSE, TSE, NSE) with automatic currency conversion
- Advanced Charting - Interactive TradingView-style charts with technical indicators (RSI, MACD, Bollinger Bands)
Long-Term (1-2 Years)
- Community Features - Share strategies, compare portfolios, and learn from top FIRE investors
- Robo-Advisor Integration - Auto-execute trades based on AI recommendations (with user approval)
- Tax Optimization - Suggest tax-loss harvesting and optimal withdrawal strategies for FIRE
- Voice Assistant - "Alexa, how's my portfolio?" - Get instant updates via voice
Scalability & Infrastructure
- Database Integration - PostgreSQL for historical data, TimescaleDB for time-series analysis
- Caching Layer - Redis for sub-second response times on repeated queries
- Microservices Architecture - Split into independent services (price, news, alerts, ML)
- Kubernetes Deployment - Auto-scaling to support 10,000+ concurrent users
- GraphQL API - Enable third-party integrations and custom dashboards
- Real-Time WebSockets - Live price updates without polling
Business Model (Future)
- Free Tier - Monitor up to 10 stocks, daily analysis
- Pro Tier ($9.99/mo) - Unlimited stocks, hourly analysis, advanced alerts
- Enterprise Tier ($99/mo) - API access, custom integrations, priority support
Built With
- additional
- alert-system
- alpha-vantage
- api
- artificial-intelligence
- asyncio
- automation
- categories:
- data-analysis
- financial-independence
- fintech
- fire-movement
- git
- github
- google-news
- keywords:
- machine-learning
- natural-language-processing
- portfolio-management
- pydantic
- pytest
- python
- real-time-monitoring
- rss
- sentiment-analysis
- slack
- smtp
- stock-market
- vader-sentiment
- yahoo-finance
Log in or sign up for Devpost to join the conversation.