Python Developer for Horse Racing Backtesting
Budget / Salary£20–250
TypeFreelance project
LocationRemote
Posted2 hours ago
I am looking for an experienced Python developer to help build a robust research and backtesting system for pre-race horse-racing trading on the exchange.
I already have approximately 4 GB of historical Exchange Stream data, including .bz2 market files, together with API documentation and an initial trading hypothesis.
The immediate objective is to build a technically accurate system that can:
1. Read and replay historical Exchange Stream data.
2. Reconstruct market and runner states accurately.
3. Generate fixed time-to-off market snapshots.
4. Simulate realistic back and lay orders.
5. Calculate correct gross and net profit after commission.
6. Test trading strategies using chronological out-of-sample data.
7. Produce complete and auditable trade reports.
The first version will cover:
- Horse racing only.
- Great Britain and Ireland initially.
- WIN markets only.
- Pre-race trading only.
- No positions intentionally held in-play.
- One strategy position per market.
- Current favourite and second favourite analysis.
- Historical replay and backtesting before any live API work.
Existing data
The historical files are Exchange Stream .bz2 files containing data such as:
- Market definitions.
- Event and market IDs.
- Runner IDs and names.
- Market status and scheduled start time.
- Best available-to-back prices.
- Best available-to-lay prices.
- Available amounts at the top price levels.
- Last traded price.
- Traded volume.
- Market suspension and in-play status.
The files contain incremental Exchange Stream updates, so the developer must understand that they are not ordinary CSV snapshots. A persistent market state must be reconstructed by correctly applying each update in timestamp order.
Initial paid technical test
The selected developer will first complete a small, fixed-price paid test using one sample historical WIN market file.
The test must:
1. Decompress and parse the .bz2 file.
2. Identify:
- Market ID.
- Event ID.
- Venue.
- Scheduled market start.
- Market type.
- Runner names and IDs.
3. Reconstruct the market state by applying Exchange Stream delta messages.
4. Produce snapshots at:
- Ten minutes before scheduled start.
- Five minutes before scheduled start.
- One minute before scheduled start.
5. For each snapshot, output:
- Current favourite.
- Favourite back price.
- Favourite lay price.
- Available amounts at the best prices.
- Last traded price.
- Runner traded volume, where available.
- Total market traded volume.
- Number of active runners.
6. Identify market suspension and in-play timestamps.
7. Explain how missing fields, zero-size ladder updates and unchanged values have been handled.
8. Include automated tests.
9. Commit the code and documentation to a private GitHub repository owned by me.
Successful completion of this paid test may lead to the full project.
I already have approximately 4 GB of historical Exchange Stream data, including .bz2 market files, together with API documentation and an initial trading hypothesis.
The immediate objective is to build a technically accurate system that can:
1. Read and replay historical Exchange Stream data.
2. Reconstruct market and runner states accurately.
3. Generate fixed time-to-off market snapshots.
4. Simulate realistic back and lay orders.
5. Calculate correct gross and net profit after commission.
6. Test trading strategies using chronological out-of-sample data.
7. Produce complete and auditable trade reports.
The first version will cover:
- Horse racing only.
- Great Britain and Ireland initially.
- WIN markets only.
- Pre-race trading only.
- No positions intentionally held in-play.
- One strategy position per market.
- Current favourite and second favourite analysis.
- Historical replay and backtesting before any live API work.
Existing data
The historical files are Exchange Stream .bz2 files containing data such as:
- Market definitions.
- Event and market IDs.
- Runner IDs and names.
- Market status and scheduled start time.
- Best available-to-back prices.
- Best available-to-lay prices.
- Available amounts at the top price levels.
- Last traded price.
- Traded volume.
- Market suspension and in-play status.
The files contain incremental Exchange Stream updates, so the developer must understand that they are not ordinary CSV snapshots. A persistent market state must be reconstructed by correctly applying each update in timestamp order.
Initial paid technical test
The selected developer will first complete a small, fixed-price paid test using one sample historical WIN market file.
The test must:
1. Decompress and parse the .bz2 file.
2. Identify:
- Market ID.
- Event ID.
- Venue.
- Scheduled market start.
- Market type.
- Runner names and IDs.
3. Reconstruct the market state by applying Exchange Stream delta messages.
4. Produce snapshots at:
- Ten minutes before scheduled start.
- Five minutes before scheduled start.
- One minute before scheduled start.
5. For each snapshot, output:
- Current favourite.
- Favourite back price.
- Favourite lay price.
- Available amounts at the best prices.
- Last traded price.
- Runner traded volume, where available.
- Total market traded volume.
- Number of active runners.
6. Identify market suspension and in-play timestamps.
7. Explain how missing fields, zero-size ladder updates and unchanged values have been handled.
8. Include automated tests.
9. Commit the code and documentation to a private GitHub repository owned by me.
Successful completion of this paid test may lead to the full project.
Apply on Freelancer →
Project sourced from Freelancer.com. Applications happen directly on the original platform — we never collect your data.