|
Slick Sim 0.10.1
Exchange simulator that shadows real venues for risk-free strategy testing
|
Which engine a venue's symbols match with. More...
#include <matching_engine/matching_config.hpp>
Static Public Member Functions | |
| static MatchingConfig | from_json (const nlohmann::json &config) |
| Reads matching_algorithm ("fifo" by default, or "pro_rata") and, for pro-rata, the pro_rata block: lot_size and min_allocation in venue units, fifo_percent 0-100. | |
Public Attributes | |
| MatchingEngine::Type | type = MatchingEngine::Type::FIFO |
| ProRataConfig | pro_rata |
Which engine a venue's symbols match with.
Definition at line 25 of file matching_config.hpp.
|
static |
Reads matching_algorithm ("fifo" by default, or "pro_rata") and, for pro-rata, the pro_rata block: lot_size and min_allocation in venue units, fifo_percent 0-100.
Throws std::invalid_argument on anything else, a wrong JSON type included, since falling back to FIFO would silently change who gets filled.
Definition at line 60 of file matching_config.cpp.
References slick::sim::engine::ProRataConfig::fifo_percent, slick::sim::engine::ProRataConfig::lot_size, slick::sim::engine::ProRataConfig::min_allocation, pro_rata, slick::sim::engine::MatchingEngine::ProRata, type, and slick::sim::engine::ProRataConfig::validate().
Referenced by slick::sim::exch::Exchange::configureMatching().
| ProRataConfig slick::sim::engine::MatchingConfig::pro_rata |
Definition at line 27 of file matching_config.hpp.
Referenced by slick::sim::engine::createMatchingEngine(), and from_json().
| MatchingEngine::Type slick::sim::engine::MatchingConfig::type = MatchingEngine::Type::FIFO |
Definition at line 26 of file matching_config.hpp.
Referenced by slick::sim::engine::createMatchingEngine(), and from_json().