From 6fc5502b99bdb1449ca5ab9459d090cc9a01702d Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sun, 13 Mar 2022 18:01:50 +0100 Subject: [PATCH] doc: talk about improvements to matching --- README.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4e69a88..1ed73d8 100644 --- a/README.md +++ b/README.md @@ -87,10 +87,18 @@ displays its output as it comes along), etc... The logic used when trade matching is enabled is pretty limited: it wasn't clear to me what to do when either of the orders have left-over quantities to be fulfilled. More explicit instructions on this point would lead to the removal of -the final `FIXME`s in the code. +the final `FIXME`s and `assert`s in the code. + +I have added explicit test files of those cases in `data/invalid`. + +##### Picking prices + +Another improvement that is specific to trade matching would be scripting the +behaviour when bid/ask prices are not exactly equal when matching trades: the +current behaviour is to always use the asking price. One could imagine wanting +to use bid price, or crossing order +price, or the average (weighted by quantity?) of both prices, etc... -Related to that point, the matching functionality should be tested further, -rather than just using the two provided examples. #### Cancelling orders