Spaces:
Sleeping
Sleeping
File size: 1,308 Bytes
47e92f0 91f4bb2 47e92f0 91f4bb2 47e92f0 91f4bb2 47e92f0 91f4bb2 47e92f0 91f4bb2 47e92f0 91f4bb2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | ---
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
|