Monte Carlo & Backtests
Split a large simulation into parallel chunks and reduce the results.
Map-reduce job
curl -sS -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
https://computalot.com/api/v1/jobs \
-d '{
"type": "map_reduce",
"runner_command": ["python", "simulate.py"],
"project": "my-project",
"payload": {"strategy": "momentum"},
"split": {"field": "seed", "start": 0, "total": 10000, "chunks": 50},
"reduce": {
"total_pnl": "sum",
"sharpe_ratio": "weighted_avg:sample_count",
"max_drawdown": "max"
},
"timeout_s": 7200
}'Reduce operators
sum, mean, max, min, weighted_avg:<field>, concat, count, collect
Last updated on