|
Slick Sim 0.10.1
Exchange simulator that shadows real venues for risk-free strategy testing
|
Pro-rata allocation rules. Quantities use the venue's fixed-point scale. More...
#include <matching_engine/matching_config.hpp>
Public Member Functions | |
| void | validate () const |
| Throws std::invalid_argument unless lot_size > 0, min_allocation >= 0 and fifo_percent <= 100. | |
| bool | operator== (const ProRataConfig &) const =default |
Public Attributes | |
| qty_t | lot_size = DOUBLE_MULTIPLIER |
| allocations round down to whole lots | |
| qty_t | min_allocation = 0 |
| a pro-rata share below this rounds to zero | |
| uint8_t | fifo_percent = 0 |
| share of the incoming quantity filled FIFO before pro-rata | |
Pro-rata allocation rules. Quantities use the venue's fixed-point scale.
Definition at line 11 of file matching_config.hpp.
|
default |
| void ProRataConfig::validate | ( | ) | const |
Throws std::invalid_argument unless lot_size > 0, min_allocation >= 0 and fifo_percent <= 100.
A zero lot divides by zero, and a percentage over 100 allocates more than the aggressor has.
Definition at line 47 of file matching_config.cpp.
References fifo_percent, lot_size, min_allocation, and slick::sim::to_qty_double().
Referenced by slick::sim::engine::MatchingConfig::from_json().
| uint8_t slick::sim::engine::ProRataConfig::fifo_percent = 0 |
share of the incoming quantity filled FIFO before pro-rata
Definition at line 14 of file matching_config.hpp.
Referenced by slick::sim::engine::MatchingConfig::from_json(), and validate().
| qty_t slick::sim::engine::ProRataConfig::lot_size = DOUBLE_MULTIPLIER |
allocations round down to whole lots
Definition at line 12 of file matching_config.hpp.
Referenced by slick::sim::engine::MatchingConfig::from_json(), and validate().
| qty_t slick::sim::engine::ProRataConfig::min_allocation = 0 |
a pro-rata share below this rounds to zero
Definition at line 13 of file matching_config.hpp.
Referenced by slick::sim::engine::MatchingConfig::from_json(), and validate().