|
|
--- |
|
|
title: Premium Trading Dashboard |
|
|
app_file: app.py |
|
|
sdk: gradio |
|
|
sdk_version: 5.35.0 |
|
|
--- |
|
|
|
|
|
# π Premium Trading Dashboard |
|
|
|
|
|
A comprehensive real-time trading dashboard with automated IPO discovery, sentiment analysis, and backtesting capabilities. |
|
|
|
|
|
## β¨ Features |
|
|
|
|
|
### π Portfolio Overview |
|
|
- Real-time account monitoring (portfolio value, buying power, cash) |
|
|
- Interactive portfolio performance charts |
|
|
- Day change tracking with visual indicators |
|
|
|
|
|
### π IPO Discoveries |
|
|
- Automated IPO detection and classification |
|
|
- Investment decision analytics |
|
|
- Recent discoveries with detailed breakdowns |
|
|
|
|
|
### π° Investment Performance |
|
|
- Complete P&L analysis for all IPO investments |
|
|
- Advanced trading statistics and metrics |
|
|
- Risk analysis and performance breakdowns |
|
|
|
|
|
### π¬ **NEW: Backtesting Analysis** |
|
|
- **Sentiment-based IPO prediction backtesting** |
|
|
- Tests sentiment analysis on every actual IPO investment |
|
|
- Uses news from 12 hours **before** each investment |
|
|
- Multi-source analysis: Reddit (WSB) + Google News |
|
|
- VADER + TextBlob sentiment engines |
|
|
- No data leakage - purely historical validation |
|
|
|
|
|
### π» VM Terminal |
|
|
- Remote command execution on trading VM |
|
|
- Real-time log monitoring |
|
|
- File system navigation and analysis |
|
|
|
|
|
### π System Logs |
|
|
- Parsed trading bot activity logs |
|
|
- Raw cron job outputs |
|
|
- Color-coded error tracking |
|
|
|
|
|
## π§ Sentiment Analysis Engine |
|
|
|
|
|
The backtesting feature implements a sophisticated sentiment analysis system: |
|
|
|
|
|
- **Data Sources**: Reddit (including WallStreetBets), Google News |
|
|
- **Analysis Window**: 12 hours before each actual investment |
|
|
- **Sentiment Engines**: VADER + TextBlob with engagement weighting |
|
|
- **Target**: First-hour stock performance prediction |
|
|
- **Validation**: Compares predictions vs actual market performance |
|
|
|
|
|
### Methodology |
|
|
1. **Historical News Gathering**: Retrieves news from 12 hours before investment |
|
|
2. **Multi-source Sentiment**: Analyzes Reddit posts and Google News articles |
|
|
3. **Weighted Scoring**: Engagement-based weighting for Reddit content |
|
|
4. **Prediction Generation**: Converts sentiment to percentage change predictions |
|
|
5. **Performance Validation**: Compares against actual first-hour stock performance |
|
|
|
|
|
## π§ Technical Stack |
|
|
|
|
|
- **Frontend**: Gradio with custom CSS styling |
|
|
- **Backend**: Flask API integration with VM |
|
|
- **Trading API**: Alpaca Markets (Paper Trading) |
|
|
- **Data Sources**: Reddit API, Google News RSS, Yahoo Finance |
|
|
- **Sentiment Analysis**: VADER, TextBlob |
|
|
- **Charts**: Plotly for interactive visualizations |
|
|
|
|
|
## π Recent Updates |
|
|
|
|
|
- β
Added IPO Sentiment Analysis Backtesting |
|
|
- β
WallStreetBets integration for Reddit sentiment |
|
|
- β
Historical performance validation |
|
|
- β
Multi-source sentiment aggregation |
|
|
- β
Direction accuracy metrics |
|
|
|
|
|
## π Performance Metrics |
|
|
|
|
|
The backtesting system tracks: |
|
|
- **Direction Accuracy**: % of correct up/down predictions |
|
|
- **Mean Absolute Error**: Average prediction error |
|
|
- **Source Breakdown**: Performance by news source |
|
|
- **Confidence Scoring**: Multi-source agreement analysis |
|
|
|
|
|
--- |
|
|
|
|
|
**Built with β€οΈ for automated IPO trading and sentiment analysis** |
|
|
|
|
|
*Last updated: 2025-07-29 - Enhanced logging and Reddit search improvements - Force sync* |