├── .gitignore
├── PERFORMANCE.md
├── README.md
├── README_ORDER_ENTRY.md
├── doc
├── Images
│ ├── MarketApplication.png
│ └── MarketApplication.svg
└── settAug2013
│ ├── images
│ ├── Left.png
│ ├── Middle.png
│ ├── OCILogo.png
│ ├── Right.png
│ └── SETT.png
│ ├── liquibook_sett.html
│ ├── settAug2013_files
│ ├── ExampleExchange.png
│ ├── Exchange.png
│ ├── ExchangeUML.png
│ ├── OrderBookUML.png
│ └── paper.css
│ └── styles
│ └── SETT.css
├── env.sh
├── examples
├── .gitignore
├── depth_feed_publisher
│ ├── .gitignore
│ ├── asio_safe_include.h
│ ├── depth_feed_connection.cpp
│ ├── depth_feed_connection.h
│ ├── depth_feed_publisher.cpp
│ ├── depth_feed_publisher.h
│ ├── depth_feed_publisher.mpc
│ ├── depth_feed_subscriber.cpp
│ ├── depth_feed_subscriber.h
│ ├── example_order_book.cpp
│ ├── example_order_book.h
│ ├── exchange.cpp
│ ├── exchange.h
│ ├── order.cpp
│ ├── order.h
│ ├── publisher_main.cpp
│ ├── sleep.h
│ ├── subscriber_main.cpp
│ ├── template_consumer.cpp
│ ├── template_consumer.h
│ └── templates
│ │ ├── ComplexTemplates.xml
│ │ ├── Simple.xml
│ │ └── depth.xml
└── mt_order_entry
│ ├── Market.cpp
│ ├── Market.h
│ ├── Order.cpp
│ ├── Order.h
│ ├── OrderFwd.h
│ ├── TestOneAonBidTwoAsk.script
│ ├── Util.cpp
│ ├── Util.h
│ ├── mt_order_entry.mpc
│ ├── mt_order_entry_main.cpp
│ ├── order_entry.script
│ └── teststoporders.script
├── license.txt
├── liquibook.features
├── liquibook.mwc
├── mpc.bat
├── mpc
├── liquibook.mpb
├── liquibook_book.mpb
├── liquibook_exe.mpb
├── liquibook_lib.mpb
├── liquibook_simple.mpb
└── liquibook_test.mpb
├── noQuickFAST
└── QuickFASTApplication.mpb
├── pt_run.bat
├── src
├── book
│ ├── bbo_listener.h
│ ├── callback.h
│ ├── comparable_price.h
│ ├── depth.h
│ ├── depth_constants.h
│ ├── depth_level.h
│ ├── depth_listener.h
│ ├── depth_order_book.h
│ ├── liquibook.mpc
│ ├── logger.h
│ ├── main.cpp
│ ├── order.h
│ ├── order_book.h
│ ├── order_book_listener.h
│ ├── order_listener.h
│ ├── order_tracker.h
│ ├── trade_listener.h
│ ├── types.h
│ └── version.h
├── liquibook_export.h
└── simple
│ ├── liquibook_simple.mpc
│ ├── simple_order.cpp
│ ├── simple_order.h
│ └── simple_order_book.h
├── test
├── .gitignore
├── latency
│ ├── clock_gettime.h
│ ├── liquibook_latency.mpc
│ └── lt_order_book.cpp
├── perf
│ ├── liquibook_perf.mpc
│ └── pt_order_book.cpp
└── unit
│ ├── changed_checker.h
│ ├── depth_check.h
│ ├── liquibook_unit.mpc
│ ├── ut_all_or_none.cpp
│ ├── ut_bbo_order_book.cpp
│ ├── ut_depth.cpp
│ ├── ut_immediate_or_cancel.cpp
│ ├── ut_listeners.cpp
│ ├── ut_main.cpp
│ ├── ut_market_price.cpp
│ ├── ut_order_book.cpp
│ ├── ut_order_book_shared_ptr.cpp
│ ├── ut_stop_orders.cpp
│ └── ut_utils.h
├── ut_run.bat
├── web
├── css
│ ├── bootstrap-responsive.min.css
│ ├── bootstrap.min.css
│ └── liquibook.css
├── easy.html
├── fast.html
├── flexible.html
├── fluid.html
├── get-started.html
├── img
│ ├── glyphicons-halflings-white.png
│ └── glyphicons-halflings.png
├── index.html
├── js
│ ├── bootstrap.min.js
│ └── jquery-1.9.1.min.js
└── sub-template.html
├── winenv.bat
└── winenv_clear.bat
/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files
2 | *.slo
3 | *.lo
4 | *.o
5 | *.obj
6 | *.iobj
7 |
8 | # Compiled Dynamic libraries
9 | *.so
10 | *.dylib
11 | *.dll
12 |
13 | # Compiled Static libraries
14 | *.lai
15 | *.la
16 | *.a
17 | *.lib
18 | lib/
19 |
20 | # Compiled executables
21 | *.exe
22 | /bin
23 | /Output
24 |
25 | Makefile*
26 | .depend*
27 | *.sln
28 | make
29 |
30 | # Artifacts
31 | *.swp
32 |
33 | #visual studio work files
34 | *vcproj*
35 | *vcxproj*
36 | Debug
37 | Release
38 | *.pdb
39 | *.ipdb
40 | *.ilk
41 | .vs/
42 | *.VC.*
43 |
44 | # test output files
45 | *.log
46 |
47 | #helper/customized commands
48 | # (use single letter names and don't add to repo)
49 | ?.cmd
50 | ?.bat
51 |
52 | #a place to hide documents that should not go into the repo:
53 | doc/NotGitWorthy/
54 |
--------------------------------------------------------------------------------
/PERFORMANCE.md:
--------------------------------------------------------------------------------
1 | Performance Test Results, Inserts Per Second
2 | ============================================
3 | (newest results on top)
4 |
5 |
6 |
7 | 5 Level Depth |
8 | BBO Only |
9 | Order Book Only |
10 | Note |
11 |
12 |
13 | 2,062,158 |
14 | 2,139,950 |
15 | 2,494,532 |
16 | Now testing on a modern laptop (2.4 GHZ i7). |
17 |
18 |
19 | 1,231,959 |
20 | 1,273,510 |
21 | 1,506,066 |
22 | Handling all or none order condition. |
23 |
24 |
25 | 1,249,544 |
26 | 1,305,482 |
27 | 1,531,998 |
28 | Remove callbacks_added method. Caller can invoke equivalent if necessary. |
29 |
30 |
31 | 1,222,000 |
32 | 1,279,711 |
33 | 1,495,714 |
34 | Use vector for callback container. |
35 |
36 |
37 | 1,250,616 |
38 | 1,264,227 |
39 | 1,463,738 |
40 | Union in callback. For clarity of purpose, not for performance. |
41 |
42 |
43 | 1,267,135 |
44 | 1,270,188 |
45 | 1,469,246 |
46 | Combine 2 fill callbacks into one. |
47 |
48 |
49 | 1,233,894 |
50 | 1,237,154 |
51 | 1,434,354 |
52 | Store excess depth levels in depth to speed repopulation. |
53 |
54 |
55 | 58,936 |
56 | 153,839 |
57 | 1,500,874 |
58 | Removed spuroious insert on accept of completely filled order. |
59 |
60 |
61 | 38,878 |
62 | 124,756 |
63 | 1,495,744 |
64 | Initial run with all 3 tests. |
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/doc/Images/MarketApplication.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enewhuis/liquibook/2427613b32f1667abae68a01df6af9ba8270f8e7/doc/Images/MarketApplication.png
--------------------------------------------------------------------------------
/doc/settAug2013/images/Left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enewhuis/liquibook/2427613b32f1667abae68a01df6af9ba8270f8e7/doc/settAug2013/images/Left.png
--------------------------------------------------------------------------------
/doc/settAug2013/images/Middle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enewhuis/liquibook/2427613b32f1667abae68a01df6af9ba8270f8e7/doc/settAug2013/images/Middle.png
--------------------------------------------------------------------------------
/doc/settAug2013/images/OCILogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enewhuis/liquibook/2427613b32f1667abae68a01df6af9ba8270f8e7/doc/settAug2013/images/OCILogo.png
--------------------------------------------------------------------------------
/doc/settAug2013/images/Right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enewhuis/liquibook/2427613b32f1667abae68a01df6af9ba8270f8e7/doc/settAug2013/images/Right.png
--------------------------------------------------------------------------------
/doc/settAug2013/images/SETT.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enewhuis/liquibook/2427613b32f1667abae68a01df6af9ba8270f8e7/doc/settAug2013/images/SETT.png
--------------------------------------------------------------------------------
/doc/settAug2013/settAug2013_files/ExampleExchange.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enewhuis/liquibook/2427613b32f1667abae68a01df6af9ba8270f8e7/doc/settAug2013/settAug2013_files/ExampleExchange.png
--------------------------------------------------------------------------------
/doc/settAug2013/settAug2013_files/Exchange.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enewhuis/liquibook/2427613b32f1667abae68a01df6af9ba8270f8e7/doc/settAug2013/settAug2013_files/Exchange.png
--------------------------------------------------------------------------------
/doc/settAug2013/settAug2013_files/ExchangeUML.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enewhuis/liquibook/2427613b32f1667abae68a01df6af9ba8270f8e7/doc/settAug2013/settAug2013_files/ExchangeUML.png
--------------------------------------------------------------------------------
/doc/settAug2013/settAug2013_files/OrderBookUML.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enewhuis/liquibook/2427613b32f1667abae68a01df6af9ba8270f8e7/doc/settAug2013/settAug2013_files/OrderBookUML.png
--------------------------------------------------------------------------------
/doc/settAug2013/settAug2013_files/paper.css:
--------------------------------------------------------------------------------
1 | .listing, .figure {
2 | font-weight: bold;
3 | font-size: .9em;
4 | }
5 | .listing {
6 | margin-bottom: -16px;
7 | }
8 |
--------------------------------------------------------------------------------
/doc/settAug2013/styles/SETT.css:
--------------------------------------------------------------------------------
1 | body {
2 | color: rgb(0, 0, 0);
3 | background-color: rgb(255, 255, 255);
4 | font-family: Verdana, sans-serif;
5 | margin-left: 0.25in;
6 | margin-right: 0.25in;
7 | min-width: 800px;
8 | }
9 |
10 | .header {
11 | float: left;
12 | width: 100%;
13 | }
14 |
15 | .left {
16 | float: left;
17 | }
18 |
19 | .right {
20 | float: right;
21 | }
22 |
23 | .lower_header {
24 | height: 34px;
25 | float: left;
26 | width: 100%;
27 | border-top: 1px solid lightgrey;
28 | border-bottom: 1px solid lightgrey;
29 | margin-bottom: 25px;
30 | }
31 |
32 | .social {
33 | margin-top: 6px;
34 | }
35 |
36 | span.rssRow {
37 | margin: 33px;
38 | background:transparent url(../images/rss_icon_12x12.gif) no-repeat scroll 0;
39 | padding-left:18px;
40 | }
41 |
42 | .headimage_container {
43 | position: relative;
44 | float: left;
45 | width: 100%;
46 | background: url('../images/Middle.png') repeat-x 35px;
47 | height: 123px;
48 | }
49 |
50 | .headerimage_leftlogo {
51 | position: absolute;
52 | left: 0;
53 | top: 0;
54 | background-color: white;
55 | width: 180px;
56 | height: 123px;
57 | }
58 |
59 | .headimage_left {
60 | position: absolute;
61 | background-color: white;
62 | top: 33px;
63 | left: 180px;
64 | width: 10px;
65 | }
66 |
67 | .headimage_right {
68 | position: absolute;
69 | background-color: white;
70 | width: 278px;
71 | right: 0;
72 | margin-top: 33px;
73 | }
74 |
75 | a.career {
76 | font-weight: bold;
77 | }
78 |
79 | code {
80 | font-family: "Courier New", monospace;
81 | }
82 |
83 | div.center {
84 | text-align: center;
85 | }
86 |
87 | h1 {
88 | text-align: center;
89 | }
90 |
91 | h2 {
92 | text-align: left;
93 | }
94 |
95 | h3 {
96 | text-align: left;
97 | }
98 |
99 | h4 {
100 | text-align: left;
101 | }
102 |
103 | h5 {
104 | text-align: left;
105 | }
106 |
107 | hr {
108 | height: 1px;
109 | color: rgb(17, 59, 86);
110 | background-color: transparent;
111 | }
112 |
113 | kbd {
114 | font-family: "Courier New", monospace;
115 | }
116 |
117 | p {
118 | text-align: justify;
119 | }
120 |
121 | p.author {
122 | text-align: center;
123 | }
124 |
125 | p.footer {
126 | text-align: justify;
127 | }
128 |
129 | pre {
130 | font-family: "Courier New", monospace;
131 | }
132 |
133 | .quicklinks {
134 | text-align: right;
135 | }
136 |
137 | .red {
138 | color: rgb(255, 0, 0);
139 | background-color: rgb(255, 255, 255);
140 | }
141 |
142 | .green {
143 | color: rgb(0, 128, 0);
144 | background-color: rgb(255, 255, 255);
145 | }
146 |
147 | .blue {
148 | color: rgb(0, 0, 192);
149 | background-color: rgb(255, 255, 255);
150 | }
151 |
152 | .code {
153 | background-color: #FFFFF0;
154 | border: dashed black 1px;
155 | padding-left: 10px;
156 | }
157 |
158 | .comment {
159 | color: rgb(128, 128, 128);
160 | font-weight: normal;
161 | font-style: italic;
162 | }
163 |
164 |
--------------------------------------------------------------------------------
/env.sh:
--------------------------------------------------------------------------------
1 | SOURCE="${BASH_SOURCE[0]}"
2 | SOURCE_DIR=`dirname $SOURCE`
3 |
4 | if test "$LIQUIBOOK_ROOT" = ""; then
5 | READLINK='readlink'
6 | $READLINK --version >/dev/null 2>/dev/null
7 | if (( $? != 0 )); then
8 | echo "readlink does not exist or it does not support --version"
9 | echo "maybe it is not GNU readlink but BSD"
10 | echo "trying with greadlink..."
11 | READLINK='greadlink'
12 | fi
13 | $READLINK --version >/dev/null 2>/dev/null
14 | if (( $? != 0 )); then
15 | echo "greadlink does not exist or an error occurred"
16 | UNAME=`uname`
17 | if [[ $UNAME == "Darwin" ]]; then
18 | echo "You are running on a Mac OSX system."
19 | echo "Consider installing homebrew."
20 | echo "Then install coreutils."
21 | echo "# brew install coreutils"
22 | fi
23 | else
24 | echo "$READLINK found at `which $READLINK`."
25 | fi
26 | $READLINK -f $SOURCE_DIR
27 | if (( $? != 0 )); then
28 | echo "trying exporting LIQUIBOOK_ROOT by pwd."
29 | export LIQUIBOOK_ROOT=`pwd`
30 | echo "LIQUIBOOK_ROOT = $LIQUIBOOK_ROOT"
31 | else
32 | export LIQUIBOOK_ROOT=`$READLINK -f $SOURCE_DIR`
33 | fi
34 | fi
35 |
36 | if test "$QUICKFAST_ROOT" == ""; then
37 | export QUICKFAST_ROOT=`pwd`/noQuickFAST
38 | echo QuickFAST support disabled
39 | fi
40 |
41 | if test "$BOOST_VERSION" = ""; then
42 | echo Please export BOOST_VERSION, and BOOST_CFG
43 | echo you can also set BOOST_ROOT if it is not /usr/boost/BOOST_VERSION
44 | else
45 | if test "$BOOST_ROOT" = ""; then
46 | export BOOST_ROOT=/usr/boost/$BOOST_VERSION
47 | fi
48 | if test "$BOOST_ROOT_LIB" = ""; then
49 | export BOOST_ROOT_LIB=$BOOST_ROOT/lib
50 | fi
51 | if test "$BOOST_CFG" = ""; then
52 | export BOOST_CFG=-gcc62-mt-1_63
53 | fi
54 | if test "$BOOST_STATIC_LIB_PREFIX" = ""; then
55 | export BOOST_STATIC_LIB_PREFIX=
56 | fi
57 | fi
58 |
59 | LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LIQUIBOOK_ROOT/lib
60 | # CIAO is not used, set so MPC does not give warning
61 | export CIAO_ROOT=/dev/null
62 |
--------------------------------------------------------------------------------
/examples/.gitignore:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/examples/depth_feed_publisher/.gitignore:
--------------------------------------------------------------------------------
1 | depth_feed_publisher
2 | depth_feed_subscriber
3 |
--------------------------------------------------------------------------------
/examples/depth_feed_publisher/asio_safe_include.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012 - 2017 Object Computing, Inc.
2 | // All rights reserved.
3 | // See the file license.txt for licensing information.
4 | #pragma once
5 | #ifdef _WIN32
6 | // Set the proper SDK version before including boost/Asio
7 | # include