Compare commits
3 commits
5f5503a4a8
...
6fc5502b99
Author | SHA1 | Date | |
---|---|---|---|
Bruno BELANYI | 6fc5502b99 | ||
Bruno BELANYI | a681671efa | ||
Bruno BELANYI | ea8c880cca |
14
README.md
14
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
|
||||
|
||||
|
|
2
data/inputs/matching-asking-price-2.in.csv
Normal file
2
data/inputs/matching-asking-price-2.in.csv
Normal file
|
@ -0,0 +1,2 @@
|
|||
N,1,IBM,8,100,S,101
|
||||
N,2,IBM,10,100,B,102
|
|
2
data/inputs/matching-asking-price.in.csv
Normal file
2
data/inputs/matching-asking-price.in.csv
Normal file
|
@ -0,0 +1,2 @@
|
|||
N,1,IBM,10,100,B,101
|
||||
N,2,IBM,8,100,S,102
|
|
2
data/inputs/matching.in.csv
Normal file
2
data/inputs/matching.in.csv
Normal file
|
@ -0,0 +1,2 @@
|
|||
N,1,IBM,10,100,B,101
|
||||
N,2,IBM,10,100,S,102
|
|
2
data/invalid/matching-remaining-quantity-ask.csv
Normal file
2
data/invalid/matching-remaining-quantity-ask.csv
Normal file
|
@ -0,0 +1,2 @@
|
|||
N,1,IBM,8,100,S,101
|
||||
N,2,IBM,10,50,B,102
|
|
2
data/invalid/matching-remaining-quantity-bid.csv
Normal file
2
data/invalid/matching-remaining-quantity-bid.csv
Normal file
|
@ -0,0 +1,2 @@
|
|||
N,1,IBM,8,50,S,101
|
||||
N,2,IBM,10,100,B,102
|
|
3
data/outputs/matching-asking-price-2.out.csv
Normal file
3
data/outputs/matching-asking-price-2.out.csv
Normal file
|
@ -0,0 +1,3 @@
|
|||
A,1,101
|
||||
B,S,8,100
|
||||
R,2,102
|
|
5
data/outputs/matching-asking-price-2.trades.out.csv
Normal file
5
data/outputs/matching-asking-price-2.trades.out.csv
Normal file
|
@ -0,0 +1,5 @@
|
|||
A,1,101
|
||||
B,S,8,100
|
||||
A,2,102
|
||||
T,2,102,1,101,8,100
|
||||
B,S,-,-
|
|
3
data/outputs/matching-asking-price.out.csv
Normal file
3
data/outputs/matching-asking-price.out.csv
Normal file
|
@ -0,0 +1,3 @@
|
|||
A,1,101
|
||||
B,B,10,100
|
||||
R,2,102
|
|
5
data/outputs/matching-asking-price.trades.out.csv
Normal file
5
data/outputs/matching-asking-price.trades.out.csv
Normal file
|
@ -0,0 +1,5 @@
|
|||
A,1,101
|
||||
B,B,10,100
|
||||
A,2,102
|
||||
T,1,101,2,102,8,100
|
||||
B,B,-,-
|
|
3
data/outputs/matching.out.csv
Normal file
3
data/outputs/matching.out.csv
Normal file
|
@ -0,0 +1,3 @@
|
|||
A,1,101
|
||||
B,B,10,100
|
||||
R,2,102
|
|
5
data/outputs/matching.trades.out.csv
Normal file
5
data/outputs/matching.trades.out.csv
Normal file
|
@ -0,0 +1,5 @@
|
|||
A,1,101
|
||||
B,B,10,100
|
||||
A,2,102
|
||||
T,1,101,2,102,10,100
|
||||
B,B,-,-
|
|
Loading…
Reference in a new issue