The struct is renamed 'LegDefinition' to use a naming scheme consistent
with 'SecurityDefinition.' However, an alias for 'LegDef' is
declared for convenience, and to avoid replacing 'LegDef' with
'LegDefinition' in existing references.
When an agressor order crosses multiple [direct/implied] passive markets
at the same price, the aggressor is filled against the visible quantity
in each passive market, before passive icebergs (if any) are reloaded.
This simple iterative step is repeated until the aggressor is filled, or
no longer crosses the market.
The iceberg quantity is expected to be null in all updates (i.e., only
non-null when the order is added). Once added, the iceberg quantity is
redundant, as show qty changes are interpretted through visible qty
changes (the qty actually visible in the book), and the total qty is
immutable.
This patch fixes a bug where the iceberg quantity was not being assigned
back to an updated order before it was passed to the 'fill' method,
which in turn, misled the matcher to think the order was completed when
its visible qty alone was filled.
This works in a similar fasion to the cmd that records matcher books.
Both generate a csv file designed to be imported into a sqlite database,
so the matcher's output may be joined/compared with actual data from the
exchange.
This is in anticipation of adding a similar subcommand to record fills,
and proc times. Basic functionality expected to be shared by these
three commands is abstracted out of the former SimBooks command into
common classes.
* Move MatchEffect into 'back_testing/common/MatchEffect.h'
* Move MBPUpdate into 'back_testing/common/MBPUpdate.h/cc'
* Move OrderUpdate into 'back_testing/common/OrderUpdate.h/cc'
Bootstrap observers with resting orders on the first event in which the
security's status transitions to 'ReadyToTrade.' This simplifies the
previous implementation, which did not bootstrap observers until the
security's second consecutive event with 'ReadyToTrade' status.
A few advantages the struct offers (over an alias for a pair of size_ts):
* A custom output operator
* Eliminates potential conflict with pairs of size_ts that don't
represent an algo id
* The ability to (eventually) choose precise member names for both
components of the event, rather than 'first' and 'second'
Also refactor the relevant namespace 'bts::utils' methods to be static
methods in the newly created class 'MapUtils.' This is part of the
effort to favor static class methods over namespaced functions.
Also refactor the namespace 'table_display' methods to be static methods
in the newly created class 'TableDisplay.' This is part of the effort
to favor static class methods over namespaced functions.
Also refactor the namespace 'all_permutations' methods to be static
methods in the newly created class 'Permutation.' This is part of
the effort to favor static class methods over namespaced functions.
Also refactor the namespace 'file_stream_utils' methods to be static
methods in the newly created class 'FileUtils'. This is part of
the effort to favor static class methods over namespaced functions.
Also refactor the namespace 'string_splitter' methods to be static
methods in the newly created class 'StringUtils'. This is part of
the effort to favor static class methods over namespaced functions.