Full Code
How It Works
fair_valuereturns a constant0.50, a 50/50 coin flip marketquoterreceives the fair value and creates quotes:
- Bid:
0.50 - 0.03 = 0.47 - Ask:
0.50 + 0.03 = 0.53 - Size: 5 contracts
- Each cycle, the paper exchange matches orders against the mid price
- When fills occur, positions are tracked and P&L is calculated