https://github.com/roq-trading/roq-cpp-algo-template
C++ algo template project.
https://github.com/roq-trading/roq-cpp-algo-template
algo-trading algorithmic-trading arbitrage back-testing cpp23 cpp26 crypto-markets exchange hft low-latency matching-engine oms simulation tick-data trading-strategies
Last synced: 4 months ago
JSON representation
C++ algo template project.
- Host: GitHub
- URL: https://github.com/roq-trading/roq-cpp-algo-template
- Owner: roq-trading
- License: mit
- Created: 2024-09-20T06:19:15.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-08-14T04:11:57.000Z (4 months ago)
- Last Synced: 2025-08-14T06:10:44.095Z (4 months ago)
- Topics: algo-trading, algorithmic-trading, arbitrage, back-testing, cpp23, cpp26, crypto-markets, exchange, hft, low-latency, matching-engine, oms, simulation, tick-data, trading-strategies
- Language: C++
- Homepage: https://roq-trading.com/
- Size: 783 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# roq-cpp-algo-template
This is a "framework" to manage the strategies implemented by the `roq-algo` library.
It allows you to run a strategy against live gateways or simulate using event-logs (historical data captured by gateways).
The strategy may be associated with a "reporter" which, upon strategy termination, may output various metrics.
This is useful when measuring the performance of a simulated strategy.
The setup is such that the strategy "legs" have to be defined in a `.toml` file.
This is considered "static" configuration.
Strategy (model) parameters are configured on the command-line as key-value pairs.
This is considered "dynamic" configuration.
The distinction between "static" and "dynamic" configuration is done to support distributed simulations.
## SLURM
SLURM will allow you to pass distinct command-line arguments for each task.
One could then either pass model parameters on the command-line or use the command-line as an indirection to fetch model
parameters from a file.
When launching 100s of tasks, it's more efficient to pass the variation of model parameters on the command-line as
compared to first create 100s of files containing the model parameters.
> Both options are possible since Abseil supports reading command-line flags from file.
## Prerequisites
> Use `stable` for (the approx. monthly) release build.
> Use `unstable` for the more regularly updated development builds.
### Initialize sub-modules
```bash
git submodule update --init --recursive
```
### Create development environment
```bash
scripts/create_conda_env unstable debug
```
### Activate environment
```bash
source opt/conda/bin/activate dev
```
## Build the project
> Sometimes you may have to delete CMakeCache.txt if CMake has already cached an incorrect configuration.
```bash
cmake . && make -j4
```
## License
The project is released under the terms of the MIT license.