Spaces:
Sleeping
Sleeping
dhruv575 commited on
Commit ·
47e92f0
1
Parent(s): 91f4bb2
Fixed README
Browse files
README.md
CHANGED
|
@@ -1,36 +1,27 @@
|
|
| 1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
|
| 5 |
-
|
| 6 |
|
| 7 |
-
|
| 8 |
-
- **Frontend**: Static web interface served by FastAPI
|
| 9 |
-
- **Data**: Market data CSV loaded on startup
|
| 10 |
-
- **Docker**: Containerized application ready for deployment
|
| 11 |
-
|
| 12 |
-
## Files
|
| 13 |
-
|
| 14 |
-
- `Dockerfile` - Docker container definition
|
| 15 |
-
- `app.py` - FastAPI backend server
|
| 16 |
-
- `simulation_utils.py` - Core simulation logic
|
| 17 |
-
- `requirements.txt` - Python dependencies
|
| 18 |
-
- `data/` - Market data CSV file
|
| 19 |
-
- `static/` - Frontend HTML, CSS, JavaScript files
|
| 20 |
-
|
| 21 |
-
## Building and Running
|
| 22 |
-
|
| 23 |
-
### Build the Docker image:
|
| 24 |
-
```bash
|
| 25 |
-
docker build -t safe-choices-simulation .
|
| 26 |
-
```
|
| 27 |
-
|
| 28 |
-
### Run the container:
|
| 29 |
-
```bash
|
| 30 |
-
docker run -p 7860:7860 safe-choices-simulation
|
| 31 |
-
```
|
| 32 |
|
| 33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
## API Endpoints
|
| 36 |
|
|
@@ -50,30 +41,11 @@ The application will be available at `http://localhost:7860`
|
|
| 50 |
"minProbCurrent": 0.90,
|
| 51 |
"daysBefore": 1,
|
| 52 |
"skewFactor": 0.1,
|
| 53 |
-
"targetReturn": 0.0414,
|
| 54 |
-
"numFunds": 5
|
| 55 |
}
|
| 56 |
```
|
| 57 |
|
| 58 |
-
## Features
|
| 59 |
-
|
| 60 |
-
- **Real Data**: Uses actual Polymarket market data from CSV
|
| 61 |
-
- **Three Simulation Types**:
|
| 62 |
-
- Single Fund: All capital in one fund
|
| 63 |
-
- Single Fund Threshold: Stop at target return
|
| 64 |
-
- Multi Fund: Diversified portfolio
|
| 65 |
-
- **Real-time Progress**: Frontend shows simulation progress
|
| 66 |
-
- **Comprehensive Results**: Statistics, charts, and export capabilities
|
| 67 |
-
|
| 68 |
-
## Development
|
| 69 |
-
|
| 70 |
-
To run locally without Docker:
|
| 71 |
-
|
| 72 |
-
```bash
|
| 73 |
-
pip install -r requirements.txt
|
| 74 |
-
python app.py
|
| 75 |
-
```
|
| 76 |
-
|
| 77 |
## Notes
|
| 78 |
|
| 79 |
- Maximum 100 simulations per request (for performance)
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: SafeChoicesSimulation
|
| 3 |
+
emoji: 📊
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: indigo
|
| 6 |
+
sdk: docker
|
| 7 |
+
sdk_version: "4.0.0"
|
| 8 |
+
app_file: app.py
|
| 9 |
+
pinned: false
|
| 10 |
+
---
|
| 11 |
|
| 12 |
+
# Safe Choices Simulation
|
| 13 |
|
| 14 |
+
A Docker-based application for running prediction market simulations using real Polymarket data.
|
| 15 |
|
| 16 |
+
## Features
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
+
- **Real Data**: Uses actual Polymarket market data from CSV
|
| 19 |
+
- **Three Simulation Types**:
|
| 20 |
+
- Single Fund: All capital in one fund
|
| 21 |
+
- Single Fund Threshold: Stop at target return
|
| 22 |
+
- Multi Fund: Diversified portfolio
|
| 23 |
+
- **Real-time Progress**: Frontend shows simulation progress
|
| 24 |
+
- **Comprehensive Results**: Statistics, charts, and export capabilities
|
| 25 |
|
| 26 |
## API Endpoints
|
| 27 |
|
|
|
|
| 41 |
"minProbCurrent": 0.90,
|
| 42 |
"daysBefore": 1,
|
| 43 |
"skewFactor": 0.1,
|
| 44 |
+
"targetReturn": 0.0414,
|
| 45 |
+
"numFunds": 5
|
| 46 |
}
|
| 47 |
```
|
| 48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
## Notes
|
| 50 |
|
| 51 |
- Maximum 100 simulations per request (for performance)
|