Spaces:
Sleeping
Sleeping
| title: SafeChoicesSimulation | |
| emoji: ๐ | |
| colorFrom: blue | |
| colorTo: indigo | |
| sdk: docker | |
| sdk_version: "4.0.0" | |
| app_file: app.py | |
| pinned: false | |
| # Safe Choices Simulation | |
| A Docker-based application for running prediction market simulations using real Polymarket data. | |
| ## Features | |
| - **Real Data**: Uses actual Polymarket market data from CSV | |
| - **Three Simulation Types**: | |
| - Single Fund: All capital in one fund | |
| - Single Fund Threshold: Stop at target return | |
| - Multi Fund: Diversified portfolio | |
| - **Real-time Progress**: Frontend shows simulation progress | |
| - **Comprehensive Results**: Statistics, charts, and export capabilities | |
| ## API Endpoints | |
| - `GET /` - Serves the frontend interface | |
| - `GET /health` - Health check endpoint | |
| - `POST /api/simulate` - Run simulations with parameters | |
| ### Simulation API Request Format: | |
| ```json | |
| { | |
| "simType": "single" | "threshold" | "multi", | |
| "startingCapital": 10000, | |
| "numSimulations": 100, | |
| "startDate": "2025-01-01", | |
| "maxDuration": 365, | |
| "minProb7d": 0.90, | |
| "minProbCurrent": 0.90, | |
| "daysBefore": 1, | |
| "skewFactor": 0.1, | |
| "targetReturn": 0.0414, | |
| "numFunds": 5 | |
| } | |
| ``` | |
| ## Notes | |
| - Maximum 100 simulations per request (for performance) | |
| - Market data is loaded once on startup | |
| - All simulations use actual historical market probabilities and outcomes | |