A zero-cost quantitative alerting platform for stock trading signals, built with the rigor of an investment bank system but running at zero cost, with transparency, reproducibility, and extensibility as core values.
- Zero Cost: Runs entirely on GitHub Actions - no server costs
- Investment Bank Quality: Professional-grade quantitative strategies and data handling
- Real-time Alerts: Instant Telegram notifications when trading opportunities arise
- Multiple Strategies: RSI Mean Reversion, Moving Average Crossover, Bollinger Band Squeeze
- Efficient Data Storage: Uses DuckDB with PyArrow for columnar data storage
- Comprehensive Logging: Full audit trail of all analysis and alerts
- Extensible: Easy to add new strategies and data sources
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Data Fetcher β β Strategy Mgr β β Alert System β
β (YFinance) βββββΆβ (Pandas/NumPy) βββββΆβ (Telegram) β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Data Storage β β Analysis Log β β Alert Log β
β (DuckDB/Arrow) β β β β β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
- Identifies oversold/overbought conditions using RSI
- Filters signals using moving average trends
- Confidence scoring based on RSI deviation
- Golden Cross (bullish) and Death Cross (bearish) detection
- Volume confirmation for signal validation
- MACD confirmation for trend strength
- Detects volatility contractions and breakouts
- Mean reversion signals at band extremes
- Squeeze detection for high-probability setups
# Clone the repository
git clone https://github.com/sandeep-jaiswar/quantalertsystem.git
cd quantalertsystem
# Install dependencies
pip install -r requirements.txt
pip install -e .
Create a .env
file:
cp .env.example .env
Edit .env
with your settings:
TELEGRAM_BOT_TOKEN=your_bot_token_here
TELEGRAM_CHAT_ID=your_chat_id_here
DEFAULT_SYMBOLS=AAPL,GOOGL,MSFT,TSLA,NVDA
# Test the system
python -m quantalertsystem.main --test
# Run analysis on default symbols
python -m quantalertsystem.main
# Analyze specific symbols
python -m quantalertsystem.main --symbols AAPL TSLA NVDA
# Run without sending alerts
python -m quantalertsystem.main --no-alerts
The system runs automatically using GitHub Actions. Set up these secrets:
- Go to repository Settings β Secrets and variables β Actions
- Add secrets:
TELEGRAM_BOT_TOKEN
: Your Telegram bot tokenTELEGRAM_CHAT_ID
: Your Telegram chat ID
The system runs automatically:
- 9:30 AM EST: Market open analysis
- 12:00 PM EST: Midday check
- 4:00 PM EST: Market close analysis
Only runs on weekdays when markets are open.
- Message @BotFather on Telegram
- Send
/newbot
and follow instructions - Save the bot token
- Add the bot to your chat/group
- Send a message to the bot
- Visit:
https://api.telegram.org/bot<TOKEN>/getUpdates
- Find your chat ID in the response
- Source: Yahoo Finance via YFinance library
- Storage: DuckDB database with PyArrow columnar format
- Retention: 1 year of daily data, 2 years of alerts
- Backup: Automatic export to Parquet format
# Run all tests
pytest
# Run with coverage
pytest --cov=quantalertsystem
# Run specific test file
pytest tests/test_strategies.py
# Format code
black quantalertsystem/
# Lint code
flake8 quantalertsystem/
- Create strategy class inheriting from
BaseStrategy
- Implement
calculate_indicators()
andgenerate_signals()
methods - Add to
StrategyManager
initialization - Add tests in
tests/test_strategies.py
Example:
from quantalertsystem.strategies.base import BaseStrategy
class MyStrategy(BaseStrategy):
def __init__(self, **kwargs):
super().__init__("My Strategy", **kwargs)
def calculate_indicators(self, data):
# Add your indicators
return data
def generate_signals(self, data):
# Generate buy/sell signals
return data
- Runtime: ~2-3 minutes for 5 symbols
- GitHub Actions: ~10 minutes/month usage
- Storage: <100MB for 1 year of data
- Cost: $0 (free GitHub Actions tier)
- No sensitive data stored in repository
- All credentials managed via GitHub Secrets
- Database stored only in GitHub Actions runner (ephemeral)
- Automatic cleanup of old data
MIT License - see LICENSE file for details.
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
- π§ Issues: Use GitHub Issues for bug reports
- π¬ Discussions: Use GitHub Discussions for questions
- π Documentation: Check the
/docs
folder for detailed guides
This system is for educational and informational purposes only. Not financial advice. Always do your own research before making investment decisions.