A gamified financial learning experience where players analyze stock return charts and predict their Sharpe ratios.
Built by Sanketh Chebbi with ❤️
- Pixelated Gaming Interface: Retro-style UI with white background and yellow accents
- User Authentication: Secure login/signup system
- Real-time Charts: Interactive financial return visualizations using Chart.js
- Scoring System: Points based on guess accuracy with lives system
- Leaderboards: Track top players and scores
- Admin Dashboard: Comprehensive analytics and user management
- Sound Effects: Retro gaming audio feedback
- Mobile Responsive: Works on all devices
- Frontend: HTML5, CSS3, JavaScript, Chart.js
- Backend: Python Flask
- Database: SQLite3
- Authentication: Session-based with password hashing
- Styling: Custom CSS with Press Start 2P font
-
Clone the repository
git clone <repository-url> cd guessthesharpe
-
Install dependencies
pip install -r requirements.txt
-
Run the application
python app.py
-
Open your browser Navigate to
http://localhost:5000
- Objective: Analyze financial return charts and guess their Sharpe ratios
- Scoring:
- Perfect guess (±0.05): 2 points
- Good guess (within tolerance): 1 point
- Missed guess: 0 points + lose 1 life
- Lives: Start with 5 hearts, game ends when all are lost
- Sharpe Ratio: Measures risk-adjusted return (higher = better)
guessthesharpe/
├── static/
│ ├── css/style.css # Game styling
│ ├── js/
│ │ ├── auth.js # Authentication logic
│ │ └── game.js # Game engine
│ └── sounds/ # Audio files
├── templates/
│ ├── landing.html # Home page
│ ├── game.html # Game interface
│ └── admin.html # Admin dashboard
├── db/
│ └── sharpe.db # SQLite database
├── app.py # Flask application
├── schema.sql # Database schema
└── README.md # This file
id: Primary keyusername: Unique usernamepassword: Hashed passwordcreated_at: Registration timestamp
id: Primary keyuser_id: Foreign key to usersscore: Total scorehearts_left: Remaining livesis_active: Game statusstarted_at: Game start timeended_at: Game end time
id: Primary keygame_id: Foreign key to gamesguessed_sharpe: Player's guesstrue_sharpe: Actual Sharpe ratiotolerance: Acceptable error marginscore_awarded: Points earnedtimestamp: Round completion time
Access the admin dashboard at /admin for:
- User statistics
- Game analytics
- Performance metrics
- Data export functionality
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
This project is created for educational purposes.
For issues or questions, please create an issue in the repository.
Happy Trading! 📈