Compare commits

...
Author SHA1 Message Date
John Colvin b95da40fec feat: Impl synthetic book 2022-11-28 10:42:05 -05:00
John Colvin 755f841a6e refactor: Change spreader leg qty to int
The synth book computation code doesn't support doubles
2022-11-25 13:20:34 -05:00
John Colvin 2d10c94b69 chore: Make csharp code compatible with net471, lang version 7 2022-11-25 13:20:33 -05:00
John Colvin dfc5fcc16a fix build (client): Change 'WIN32' macros to '_WIN32'
Not sure exactly how this broke, but the WIN32 macro is no longer defined.
2022-11-20 14:22:42 -05:00
Taha Afzal 864e2a3edc Comments 2022-11-10 07:18:42 -05:00
Taha Afzal b9142202e0 UI code complete 2022-11-09 23:13:16 -05:00
Taha Afzal 7353a6dc3c Added get_data() to LegControl.cs 2022-11-08 23:26:10 -05:00
Taha Afzal b55eecc8b9 Eagle front end 2022-11-06 18:52:38 -05:00
Taha Afzal 3f0078d582 Added sample test 2022-05-09 23:08:59 -04:00
Taha Afzal e47186f0fd Fixing tests 2022-05-08 22:47:10 -04:00
Taha Afzal 4b92292fa1 Pushed a sample test 2022-05-04 09:31:09 -04:00
Taha Afzal 3a8125bba3 Namespace changes and moving all shared files to spreader_order directory 2022-05-02 23:27:30 -04:00
Taha Afzal 0b14bd1ca3 ChildOrder changed to bts::spreader::ChildOrder 2022-05-01 12:41:39 -04:00
Taha Afzal 63252b017b Cleaning up the moved events 2022-04-30 22:31:37 -04:00
Taha Afzal df1efb2295 Moving events to bts::spreader 2022-04-29 18:19:29 -04:00
Taha Afzal 3f37777eb9 'Moved' book and accompaying classes over 2022-04-29 00:21:34 -04:00
Taha Afzal 04629f28e8 Removing SpreaderOrder's inheritence from Order 2022-04-26 23:35:43 -04:00
Taha Afzal 47c4d8c4a7 Order is being routed to IOrderGateway 2022-04-26 00:40:17 -04:00
Taha Afzal eb87ebcfa1 Removed IAlternateOrderGateway, fixing tests now 2022-04-24 22:21:02 -04:00
Taha Afzal 195fd11e2e IOrderGateway accessor added to ISpreaderManager 2022-04-24 15:45:35 -04:00
Taha Afzal 413c24d147 Completed LegOrderRouter, which will be used by SpreaderChildOrderState to send orders 2022-04-24 01:18:58 -04:00
Taha Afzal fe4be118ee Adding LegOrderRouter 2022-04-24 00:16:09 -04:00
Taha Afzal 7ff09902b8 IOrderGateway::report_spreader_state takes an bts::integration::OrderUpdate now 2022-04-23 21:53:17 -04:00
Taha Afzal f90e41ea65 Moved the new interface, types into their own files 2022-04-20 23:58:05 -04:00
Taha Afzal ff2546da56 Adding function that returns OrderDef to ISpreaderManager 2022-04-20 21:46:45 -04:00
Taha Afzal f7426d9f0f All tests moved to use SpreaderWrapper 2022-04-18 23:43:06 -04:00
Taha Afzal 36bbcf849c More tests for SpreaderWrapper 2022-04-18 22:43:19 -04:00
Taha Afzal bd39d407aa More spreader tests pass 2022-04-17 23:57:07 -04:00
Taha Afzal 81dde8e9df Moving tests over to use SpreaderWrapper instead of SpreaderOrder 2022-04-17 18:48:51 -04:00
Taha Afzal 3f4a4fbac8 The 3 wrappers SpreaderOrderBuilder, SpreaderOrderServices and SpreaderPreActivationOrderServices do not call into the Spark infrastructure any more 2022-04-17 15:08:56 -04:00
Taha Afzal 2e6676b151 Added Spreader Wrapper 2022-04-16 23:55:39 -04:00
taha afzal f650ff3ccf Modfified IEMOrderMux interface 2022-04-16 20:38:02 -04:00
taha afzal b2640d2203 Updading interface for Emumba 2.2.5 2022-04-16 00:54:03 -04:00
taha afzal c3b05d27f1 EMNativeOrders clean up (this is partially done, reporting and limiter reporting needs cleaning up) 2022-04-15 01:22:51 -04:00
taha afzal 9b3a706328 Cleaned up EMExecutionGateway 2022-04-13 17:16:03 -04:00
taha afzal 290392553e EMNativeOrder does not mark all recovered orders as errors 2022-04-13 17:16:03 -04:00
taha afzal 07838553a6 Added Exchange Positions stream to OrderService 2022-04-13 17:16:03 -04:00
taha afzal 824ce8b172 ExchangePosition routed all the way to OrderServer 2 2022-04-13 17:16:03 -04:00
taha afzal 6ecccdee7f Routing ExchangePosition to OrderServiceServer 2022-04-13 17:16:03 -04:00
taha afzal 96d58942d0 Added all open orders query to IEMOrderMuxer 2022-04-13 17:16:03 -04:00
taha afzal 9c33405383 Added position enquiry function to (and asycn callback) to IEMOrderMuxer 2022-04-13 17:16:03 -04:00
taha afzal a8a5fc3672 Stopgap fix for order final state not being reached, by piggybacking on the trades callback 2022-04-13 17:16:03 -04:00
taha afzal 0178716b01 Orders API now supports fractional quantites 2022-04-13 17:16:03 -04:00
John Colvin 9c6327160d fix: Set response-success to true in delete report
Bugs (fixed):
   * When a report is successfully deleted, the response from the server
   indicates failure
2022-04-08 12:37:58 -04:00
Taha Afzal 5975e1bfb1 Adding algo dropdown to the ladder for options 2022-03-31 14:58:13 -04:00
taha afzal 5a0c70c301 Removing some unused protos 2022-03-31 14:57:40 -04:00
taha afzal b21c6f45b7 Putting Deribit securities in config 2022-03-31 14:34:29 -04:00
taha afzal 73596546bf Moving Deribit symbols from SIM to Deribit 2022-03-31 14:34:29 -04:00
taha afzal 6bf83c9e72 Removing the temporary file based order entry mechanism in EmMDListener 2022-03-31 14:34:29 -04:00
taha afzal 9385176bb5 Cleaning up IEMOrderMuxer 2022-03-31 14:34:29 -04:00
taha afzal 64240c5f3b Deribit orders (mostly) work 2022-03-31 14:34:29 -04:00
taha afzal 32c4d05106 NativeOrder and ExecutionGateway for EM via Deribit 2022-03-31 14:34:29 -04:00
taha afzal 65afb81f33 Added an order interactor that can read fro the file and secd/update/cancel orders 2022-03-31 14:34:29 -04:00
John Colvin 21a4673a1f Fix typos in ReportParams pbuf 2022-03-21 13:11:59 -04:00
Taha Afzal 03c13e37db Time calculation now considers time of expiration, however the time to expire is hard coded for Deribit options 2022-03-06 21:23:45 -05:00
taha afzal e8dfbe1d01 AnalyticsServiceServer's archive vol request now respects the symbol in the arguments 2022-03-04 19:01:51 -05:00
Taha Afzal cd576793f7 Straddle is normalized for the fwd 2022-03-03 22:36:24 -05:00
Taha Afzal 736cb21e4d Changed the tag/data to request archived vols 2022-03-03 16:25:05 -05:00
Taha Afzal d32efe90b9 Changed the ArchivedVol Request type to match the service call type 2022-03-03 16:25:05 -05:00
Taha Afzal f873675628 VolSurfaceUsage and Sheet launch hard coded value changes for ETH 2022-03-03 16:25:05 -05:00
Taha Afzal 65cb5e434b VolSurface Usage cleaning up 2022-03-03 16:25:05 -05:00
Taha Afzal 272fd35699 Archived vols now contains the SecTups that are part of the vols 2022-03-03 16:25:05 -05:00
Taha Afzal 838546b497 Saving vols with vol change and showing vol change in sheets 2022-03-03 16:25:05 -05:00
Taha Afzal a17fcb50c4 Adding call to save theos 2022-03-03 16:25:04 -05:00
John Colvin 70def3ce72 Multiply delta and vol by 100 in time/sales ui 2022-03-03 15:24:26 -06:00
John Colvin 627d307781 Split time/sales 'Edge' col into Buy/Sell Edge cols 2022-03-03 15:24:21 -06:00
John Colvin b96cdafc71 fix: Divide theo & delta by driver to normalize them
Bugs (fixed):
   * Theo and delta are wrong in time/sales
2022-03-03 11:39:40 -05:00
John Colvin f9f6fa6233 fix: Prevent time/sales vertical scrollbar clipping 2022-03-02 23:27:01 -05:00
John Colvin d8dd9ce4a2 Skip hidden cols when computing time/sales win width 2022-03-02 23:27:01 -05:00
John Colvin 07a349e0d2 refactor: Clean up TimeAndSalesWindow/Factory 2022-03-02 23:27:01 -05:00
John Colvin 65e23373cd Init grid settings in TimeAndSales default settings 2022-03-02 23:27:00 -05:00
John Colvin 6698188e00 Allow null 'can execute' delegate in SparkCommand.create 2022-03-02 23:27:00 -05:00
John Colvin 0242d964b2 feat: Add greeks to Time/Sales 2022-03-02 23:27:00 -05:00
John Colvin c1d2fc6ead Add IReadOnlyList wrapper impl for IList
Useful for lazily preserving the Count/indexer features when converting
IList to IReadOnlyList
2022-03-02 23:17:43 -05:00
John Colvin 74bb094582 Filter out empty updates in trades IObservable 2022-03-02 23:17:43 -05:00
John Colvin 9e14595458 Add fn to merge IObservable trades with greeks
Also clean up up TradesSource a bit
2022-03-02 23:17:43 -05:00
John Colvin fdb90a689a refactor: Clean up TimeAndSalesSettings
* Use new lang feats
* Run formatter
2022-03-02 23:17:43 -05:00
John Colvin a1b3fbf3e9 refactor: Clean up TimeAndSalesVM
* Use new lang feat feats
* Run formatter
2022-03-02 23:17:43 -05:00
John Colvin fccaa23d1f refactor: Rename TimeAndSalesView.Columns -> TimeAndSalesColumnType 2022-03-02 23:17:43 -05:00
John Colvin df789fed2e refactor: Don't copy trade_key in TimeAndSalesRowVM 2022-03-02 23:17:43 -05:00
taha afzal c254b982a2 Removing the hardcoded BTC 2022-03-02 18:38:36 -05:00
taha afzal 78adea7bcb Added SecTup to VolSurfaceUsage 2022-03-02 13:59:45 -05:00
John Colvin 5085874b86 fix: Invalidate DIYGrid row view in Loaded callback
Bugs (fixed):
   * Some grids are showing blank rows (esp Time/Sales, mview)
2022-03-01 16:58:05 -05:00
John Colvin 8631b85e42 style: Add documentation to ConnectableObservableSelector 2022-03-01 16:58:05 -05:00
taha afzal f9449f5fa6 Implemented get_archived_theos in AnalyticsServiceServer 2022-02-28 19:29:55 -05:00
taha afzal 0cef0ce4e5 Merge branch 'spark_crypto' of bitbucket.org:bluetradesys/spark into spark_crypto 2022-02-28 14:36:43 -05:00
taha afzal bac62f99ea in AnalyticsService ArchiveTheo now has the key istead of the Security 2022-02-28 14:36:27 -05:00
John Colvin 017a788933 refactor: Clean up Ladder
* Create an official LadderWindow class (previously, ladder windows were
  instantiated as `AnonymousShellWindow`s in a terse, hard-to-read creation fn)
* Run formatter
2022-02-28 14:29:12 -05:00
John Colvin 224b518a60 fix: Set width/height for new shell windows
Bugs (fixed):
   * The ladders open tiny like the tiny balls (in vs graph)
2022-02-28 14:29:12 -05:00
John Colvin f98f6380c4 Add ThreadSafeEvent and SpinLockExtensions 2022-02-28 14:29:12 -05:00
John Colvin 9a8b156443 Add observe_title fn to ShellWindowBase
This impl handles some tricky threading issues
2022-02-28 14:29:12 -05:00
John Colvin a269b8efe1 Fix duplicate protomember ids in UserSettings 2022-02-28 14:29:12 -05:00
John Colvin b609a290db Add nifty IObservable KeyResolver util 2022-02-28 14:29:12 -05:00
John Colvin ccdc033c60 build (client): Activate py venv before generating cpp protos
Finally, the client can be built from a shell outside of the venv
2022-02-28 14:21:31 -05:00
John Colvin ed864cae5d style: Format cmake files 2022-02-28 14:21:31 -05:00
John Colvin 1dec925c73 Fix typo in 'ticks-per-row' rounding logic for ladder 2022-02-28 14:21:31 -05:00
John Colvin 9c5856f247 Link against 'fmtd' if building debug 2022-02-28 14:21:31 -05:00
John Colvin 024572c35c Update externals to get openssl and fmt release lib fixes 2022-02-28 14:21:30 -05:00
John Colvin 4e6ae49f26 style: Remove old/useless comments in spark_sdk.csproj 2022-02-28 14:21:30 -05:00
John Colvin 1aa57a2f6f Fix typo net471 -> net5.0 in spark_sdk.csproj 2022-02-28 14:21:30 -05:00
John Colvin 33e2f4b6ff build: Use appropriate debugtype arg for debug/release 2022-02-28 14:21:30 -05:00
taha afzal 44603c0b4c Merge branch 'spark_crypto' of bitbucket.org:bluetradesys/spark into spark_crypto 2022-02-28 13:30:09 -05:00
taha afzal f9c79d5b44 Added vol/theo archiving to AnalyticsService 2022-02-28 13:29:57 -05:00
Taha Afzal 771258eeb7 Merge branch 'spark_crypto' of bitbucket.org:bluetradesys/spark into spark_crypto 2022-02-28 09:05:21 -05:00
Taha Afzal d37e82d200 Exp Params' old exps are deleted at save time 2022-02-28 09:05:10 -05:00
taha afzal fb2fd21417 Merge branch 'spark_crypto' of bitbucket.org:bluetradesys/spark into spark_crypto 2022-02-26 23:06:19 -05:00
taha afzal 98362c7eb9 Fixing the deribit connection drop issue 2022-02-26 23:05:47 -05:00
Taha Afzal 128bc3c391 Fixing the crash with expired drivers 2022-02-24 15:36:23 -05:00
John Colvin c294406934 dev/john: Update/format docker scripts 2022-02-23 15:07:50 -06:00
John Colvin 3825ce80eb dev/john: Update repo path in johns docker 2022-02-23 15:05:12 -06:00
John Colvin 01d6731929 dev/john: Cleanup (and fix) setup_builds.fish 2022-02-23 15:05:12 -06:00
John Colvin dff088fe37 Fix typo in include directive
Must have missed this in the protobuf-cleanup commit,
884a79e13a
2022-02-23 15:05:12 -06:00
Taha Afzal 2c4a203109 Bug with saving exp params 2022-02-21 23:59:02 -05:00
John Colvin c1b717d8de refactor: Split ScatterSeries color into 'fill' and stroke'
Previously, 'color' was simply an alias for 'fill.'  The new stroke property
provides some useful functionality, as it:
   * can can be used to set the marker shape's outline color
   * makes it possible to use 3 marker shapes that were thought to be broken
     (Cross, Plus, and Star). These shapes were never actually broken, they
     were merely invisible because they were colored [only] with the stroke
     property
2022-02-21 14:46:16 -05:00
John Colvin 5fb5a67210 style (ui): Make implied vol balls bigger 2022-02-21 14:24:46 -05:00
John Colvin 72ca24de18 refactor: Remove unused ctr from ScatterSeriesSettings 2022-02-21 13:46:10 -05:00
John Colvin dbb3cfc7cc refactor: Post exp params to bus in an ImmutableList
Previously, they were posted in an IEnumerable and thus created lazily.
which seemed ill-advised as the bus is multithreaded
2022-02-21 13:17:45 -05:00
John Colvin 2229abdc36 fix: Set vs window title to vs name in main win
Was only doing this in the 'dummy' window before
2022-02-21 12:58:25 -05:00
John Colvin 552836eafc style (ui): Add some padding around cells in vs grid 2022-02-21 12:00:56 -05:00
John Colvin 17af19661c fix: Never insert duplicate columns in vs grid
Bugs (fixed):
   * Volsurface window crashes sometimes when columns are changing
2022-02-21 12:00:56 -05:00
Taha Afzal 6bd2d9cd90 Fixing the build 2022-02-21 11:24:59 -05:00
Taha Afzal d5c3c64a18 Merge branch 'spark_crypto' of bitbucket.org:bluetradesys/spark into spark_crypto 2022-02-21 11:11:18 -05:00
Taha Afzal f27fa7de8e Merge branch 'spark_crypto' of bitbucket.org:bluetradesys/spark into spark_crypto 2022-02-21 11:10:32 -05:00
Taha Afzal f568691731 Adding report API to analytics server 2022-02-21 11:10:15 -05:00
John Colvin 7506576138 fix: Constrain order ticket header width
Bugs (fixed):
   * Order ticket is not showing the X to dismiss the window
2022-02-21 00:01:07 -05:00
John Colvin 60fa83273c feat (ui): Add graph lines in vs window 2022-02-20 23:12:35 -05:00
John Colvin 0f6ee88075 fix: Load/save all settings props in [vs] AxisVM
Bugs (fixed):
   * When the vs window is restored (with a workspace):
      * Both axes lack titles
      * Values aren't formatted as percentages in y axis
2022-02-20 22:56:36 -05:00
John Colvin 99b1241fdb ui: Add row padding in vs grid 2022-02-20 22:01:24 -05:00
John Colvin 6ffc3d4cad fix: Maintain vs grid row sorting when selected exps change 2022-02-20 22:01:24 -05:00
John Colvin 4b2eda6a24 Add ObservableSortedCollection 'bind' ext fn 2022-02-20 22:01:24 -05:00
John Colvin 1a72533934 diag: Add Trace fn for ToggleButton 2022-02-20 22:01:24 -05:00
John Colvin f539a533e6 ui: Give TLC to exp params window 2022-02-20 22:01:24 -05:00
John Colvin 1e693af08f Add some Tuple ext fns for convenience 2022-02-20 22:01:24 -05:00
John Colvin 7916417b71 Add some IObserver utils/ext fns for convenience 2022-02-20 22:01:24 -05:00
John Colvin 46c38a0ff7 refactor: Clean up CompositeObserver
* Implement IList<IObserver<T>>
* Add static 'create' fns to support template type inference
* Sort members
* Run formatter
2022-02-20 22:01:23 -05:00
John Colvin 9d8f65adc0 Fix typo in ObservableAutoWrapper.connect overload
Previously, it wasn't passing the on_removed param to the other overload
2022-02-20 22:01:23 -05:00
John Colvin 1618784c0f refactor: Remove unused UISettings.proto 2022-02-20 22:01:23 -05:00
John Colvin 6b0f87bd31 ui: Host HeaderContent in ToggleButton in ComboCheckBox
Bugs (fixed):
   * HeaderContent in ComboCheckBox overlaps expander arrow
2022-02-20 22:01:23 -05:00
John Colvin e754ce0ec4 refactor: Begin renaming DelegateCommand to Command
This renaming makes ICommand creation less terse.  For now, leave
DelegateCommand in place, as its references are ubiquitous

TODO: Replace all remaining references to DelegateCommand w/ Command
2022-02-20 22:01:23 -05:00
Taha Afzal 38caa7f892 PNL calculator pushed in 2022-02-17 20:54:15 -05:00
Taha Afzal dd1d9b5df8 Adding slide calculator 2022-02-17 18:41:09 -05:00
Taha Afzal cb8a23c73f Adding combo report classes (1) 2022-02-17 17:38:12 -05:00
Taha Afzal 41a072d4d2 Started importing Risk 2022-02-16 23:32:21 -05:00
Taha Afzal 0905ea8c26 Removing the log in the VolSurfaceMDUnit which wa sporving to be very expensive 2022-02-16 19:41:49 -05:00
Taha Afzal a0ca0e5fd0 Removing more unused TC2 code 2022-02-16 15:48:07 -05:00
Taha Afzal e00015dccf Removing unused TC2 classes 2022-02-16 15:32:34 -05:00
Taha Afzal 865a12213c Theos can optionally be displayed as normalized by fwd 2022-02-16 15:20:42 -05:00
Taha Afzal b779014c13 Order ticket launch, setting for fwd normalized theos (both TC2) 2022-02-16 14:49:50 -05:00
Taha Afzal 4c04a78c79 cleaning unused code in TC2 2022-02-15 21:17:30 -05:00
Taha Afzal 32b769bdaa TC2 settings can now be restored 2022-02-15 18:20:54 -05:00
Taha Afzal 4c507aae4e Merge branch 'spark_crypto' of bitbucket.org:bluetradesys/spark into spark_crypto 2022-02-15 13:03:58 -05:00
John Colvin 8a17adb49d refactor: Overload OnDispatcher w/ Dispatcher param
By default, this param is assigned Dispatcher.CurrentDispatcher. This follows
the overload pattern in SubscribeOnDispatcher
2022-02-15 12:58:52 -05:00
John Colvin 09aeef03a6 fix: Use calling thread's Dispatcher in SubscribeOnDispatcher 2022-02-15 12:56:58 -05:00
John Colvin e020cca9d2 fix: Don't await dispatcher op in OnDispatcher notify impl
Bugs (fixed):
   * Crash on shutdown if OptionsView window is open, due to an unhandled
     TaskAborted exception in the OnDispatcher ext fn
2022-02-15 12:56:57 -05:00
Taha Afzal f86ba4f8fd Removed the expired exps from the sheets 2022-02-15 00:16:24 -05:00
Taha Afzal d6e724a47a Interp'd drivers are now showing in TC2 2022-02-14 23:45:35 -05:00
Taha Afzal a64a794a97 Hiding driver freeze and headers at the top 2022-02-14 20:31:35 -05:00
Taha Afzal 9d5202c49c Default columns visibility is better now 2022-02-14 18:30:02 -05:00
Taha Afzal cea0591a77 Settings were not taking affect when they were being set, Theo Acceptance button hidden 2022-02-14 18:18:19 -05:00
John Colvin 927ee4626e Set vs window title to vs name 2022-02-14 14:31:14 -05:00
John Colvin 47a0649de3 Add OptionsViewWindow (tc2) to MarketShellModule 2022-02-14 14:19:45 -05:00
John Colvin 2a50990849 refactor: Clean up SparkTags 2022-02-14 14:01:52 -05:00
John Colvin 03d89de6b9 Add ShellWindowBase class
This is in anticipation of the special winforms shell window for tc2
(eventually, SparkWindow should derive from this class as well)
2022-02-14 14:01:52 -05:00
John Colvin 884a79e13a refactor: Clean up protobuf files
* Rename files to snake_case (per Google style guide)
  https://developers.google.com/protocol-buffers/docs/style
* Prohibit single line functions in clang-format for proto files
* Run clang-format
2022-02-14 14:01:52 -05:00
John Colvin 47ce487162 refactor: Use IBus to remove vs win (not IWindowManager) 2022-02-14 14:01:51 -05:00
John Colvin 957172f282 refactor: Add 'hide_window' tag so wins can be removed via bus 2022-02-14 14:01:51 -05:00
John Colvin 8d081e0c45 refactor: Clean up shell window infrastructure classes
Cleans up: WindowManager, FloatingWindow, ShellWindowVM, a few IShellModule
implementations

* Sort members
* Use new lang feats
* Make code style more consistent with rest of code base
* Ensure FloatingWindow interactions occur on the Application Dispatcher thread
* Run formatter
2022-02-14 14:01:51 -05:00
John Colvin 991822bede refactor: Rename CheckInvokeAsync to snake_case
Also add documentation
2022-02-14 14:01:51 -05:00
John Colvin 8b7b76a337 refactor: Move vs ui files into new module dir 2022-02-14 14:01:51 -05:00
John Colvin af12d5bba1 refactor: Rename VolSurfaceModule -> AnalyticsModule 2022-02-14 14:01:51 -05:00
John Colvin c2c80271a3 ui (style): Stretch ComboCheckBox Header ContentPresenter
This gives users the ability to control header content alignment via the header
content template (previously it was always aligned Top-Left)
2022-02-14 14:01:51 -05:00
John Colvin 110faefc96 feat: Add axis-fit behavior setting for vs graph 2022-02-14 14:01:51 -05:00
John Colvin 4cf8959b13 ui: Refine vs exp header col style 2022-02-14 14:01:51 -05:00
John Colvin e3b6c9829a diag: Impl ToString for Series(Set)VM 2022-02-14 14:01:50 -05:00
John Colvin ffdd0fcff7 fix: Remove item from vis series when removed from series 2022-02-14 14:01:50 -05:00
John Colvin 527cea74d3 ui: Use Visibility.Collapsed to hide vs r/w cell content
This prevents unneccessary white space as Collapsed visuals, unlike
Hidden ones, don't occupy space
2022-02-14 14:01:50 -05:00
John Colvin 1fcd19c029 refactor: Clean up DIYGrid.HighPerformanceRow 2022-02-14 14:01:50 -05:00
John Colvin 6bf2c297d7 style: Clean up RecycleBin 2022-02-14 14:01:50 -05:00
John Colvin 2489a2ce0c Impl IReadOnlyDictionary in VisualDictionary 2022-02-14 14:01:50 -05:00
John Colvin 6d5e9eb94e style: Use switch expression in vs col view_factory 2022-02-14 14:01:50 -05:00
John Colvin 7ff2850b2d ui (style): Right-align vs grid cell content 2022-02-14 14:01:50 -05:00
John Colvin f70c2d4653 feat: Add grid lines to volsurface ui 2022-02-14 14:01:50 -05:00
John Colvin d7a91bed10 refactor: Clean up DIYGrid super headers 2022-02-14 14:01:49 -05:00
John Colvin f7178f3fa7 fix: Always Invalidate column layout on horizontal scroll
Previously, was only doing this when the [main grid] horizontal scroll
change triggered a similar scroll change in the column headers
2022-02-14 14:01:49 -05:00
John Colvin 77060841cb diag (refactor): Default all params in WPFTracer ctr 2022-02-14 14:01:49 -05:00
John Colvin 701649cb9b diag: Add trace fn for ScrollBar 2022-02-14 14:01:49 -05:00
John Colvin 3a598479fc refactor: Remove redundant event handler 2022-02-14 14:01:49 -05:00
John Colvin 4ca3f6b2f2 refactor: Move DIYGridExtensions into own file 2022-02-14 14:01:49 -05:00
John Colvin f30f0876a9 refactor: Replace DataContextHooks class w/ static fn 2022-02-14 14:01:49 -05:00
John Colvin 5c04f52be9 Don't overwrite shortheader in DIYGrid ctr 2022-02-14 14:01:49 -05:00
John Colvin 0c4cafcf87 Remove unused fns from DIYGridSortHelper 2022-02-14 14:01:49 -05:00
John Colvin d72e9ad2a6 refactor: Add id prop to DIYGridSuperHeader 2022-02-14 14:01:49 -05:00
Taha Afzal c0f7c28bda Deleting mor eunused code 2022-02-14 13:57:36 -05:00
Taha Afzal 511955c173 Removing unused TC2 classes 2022-02-14 13:50:45 -05:00
Taha Afzal 20c914492e NMSheetBBODataSource had a stub for threaded bb compatibility, removing it 2022-02-14 12:56:59 -05:00
Taha Afzal 1807e02416 Removed the Pair class from TC2 2022-02-14 12:50:43 -05:00
Taha Afzal 04b1b0ce4e Thinned up the ThreadedBB further, can one day be easily replaced by the IBus 2022-02-14 11:58:54 -05:00
Taha Afzal de2eb433b6 Unplugging the logic for a bunch of TC2 data (position, rolover vol, presaved values etc) 2022-02-13 23:53:32 -05:00
Taha Afzal cb10a5e99e Old bb and threaded bb are out from TC2 2022-02-13 23:41:43 -05:00
Taha Afzal 133034ad07 Removing 2 older methods in ThreadedBB 2022-02-13 22:00:04 -05:00
Taha Afzal 29f43464fa Removing TC2's dependence on Blackboard 2022-02-13 21:30:00 -05:00
Taha Afzal 0b7902029a Removing all untyped tags from TC2 2022-02-13 13:11:50 -05:00
Taha Afzal d514f9ed15 Getting rid of old blackboard - 1 2022-02-13 12:35:55 -05:00
Taha Afzal 5b0a056183 Removing more unused tags 2022-02-12 20:07:19 -05:00
Taha Afzal 7f3c7ed376 Cleanup continues 2022-02-12 11:14:04 -05:00
Taha Afzal 09760d29d5 Option md for TC2 fixed 2022-02-12 01:46:29 -05:00
Taha Afzal d5574ad90f Cleaning out TC2 tags 2022-02-12 00:31:50 -05:00
Taha Afzal 354984404a Cleaning up of TC2 tags 2022-02-11 17:42:12 -05:00
Taha Afzal 45b41a9ab8 Removing TC2's HighPerformanceTimer 2022-02-11 13:10:37 -05:00
Taha Afzal fddcb58555 Getting rid of the TheoPoint that got moved over with TC2 2022-02-11 12:03:44 -05:00
Taha Afzal 614552fdad Fixing a crash related to multiple representation of the same symbol in volsurface relationships 2022-02-11 09:57:33 -05:00
Taha Afzal 552b7dda0a Comments to make sense of the TC2 Sheets 2022-02-11 09:42:50 -05:00
Taha Afzal 3da7741f24 TC2 is part of Spark now - we will rule the crypto options space 2022-02-10 22:38:32 -05:00
Taha Afzal a08dd1e22d Cleaned up unused namespaces in these 2 classes 2022-02-09 18:17:03 -05:00
Taha Afzal 27399b3dbe interpolating for option expirations for whome the drivers are not set 2022-02-09 17:40:08 -05:00
Taha Afzal 4d9e7ca6e8 Merge branch 'spark_crypto' of bitbucket.org:bluetradesys/spark into spark_crypto 2022-02-08 17:35:05 -05:00
Taha Afzal 2f2abe840a Added interp type in the analytics service proto 2022-02-08 17:34:48 -05:00
Taha Afzal 3506c65895 Merge branch 'spark_crypto' of bitbucket.org:bluetradesys/spark into spark_crypto 2022-02-08 15:05:27 -05:00
Taha Afzal 5d185c51ba Using fixing price for marked price in SystemContractData 2022-02-08 15:05:04 -05:00
Taha Afzal b1e7865904 Merge branch 'spark_crypto' of bitbucket.org:bluetradesys/spark into spark_crypto 2022-02-08 14:58:30 -05:00
Taha Afzal cc3e769afe QueryServer was not copying the Fixing price over (used as a proxy for Mark price) 2022-02-08 14:58:20 -05:00
Taha Afzal d9cc74cc78 Abstracting out driver retreival from VolSurfaceMDUnit 2022-02-08 13:51:17 -05:00
Taha Afzal 887a39da1a Disabled the SingleVolSurfaceTheoSource (which showed the before after theos) 2022-02-08 12:49:17 -05:00
Taha Afzal 8b384849f5 Double comparison was not accounting for both double vales NaN's 2022-02-07 21:51:05 -05:00
Taha Afzal 1a66fcafb5 Merge branch 'spark_crypto' of bitbucket.org:bluetradesys/spark into spark_crypto 2022-02-07 21:43:48 -05:00
Taha Afzal a39fba8042 Merge branch 'spark_crypto' of bitbucket.org:bluetradesys/spark into spark_crypto 2022-02-07 21:06:00 -05:00
Taha Afzal 9f61999ce9 changing the deribit exps to listen to (until the connection drop is fixed) 2022-02-07 21:05:49 -05:00
Taha Afzal 1a0d2e59ab Throttling the driver prices for performance 2022-02-07 20:50:06 -05:00
Taha Afzal 7d66d7847f Adding perf stats log 2022-02-07 17:46:48 -05:00
Taha Afzal b4c65bdde3 Merge branch 'spark_crypto' of bitbucket.org:bluetradesys/spark into spark_crypto 2022-02-07 14:48:00 -05:00
Taha Afzal 8bd003d21e Perf logs added, plus GreekTuple initialization fixed 2022-02-07 14:47:55 -05:00
John Colvin 11bb41bbb6 Fix typo in mview row vm (delta prop was returning theo) 2022-02-07 12:28:48 -05:00
Taha Afzal ebefc65b69 Merge branch 'spark_crypto' of bitbucket.org:bluetradesys/spark into spark_crypto 2022-02-07 11:43:18 -05:00
Taha Afzal 045029bfb4 Taing logging 2022-02-07 11:43:03 -05:00
Taha Afzal f66ab59f0d Added mark price for Deribit 2022-02-06 18:49:51 -05:00
John Colvin 4c608eec0e feat: Hide vs dummy window 2022-02-06 15:09:47 -05:00
John Colvin 2d6864b191 fix: Remove vs dummy win from win manager on main thread 2022-02-06 14:49:10 -05:00
Taha Afzal 1545458c76 Adding mark prices to VOlSurfaceMDUnit 2022-02-05 19:39:11 -05:00
Taha Afzal d23a390bf6 File name change 2022-02-05 19:08:52 -05:00
John Colvin 9e34cb3d61 feat: Add Vol and Driver cols to mview 2022-02-05 14:40:30 -05:00
John Colvin 170f526617 fix: Add greeks col filters to mview settings 2022-02-05 14:40:30 -05:00
John Colvin 17e0b37882 feat: Add greek col comparers to mview 2022-02-05 14:40:30 -05:00
John Colvin cbe3c1939e refactor: Clean up mview
* Rename members with shorter names (mainly to reduce the width of various
  calls, esp those that add columns in the MarketViewVM constructor)
* Move mview settings classes into own files
* Run formatter
2022-02-05 14:40:23 -05:00
Taha Afzal 251b014604 Added vs removal code to the service + adjusted to emumba's interface change 2022-02-04 18:52:49 -05:00
John Colvin fe416e726a fix: Make mview columns implement ISortableDIYGridColumn
Bugs (fixed):
   * mview column sorting is broken
2022-02-04 17:42:04 -05:00
John Colvin 4dcf296af2 Fix re-entrancy bug in PNLWindow when cols are changing
* Log column collection change events for diagnostic purposes
* Clean up code a bit
2022-02-04 17:41:32 -05:00
John Colvin 0a8a3bf6f2 refactor: Get rid of DoubleUtil
* Consolidate functionality in MathUtils and NumericExtensions
* Define gui-related epsilons in WPFHelper and HighDpiExtensions
2022-02-04 17:41:32 -05:00
John Colvin 174a7baaf4 refactor: Move numeric-extensions into own class 2022-02-04 17:41:32 -05:00
John Colvin 0e41b88bdf refactor: Clean up MathUtils
* Fix name violations
* Make lcm and gcd fns more efficient
* Use modern language features
* Run formatter
2022-02-04 17:41:32 -05:00
John Colvin 822dc0794a fix: Don't consider infinity a real number 2022-02-04 17:41:32 -05:00
John Colvin f644a3392b feat: Hook up (repair) vs grid settings editor
The vs grid settings editor code had already been ported over, but never
actually worked
2022-02-04 17:41:32 -05:00
John Colvin 8634386862 refactor: Return bool indicating whether AddOrUpdate adds item 2022-02-04 17:41:32 -05:00
John Colvin e4a84d343a Fix typo to correct insertion-idx-bug 2022-02-04 17:41:32 -05:00
John Colvin 7b0a7f7107 refactor: Change sync_with_never_duplicate param to IList
This makes the param more flexible, and thus broadens the fn's usability
2022-02-04 17:41:32 -05:00
John Colvin 11f345f3cd fix: Use IEqualityComparer arg in sync_with_never_duplicate 2022-02-04 17:41:32 -05:00
John Colvin 17f10b2450 refactor: Make DIYGrid.Columns type IReadOnlyList
This allows viewmodels to take advantage of IReadOnlyList<out T> covariance and
use more strongly typed column elements
2022-02-04 17:41:31 -05:00
John Colvin 18e26515de refactor: Support mutations in MutableWrapper list
Previously, this class was used to alias IReadOnlyList as an IList, and
each mutation fn would throw a NotSupportedException.  Now
mutations are supported if the source list implements IList (in
addition to IReadOnlyList)
2022-02-04 17:41:31 -05:00
John Colvin ee9d68c0e7 style: Flip if condition to dedent big code block 2022-02-04 17:41:31 -05:00
John Colvin f019163b35 Add AllowNaN and NaNText props to TickUpDownDouble 2022-02-04 17:41:31 -05:00
John Colvin b86b9b474f Fix display_name binding in vs grid settings view 2022-02-04 17:41:31 -05:00
John Colvin a7372fdcf6 Add ProtoMember attrs to TickDisplaySettings props 2022-02-04 17:41:31 -05:00
John Colvin 59c5fd1256 refactor: Impl ICloneable<GridSettings> in GridSettings 2022-02-04 17:41:31 -05:00
John Colvin 8fc55951eb Fix typo in tick parse fn
The parsed result was being multiplied by the display_multiplier where it
should have been divided by it. The parse fn is the inverse of the format fn,
which multiplies by the display_multiplier
2022-02-04 17:41:31 -05:00
John Colvin 1e60c2fc78 Fix rounding error in tickup/down fns
This bug went unnoticed until now bc these particular tickup/down fns
were never called in practice.  However, their use is imminent in the
volsurface ui (namely the grid)
2022-02-04 17:41:31 -05:00
John Colvin b6256244d3 refactor: Add driver to GreeksTuple 2022-02-04 17:41:31 -05:00
John Colvin e872106c5c refactor: Make GreeksTuple.with fn params nullable
This makes it possible to replace GreeksTuple fields with NaN
(previously, NaN indicated that an arg should be ignored)
2022-02-04 17:41:31 -05:00
John Colvin fc18d58681 refactor: Default GreeksTuple args to nan in ctr 2022-02-04 17:41:31 -05:00
John Colvin 7845b3fdc1 refactor: Clean up TickExtensions 2022-02-04 17:41:31 -05:00
John Colvin 4b27bbe490 Add handy utils to TickFactors/DisplaySettings
* Add static TickFactors presets
* Add TickDisplaySettings default
* Make TickFactors implement ICloneable<TickFactors>
* Add 'with' ext fn

TODO:
   * Replace instantiations of TickDisplaySettings that rely on inlined
   default values with the TickDisplaySettings.Default prop
2022-02-04 17:41:30 -05:00
John Colvin 3cd0c4073e refactor: Clean up TickFactors
* Get rid of _equals fn that assumes non-null args
* Use modern language features
* Run formatter
2022-02-04 17:41:30 -05:00
John Colvin a7803877e9 refactor: Rename RoundFractionalUnits to snake_case 2022-02-04 17:41:30 -05:00
John Colvin 0c4010baab refactor: Rename SafeContains ext fn to snake_case 2022-02-04 17:41:30 -05:00
John Colvin c6a1b7bc0d refactor: Rename EmptyIfNull ext fn to snake_case 2022-02-04 17:41:30 -05:00
John Colvin ee74548daa refactor: Rename NullIfEmpty ext fn to snake_case 2022-02-04 17:41:30 -05:00
John Colvin e6c5afa8b2 refactor: Rename IsNullOrEmpty ext fn to snake_case 2022-02-04 17:41:30 -05:00
John Colvin 260d5ddbbe refactor: Remove unused tick utils (fns and IValueConverters) 2022-02-04 17:41:30 -05:00
John Colvin ec53038042 refactor: Move safe_equals ext fns to spark_api 2022-02-04 17:41:29 -05:00
John Colvin 3dfbc2635a build: Set CMP0076 explicitly to remove warning 2022-02-04 17:41:29 -05:00
John Colvin 293fc233f7 Add git-save script to backup changed files 2022-02-04 17:41:29 -05:00
John Colvin a99f95853a refactor: Abstract out argparse/file utils from buildspark.py 2022-02-04 17:41:29 -05:00
John Colvin a3378a188a refactor: Fix typo criterion -> criteria 2022-02-04 17:41:29 -05:00
John Colvin 7d7ccc67e0 build: Fix typo in buildspark.py
* Replace literal '2022' w/ var 'year'
2022-02-04 17:41:29 -05:00
John Colvin 1fa17d63a2 refactor: Rename MarketViewView.Columns -> MarketViewColumnType 2022-02-04 17:41:29 -05:00
Taha Afzal a743500a37 Cleaning up SingleVolSurfaceMarketImpliedVolSource 2022-02-04 15:53:25 -05:00
Taha Afzal 0a6f2d5adb Normalizing options market data form coins to USD 2022-02-04 12:39:26 -05:00
Taha Afzal 96e6c0dfb5 In anticipation of the 'mark price' cleaned up the option driver tags 2022-02-03 16:03:21 -05:00
Taha Afzal 775918468d File name change 2022-02-03 13:41:05 -05:00
Taha Afzal 05101cfcd4 Adding more points to the curve to make it look nice in the UI 2022-02-03 13:22:18 -05:00
Taha Afzal 2de48c0550 Making theos work 2022-02-02 16:11:34 -05:00
John Colvin 07004179a3 Add safe_get_value Dictionary ext fns 2022-02-02 14:17:52 -05:00
John Colvin 05401a4c98 refactor: Rename GetValueOrDefault -> get_value 2022-02-02 14:17:51 -05:00
Taha Afzal ba678777b1 Market ImpliedVols are being pubished now 2022-01-30 23:41:47 -05:00
Taha Afzal 532c461d17 Added vol to GreekTuple, and a few verbose logs(for now) 2022-01-30 01:29:51 -05:00
Taha Afzal b98e1ff9dd Name changes 2022-01-29 23:35:56 -05:00
Taha Afzal bc7ca707c9 Merge branch 'spark_crypto' of bitbucket.org:bluetradesys/spark into spark_crypto 2022-01-29 23:11:51 -05:00
Taha Afzal 292b131a4c Theos are written to the bus now 2022-01-29 23:11:43 -05:00
John Colvin e2ca78008e fix: Disable global drag/drop while adding tab to new win
Bugs (fixed):
   * The shell crashes when dropping a tab into an existing window
2022-01-27 20:34:13 -05:00
John Colvin 85757050bf fix: Don't add null symbol clause to ContractPicker.result
Bugs (fixed):
   * Windows launched w/ SecurityCriteria for 'all' symbols (i.e., when no
     symbols are selected) don't show any securities
2022-01-27 15:14:51 -05:00
Taha Afzal 8ecbfb935d Merge branch 'spark_crypto' of bitbucket.org:bluetradesys/spark into spark_crypto 2022-01-27 13:04:01 -05:00
Taha Afzal 753a56ce95 Cleaning up logs for theos 2022-01-27 13:03:52 -05:00
John Colvin 39d7ab0b76 fix: Remove bad assert statement in SparkWindow
Bugs (fixed):
   * PNL window crashes on open
2022-01-27 12:58:08 -05:00
John Colvin 95f638175d refactor: Use 'is null' in null asserts, add msg param 2022-01-27 12:57:18 -05:00
John Colvin 6c6bf492b0 fix: Show candidate output in vs grid readonly cells 2022-01-27 12:18:47 -05:00
John Colvin 2fdce0280a refactor: Clean up MarketViewRow
* Define fields of the same type in separate statements
* Insert some new lines for easier code browsing
* Replace large delegates with local fns
2022-01-27 12:18:47 -05:00
John Colvin dfa18c632e Add greeks to mview 2022-01-27 12:18:47 -05:00
Taha Afzal f8276adaa7 Fixed the save_marker in VolSurfaceInputSnapshot 2022-01-26 23:12:25 -05:00
John Colvin f184dd5743 fix: Update vs previous_states dropdown on grid change 2022-01-26 19:43:51 -05:00
John Colvin 21da6c813c Select vs grid row when cell enters edit mode 2022-01-26 19:28:11 -05:00
John Colvin 2601519e8b Only listen to drag events when IsDragSelectionEnable is true 2022-01-26 19:15:58 -05:00
John Colvin 97cce473e8 refactor: Move DIYGridRowsPresenter to its own file 2022-01-26 19:14:22 -05:00
John Colvin 227a977697 fix: Invalidate vs graph when points change 2022-01-26 18:06:47 -05:00
Taha Afzal c1a59eba47 Merge branch 'spark_crypto' of bitbucket.org:bluetradesys/spark into spark_crypto 2022-01-26 15:26:51 -05:00
Taha Afzal 1034ac8fe1 AnalyticsParametersManager now publishes a dictionary of all values, including empty ones 2022-01-26 14:35:38 -05:00
Taha Afzal 5602fc0b1b Fixing the wing detection as per John 2022-01-26 13:13:43 -05:00
John Colvin 332c32893c fix: Use IValueConverter (not vs display grid) to fmt/parse input
Bugs (fixed):
   * User input isn't multiplied by the display multiplier

This issue was that the input text was getting parsed twice before being stored
in the display grid (once by the IValueConverter, and once by the display grid
itself).  The parse fn divides by the display multiplier, while the format fn
multiplies by it.  Thus, the input was effectively divided by the display
multiplier (bc 1/dm * 1/dm * dm == 1/dm)
2022-01-26 00:40:14 -05:00
John Colvin 9ee52c0827 refactor: Remove unused/deprecated DataGridEx utils 2022-01-25 22:22:18 -05:00
Taha Afzal ad0c4b25a5 Options 'books' can optionally be built from quotes now 2022-01-25 22:15:44 -05:00
Taha Afzal 14af01182c Caching volume on statistics_change and passing it over to handl.add_trade 2022-01-25 22:15:44 -05:00
Taha Afzal ac22ed553e Fixed the TS timestamp 2022-01-25 22:15:44 -05:00
Taha Afzal 310c7fa4a3 Cleaning up 2022-01-25 22:15:44 -05:00
Taha Afzal be3daae175 Removing SIM: from Deribit security desc 2022-01-25 22:15:44 -05:00
Taha Afzal fdc4e59d09 Working around Deribit option md bugs 2022-01-25 22:15:44 -05:00
Taha Afzal 8af07756ef logs in the VolSurfaceDisplayModel 2022-01-25 18:22:50 -05:00
Taha Afzal b522b9875e Merge branch 'volsurface-ui' of bitbucket.org:bluetradesys/spark into volsurface-ui 2022-01-25 17:47:37 -05:00
Taha Afzal 8059ebfad1 Changing the hard coded test vol surface's fwd to be close to reality 2022-01-25 17:47:30 -05:00
John Colvin 5aa3de21bb fix: Notify vs display model when [candidate] cell input changes
Bugs (fixed):
   * The commit/revert buttons in vs window are always disabled
2022-01-25 17:34:01 -05:00
John Colvin 230e02014c refactor: Drop 'Simplified' from vs grid/column class names 2022-01-25 17:25:01 -05:00
John Colvin be8bc54e46 fix: Remove configserver arg when parsing CLIOptions 2022-01-25 14:14:45 -05:00
John Colvin c8d37c2dfc fix: Simplify and fix revert-cell cmd 2022-01-25 14:00:07 -05:00
John Colvin 21300a858c fix: Flip call/put wing start comparison operators 2022-01-25 12:33:51 -05:00
John Colvin c97887993f Make vs graph legend translucent 2022-01-24 19:55:34 -05:00
John Colvin 198311c7c4 feat: Add vis toggle for vs exp graph series parts 2022-01-24 19:55:34 -05:00
John Colvin 1db24a8b72 fix: Define c/p wing strike range w/ VolCurveDisplayGraph wing_start props 2022-01-24 19:49:20 -05:00
John Colvin 9ef492acdc Update PlotModel.IsVisible in vm is_visible setter 2022-01-24 19:29:27 -05:00
John Colvin f8a74bbcbd fix: Copy settings.stroke_thickness to vm member 2022-01-24 19:29:27 -05:00
John Colvin eade3d0ee3 fix: Use consistent window-type ids for saving/loading vs wins
Bugs (fixed):
   The vol surface, and exp params windows aren't restored with workspace
2022-01-24 19:29:26 -05:00
John Colvin c65c16f476 refactor: Init vs line series vms w/ LineSeriesSettings
Previously, was assigning props explicitly from the settings object
2022-01-24 14:43:40 -05:00
John Colvin 6fa7b3cb88 Add committed/candidate prefix to vs atm series title 2022-01-24 14:42:06 -05:00
Taha Afzal e5a8209127 Options 'books' can optionally be built from quotes now 2022-01-24 14:13:35 -05:00
Taha Afzal aa768fabc0 Caching volume on statistics_change and passing it over to handl.add_trade 2022-01-24 13:33:33 -05:00
John Colvin 0c94dbd32c Update externals 2022-01-24 01:01:28 -05:00
John Colvin 89df1b5836 Increase padding in vs graph legend
This makes it easier to move the legend around (via drag)
2022-01-24 01:01:28 -05:00
John Colvin c8d682c0b9 Fix analytics-exp-params window
Bugs (fixed):
   * Exp params window crash on launch
   * A few 'dirty' props don't notify view of changes

* Use AnalyticsExpirationParametersWindowFactory to create/restore win
* Rename AnalyticsExpirationParametersVM.StartupData ->
  AnalayticsExpirationParametersSettings
* Simplify 'dirty' prop-changed notification logic
2022-01-24 00:58:37 -05:00
Taha Afzal 088c5bc0b9 Fixed the TS timestamp 2022-01-23 21:48:50 -05:00
John Colvin 6cbe93a9bb Replace Any CPU w/ x64 in spark_client.sln 2022-01-23 16:15:11 -05:00
John Colvin 1d6e90a429 Fix typo in editorconfig 2022-01-23 16:15:11 -05:00
John Colvin 6fb842c619 Tether temp vs window (outside workspace) to dummy shell win 2022-01-23 16:15:11 -05:00
John Colvin 6d90b6079e Implement vs grid settings command 2022-01-23 16:15:11 -05:00
John Colvin 084cbfcef6 Bind selection to immutablelist to get 1 instance/mutation 2022-01-23 16:15:11 -05:00
John Colvin 45a773fc69 Clean up DragDropDocumentPreview
* Make class internal
* Run formatter
2022-01-23 16:15:11 -05:00
John Colvin 3c147e7079 refactor: Clean up FloatingWindow
* Make internal
* Sort class members
* Fix naming violations
* Run formatter
2022-01-23 16:15:11 -05:00
John Colvin 1c4e574512 Add observe_immutable ext fn for ObservableCollection<T>
Converts sequence of CollectionChanged events to an
IObservable<ImmutableList<T>>
2022-01-23 16:15:11 -05:00
John Colvin 6901fe07d7 Add some mouse events to WPFTracer 2022-01-23 16:15:10 -05:00
John Colvin d1bf278bf2 refactor: Overload string join ext fn with params string[] 2022-01-23 16:15:10 -05:00
John Colvin 0d0f670629 refactor: Remove unused template param from string join ext fn 2022-01-23 16:15:10 -05:00
John Colvin 7c85a226d9 refactor: Overload empty_if_null ext fn for generic List/Array (rebase note: Used in AxisVM) 2022-01-23 16:15:10 -05:00
John Colvin b18ae91f37 Remove duplicate VolSurfaceRowView class
This was inadvertantly added, but didn't break the build because it was
in a different namespace (mbts.ui.shell) from the true VolSurfaceRowView
(mbts.ui)
2022-01-23 16:15:10 -05:00
John Colvin 025a5f49e3 diagnostics: Impl VolGridCellVM.ToString 2022-01-23 16:15:10 -05:00
John Colvin 146a136cd5 Remove magic const '-1' in drag/drop is_sufficient_delta fn
Not sure why this const was ever added in the first place, it appears to
arbitrarily prevent drag/drop ops from starting, when the mouse is at
coordinate (1,1)
2022-01-23 16:15:10 -05:00
John Colvin 8e8c532750 refactor: Use UIElement in drag/drop logic
As opposed to using FrameworkElement
2022-01-23 16:15:10 -05:00
John Colvin 5b973a2462 Add EnableDragMove dp (behavior) to PopupViewController 2022-01-23 16:15:10 -05:00
John Colvin 5bcd00d499 refactor: Clean up VolSurfaceSimplifiedGridVM 2022-01-23 16:15:10 -05:00
John Colvin cf9591ae83 Init value for vs cell view DIYGrid.ColumnProperty 2022-01-23 16:15:10 -05:00
John Colvin 64a5c44726 Define view style/behavior in VolSurfaceCellView rather than in vs column 2022-01-23 16:15:10 -05:00
John Colvin bbae90059e Write vs candidate vals to grid model so it updates the graph 2022-01-23 16:15:10 -05:00
John Colvin 1d953c31eb Use IValueConverter to fmt/parse cell vals in vs grid 2022-01-23 16:15:10 -05:00
John Colvin 49164aef3a Remove HistoricVolSurfaceRowControl
The new VolSurfaceRowView seems solid enough to stand on its own
2022-01-23 16:15:10 -05:00
John Colvin 2cc8810830 Init x_axis.position in vs graph vm 2022-01-23 16:15:09 -05:00
John Colvin f8813bda36 Fit axes to series on vs graph double click 2022-01-23 16:15:09 -05:00
John Colvin 98f3c5c433 Fix typo in launch-exp-params-view-cmd binding 2022-01-23 16:15:09 -05:00
John Colvin 65a6317527 Hook up context menu in vs grid 2022-01-23 16:15:02 -05:00
John Colvin 925c301cbe refactor: Change MultiSelectDropDowns to ComboCheckBox in vs settings 2022-01-23 15:25:41 -05:00
John Colvin b6ac345ee6 Port VolSurfaceGridSettingsEditor over from edge 2022-01-23 15:25:41 -05:00
John Colvin b3bc3ca18d Add TickUp/DownCommand dps to VolSurfaceCellView 2022-01-23 15:25:41 -05:00
John Colvin 568d9da42f Add TickFactors member to vs columns
For formatting/parsing doubles by tick
2022-01-23 15:25:41 -05:00
John Colvin 37fef31ed6 Implement _to_string to format doubles for volsurfaces 2022-01-23 15:25:41 -05:00
John Colvin 4d1c0869f1 fix: Don't publish invalid VolSurfaceUsageListImmutable 2022-01-23 15:25:41 -05:00
John Colvin 3ed16ff186 Ensure some vs settings props are non-null in getter 2022-01-23 15:25:41 -05:00
John Colvin 8a30fdd4c5 cli (client): Add user/pw opts to automate login 2022-01-23 15:25:41 -05:00
John Colvin a9b4881e7b refactor: Clean up ShellBootstrapper.cs 2022-01-23 15:25:41 -05:00
John Colvin f76e3968f8 refactor: Clean up App.xaml.cs
* Sort members
* Fix naming violations
* Remove unneccesary using directives
* Run formatter
2022-01-23 15:25:41 -05:00
John Colvin eb777fd14f Bind diygrid row hover fill to SelectionHighlight 2022-01-23 15:25:41 -05:00
John Colvin fffae3b519 Show decimal part by default in tick format fn 2022-01-23 15:25:41 -05:00
John Colvin 2aaa729ae9 refactor: Make VolSurfaceView class internal 2022-01-23 15:25:40 -05:00
John Colvin c2d6046a1f refactor: Use PopupAdorner to display vs graph legend 2022-01-23 15:25:40 -05:00
John Colvin 7b4d5766ef refactor: Use observable backings in cell vms 2022-01-23 15:25:40 -05:00
John Colvin 17978d2306 style: Use vs (not code) to format VolSurfaceView.xaml 2022-01-23 15:25:40 -05:00
John Colvin aadbef2a99 Add IsDragAdornerEnabled prop to DIYGrid 2022-01-23 15:25:40 -05:00
John Colvin 53e9d90bf9 refactor: Use nifty extension fns in vs grid vm 2022-01-23 15:25:40 -05:00
John Colvin 9df339c4a7 refactor: Make vs 'visible_rows' strongly typed
The prior weakly typed collection was a vestige from edge.  The view
property to which selected items was bound in edge was of type
ObservableCollection<object>
2022-01-23 15:25:40 -05:00
John Colvin 7c26572c0b refactor: Clean up volsurface axis/series vms 2022-01-23 15:25:40 -05:00
John Colvin 67f26d4318 refactor: Make ComboCheckBox.SelectedItems type IList 2022-01-23 15:25:40 -05:00
John Colvin cd3d1ab2f4 Add volsurface to MultiThreadedWindows conf 2022-01-23 15:25:40 -05:00
John Colvin 9314911cc8 build (client): Activate venv in msbuild target
Now buildspark.py can run outside of venv
2022-01-23 15:25:32 -05:00
John Colvin 67dc07c4f5 build (client): Add cli opts to build cpp and/or csharp 2022-01-23 15:25:06 -05:00
Taha Afzal 331e35cd42 Cleaning up 2022-01-23 15:24:47 -05:00
John Colvin 40890f9ad2 build: Upgrade client build to vs 17 2022
If vs 17 2022 isn't installed, buildspark.py should still work for vs 16 2019
2022-01-23 13:17:46 -05:00
John Colvin cb7606edca Fix x/y typo in GraphPointVM 2022-01-23 13:09:58 -05:00
John Colvin abab98cea6 Add null check in _recompute_and_publish 2022-01-23 13:09:58 -05:00
John Colvin d271e2a3ef refactor: Use VolSurfaceWindowFactory to create win 2022-01-23 13:09:58 -05:00
John Colvin 579e2a7a93 refactor: Rename VolSurafceView2 -> VolSurfaceView 2022-01-23 13:09:58 -05:00
John Colvin 0ac028c546 refactor: Ensure VolSurfaceWindowSettings lists non-null 2022-01-23 13:09:58 -05:00
John Colvin c6b374a934 refactor: Clean up VolSurfaceDisplayGrid
* Use new c# language features to make code prettier
*  Run formatter
2022-01-23 13:09:58 -05:00
John Colvin eeddde332e fix aw2, diygrid, mview after cherry-picking mview popups 2022-01-23 13:09:58 -05:00
John Colvin 9b9926502c fix flickering pnl hyperlink hover background 2022-01-23 13:09:58 -05:00
John Colvin a0e772885c fix flickering mview hyperlink hover background 2022-01-23 13:09:58 -05:00
John Colvin a0384c6d33 PNLView - HyperlinkCell mouse hover animation 2022-01-23 13:09:58 -05:00
John Colvin d18242e0f2 set HyperlinkCell 'HyperlinkClickMode' default to 'Anywhere' 2022-01-23 13:09:58 -05:00
John Colvin 2177451371 remove HyperlinkColumn props 'padding' and 'HyperlinkClickMode' (callers should set them through the ElementStyle prop) 2022-01-23 13:09:58 -05:00
John Colvin 5adb85582a after opening, mview remembers subsequent security criteria changes in workspace 2022-01-23 13:09:58 -05:00
John Colvin 35a2074de4 mview synth fills popup only shows fills of synth root algos 2022-01-23 13:09:58 -05:00
John Colvin de43f14552 mview mini ob only shows working orders 2022-01-23 13:09:57 -05:00
John Colvin d675ae17da mview mini orderbook only shows exchange orders for outrights, spreader orders for synths 2022-01-23 13:09:57 -05:00
John Colvin 0ae61d3e82 fix mview sorting (use new ColumnSortManager) 2022-01-23 13:09:57 -05:00
John Colvin c6c7350dad MarketViewVM - move local methods (in constructor) to bottom 2022-01-23 13:09:57 -05:00
John Colvin 75efd7a2d5 mview order ticket popup closes on send 2022-01-23 13:09:57 -05:00
John Colvin aaebf3b4fb mview toolbar menu items open regular windows instead of minis (for now) 2022-01-23 13:09:57 -05:00
John Colvin 76adc09b16 mview fills/orderbook toolbar menu items open the new popups 2022-01-23 13:09:57 -05:00
John Colvin 5b26252d25 DIYGridRowsPresenter initialization in Loaded callback is idempotent (Loaded event not always followed by Unloaded event) 2022-01-23 13:09:57 -05:00
John Colvin db813a8191 mview popups use AutoHideScrollBar to prevent scrollbars from covering data 2022-01-23 13:09:57 -05:00
John Colvin 4e0740d7b4 mview 'Position' column shows day position (uses position service) 2022-01-23 13:09:57 -05:00
John Colvin 5c74814b95 SP-257 mview popups for working orders & day fills 2022-01-23 13:09:57 -05:00
John Colvin 504aadac16 spruce up hamburger menu 2022-01-23 13:09:56 -05:00
John Colvin f12e8deeab add 'Freeze' prop to BrushExtension 2022-01-23 13:09:56 -05:00
John Colvin fa9ab9c033 DIYGridCellHoverAdorner 2022-01-23 13:09:56 -05:00
John Colvin d5dd63d528 refactor DIYGrid.SelectionHighlight to be Color instead of Brush (also fixes drag rect adorner bug, where the color wouldn't respond to settings changes) 2022-01-23 13:09:56 -05:00
John Colvin 4d2b3d4a77 market view row 'inside working orders' comparison to bbo was backwards 2022-01-23 13:09:56 -05:00
John Colvin 5f2da9421b MarketViewVM does not derive from SecurityMDGrid 2022-01-23 13:09:56 -05:00
John Colvin dcea38d038 factor out pnl auxiliary popups for general use (mview) 2022-01-23 13:09:56 -05:00
John Colvin f97538edf2 introduce WindowStyle.UnsafeWindow dp 2022-01-23 13:09:56 -05:00
John Colvin dff3cd1424 refactor ChildBounds extensions to be for UIElement 2022-01-23 13:09:55 -05:00
John Colvin 62fb9bd74d aw2: Make custom VolSurfaceCellView control for aw2
This control hosts input and output views for cells in the volsurface
grid (only one of which is visible at any time).  The input view is
activated when the cell is focused
2022-01-23 13:09:55 -05:00
John Colvin 5ac5ecb55e diag: Add WPFTracer class 2022-01-23 13:09:55 -05:00
John Colvin e6d16b419b Impl non-generic IEqualityComparer.GetHashCode 2022-01-23 13:09:55 -05:00
Taha Afzal 23fa1bd0bc Removing SIM: from Deribit security desc 2022-01-23 11:07:07 -05:00
Taha Afzal e7350b2528 Working around Deribit option md bugs 2022-01-23 00:13:22 -05:00
John Colvin 4e5bf8f3c1 Remove unneccessary dependecy store lookup 2022-01-22 12:46:52 -05:00
John Colvin 1b9ac61588 Add save-log script to backup log file
The current date and time is appended to the log file name
2022-01-22 12:46:52 -05:00
John Colvin 616818aa52 Make our FirstOrDefault ext behave like linq's without predicates 2022-01-22 12:46:52 -05:00
John Colvin 3481a36735 Clean up VolSurfaceDisplayGridExpiration
* Make readonly fields props
* Implement ToString
* Use auto_phase in GetHashCode
* Run formatter
2022-01-22 12:46:52 -05:00
taha afzal ad530c242d Adding options securities for Deribit 2022-01-21 14:45:34 -05:00
taha afzal fef2b64933 Hooking trades, as well as reducing the log level to DIAG for most market data callbacks 2022-01-20 13:38:34 -05:00
taha afzal fac10e0da7 tick interval set up correctly now for deribit securities 2022-01-19 23:09:31 -05:00
taha afzal e7295ccf9a Made the dumper method in ShmDumper public to allow access for Logging from other places: 2022-01-19 16:13:47 -05:00
taha afzal d4be0e7ef6 Merge branch 'spark_crypto' of bitbucket.org:bluetradesys/spark into spark_crypto 2022-01-19 15:44:53 -05:00
taha afzal 15beef99f9 Deribit market data (futures) integrated 2022-01-19 15:44:34 -05:00
John Colvin 3524ad56ee fix build: Don't deconstruct result of add/remove op
Two of the deconstructed members were unreferenced variables
2022-01-12 11:24:17 -05:00
taha afzal d7bfdf4397 Merge branch 'spark_crypto' of bitbucket.org:bluetradesys/spark into spark_crypto 2022-01-11 20:01:03 -05:00
John Colvin d1edb41b9d build: Don't explicitly link emumba deps
The should all be in the emumba-deribit-connector-library_LIBRARIES var
2022-01-11 18:14:54 -05:00
John Colvin ad5b32319c build: Add deribit demo log level var to CMakeLists 2022-01-11 18:14:54 -05:00
John Colvin d646b4b54f refactor: Replace terse 'unused' attributes w/ macro 2022-01-11 18:14:54 -05:00
John Colvin 7e710870ec Actually run the deribit connector 2022-01-11 18:14:54 -05:00
John Colvin b902fc372f Remove custom spdlogger from deribit demo 2022-01-11 18:14:54 -05:00
John Colvin e9caab16ba Update externals: add emumba-deribit-connector lib 2022-01-11 18:14:54 -05:00
John Colvin 3c8ece1eee Update externals to include linux libssl 1.1.1m 2022-01-11 13:56:39 -05:00
John Colvin 7d1fe3098a Add break statement to end of switch case
The code wasn't technically broken (yet), bc the switch case in question
was falling through to the empty default case.
2022-01-11 13:56:39 -05:00
John Colvin a8f642ebd7 refactor: Add '_params' suffix to create_binance_subscription fn 2022-01-11 13:56:39 -05:00
John Colvin cc85c658d9 refactor: Use UnorderedSetMap for ref counts 2022-01-11 13:56:39 -05:00
Taha Afzal fbeb65b53b Logs for strike vs vols 2022-01-11 12:57:40 -05:00
Taha Afzal 66e312c2b8 Cleanup + logs 2022-01-11 00:16:42 -05:00
Taha Afzal b1300eb52a 2 tags were not naming their type names, and mapping to the same 'key' 2022-01-10 10:48:40 -05:00
Taha Afzal 4c34a532ce More logs 2022-01-10 10:29:55 -05:00
Taha Afzal 4e3a02c31b Request-Reply works 2022-01-10 00:00:40 -05:00
Taha Afzal 30fa5891e9 Adding torubleshooting logs 2022-01-09 17:21:01 -05:00
John Colvin 53b6c19565 refactor: Clean up DIYGrid a bit
* Don't define more than one variable in a single statement (this messes
  with the c# omnisharp extension in vscode)
* Remove private keywords (in accordance with our coding style)
* Sort class members
2022-01-07 23:11:31 -05:00
John Colvin cd19cbf0b4 Early cut of aw2 ui (most likely will have bugs)
Rough around the edges, but functional enough to be a useful diagnostic tool as
we iron out aw2
2022-01-07 23:11:31 -05:00
John Colvin 8958507385 refactor: Make UIAdapter classes internal 2022-01-07 23:06:54 -05:00
John Colvin 730174b6ff Support multiple props w/ same name in detect_property_changes
It is possible for a type to have multiple properties with the same name
if that type is a reference type that inherits from a parent type, and hides
one of the parent types properties with the 'new' keyword
2022-01-07 22:33:33 -05:00
John Colvin cee79afc23 Make VolSurfaceDisplayModel class internal 2022-01-07 22:33:33 -05:00
John Colvin 79c55793af refactor: Clean up VolSurfaceOutput
* Implement generic ICloneable<VolSurfaceOutput>
* Run formatter
2022-01-07 22:33:33 -05:00
John Colvin 43d614dde2 Add generic ICloneable interface
For some reason this very basic utility isn't defined in dot net
2022-01-07 22:33:32 -05:00
John Colvin fde11dc4a3 Remove unneccessary comment warning abt perf costs 2022-01-07 22:33:32 -05:00
John Colvin 36a84d28e2 refactor: Improve RemoveWhere ext fn impl
* Don't allocate list of items to remove
* Return the number of items removed
2022-01-07 22:33:32 -05:00
John Colvin 6f7e2ab201 refactor: Clean up VolSurfaceExtensions
* Run formatter
* Replace foreach loops w/ less verbose linq style extensions
2022-01-07 22:33:32 -05:00
John Colvin fe7097771b Derive SparkWindow from DisposableViewModelBase 2022-01-07 22:33:32 -05:00
John Colvin 5a81c223c1 Remove old 'PAndl' window 2022-01-07 22:33:32 -05:00
John Colvin 8a4e90e1be refactor: Clean up BTSColor
* Rename argb props to be lower case
* Make some member fns static extensions
* Remove Serializable attribute
* Use a single uint prop (rather than 4 byte props) for protobuf
serialization
2022-01-07 22:33:32 -05:00
Taha Afzal 9d0cc5ef91 Adding include opitonal to fix the build 2022-01-07 15:42:18 -05:00
Taha Afzal 10bd10fbf1 Update externals (adds missing std dir to includes) 2022-01-07 14:27:26 -05:00
taha afzal 21aefed58f Stats, Trades etc also itegrated 2022-01-04 21:57:56 -05:00
taha afzal 13133053f6 error and book updates hooked 2022-01-04 16:23:06 -05:00
John Colvin b41f321723 style: Add comments to binance md classes 2022-01-04 13:43:17 -05:00
John Colvin a90f6badfd refactor: Clean up binance md classes
* Remove unneccessary includes in a few files
* Remove erroneous commented out fwd decls
* Remove unused class BinanceMarketDataSubscription
* Make a few public accessor fns private
2022-01-04 13:34:33 -05:00
taha afzal 92feb60ec5 EmMDListener security addition completed 2022-01-03 22:32:54 -05:00
taha afzal 8561944900 Adding the Emumba-Spark bridge 2022-01-03 11:30:41 -05:00
taha afzal 2ca7b3bf7a Fixing build 2021-12-31 15:14:51 -05:00
taha afzal 032acffb03 Merge branch 'spark_crypto' of bitbucket.org:bluetradesys/spark into spark_crypto 2021-12-31 00:27:35 -05:00
taha afzal 8c7c7b6af5 Adding a commented out class to start integration of emumba-Deribit 2021-12-31 00:25:36 -05:00
John Colvin 3a6e55a5ea fix build (gcc release): Ensure ValueWrappers are initialized 2021-12-30 14:02:30 -05:00
John Colvin fb8ea23744 fix build (gcc debug): Return vec of unique_ptrs w/ move 2021-12-30 13:52:13 -05:00
John Colvin 1ce44e3bd9 Show config_path on parse error in deribit demo 2021-12-30 13:44:02 -05:00
John Colvin d329b1c88d Update DeribitDemoListener to use emumba-deribit-connector 2.0.0 2021-12-30 13:43:24 -05:00
John Colvin 13dbc0826d refactor: Put DeribitDemoListener inside namespace 2021-12-30 13:40:34 -05:00
John Colvin f34a41d19c Fix synth book net change test
Net change doesn't depend on tick size anymore (not sure why it ever
did, but now the ui is in charge of such display behavior)
2021-12-29 22:30:17 -05:00
John Colvin 6198bc2a64 Update linux docker 2021-12-29 21:59:12 -05:00
John Colvin 1f40818dda Update docker/linux 2021-12-29 16:05:54 -05:00
John Colvin 1df7b51be9 Remove unused 'apioptions' import from proto files
This removes a couple warnings in the client build
2021-12-29 13:38:22 -05:00
John Colvin e45f186cd9 Add deribit to sec formating code 2021-12-29 13:18:49 -05:00
John Colvin 6874c8f6b9 style: Use dos line endings in QuickBusClientChannel.cs 2021-12-29 13:18:49 -05:00
Taha Afzal b03979cf65 Fake Deribit securuties show up in the UI 2021-12-29 13:18:49 -05:00
Taha Afzal d5d6605a41 Forgot the break in the case 2021-12-29 13:18:49 -05:00
Taha Afzal 139c0d2c51 Added DeribitExchangeData 2021-12-29 13:18:49 -05:00
Taha Afzal 25faf081fc Added Deribit to Venues proto 2021-12-29 13:18:49 -05:00
Taha Afzal cf1a5ada49 KeyValue pair add/update is being dealt properly now 2021-12-29 13:18:48 -05:00
Taha Afzal 7986bff968 Temporary test runner for analytics tests 2021-12-29 13:18:48 -05:00
Taha Afzal 6b305f0593 More logs added to SystemContractData 2021-12-29 13:18:48 -05:00
Taha Afzal 1de81e35f9 SystemContractData had a bug while hashing strikes 2021-12-29 13:18:48 -05:00
Taha Afzal 6714e47d4c All providers are hooked up 2021-12-29 13:18:48 -05:00
Taha Afzal 23e8294502 Enabling SingleVolSurfaceTheoSource 2021-12-29 13:18:47 -05:00
Taha Afzal 27079865e2 Enabled SingleVolSurfaceRequestCalculator 2021-12-29 13:18:47 -05:00
Taha Afzal 2f8e9e9859 Enabling SingleVolSurfaceCommittedOutputRetriever 2021-12-29 13:18:47 -05:00
Taha Afzal d3c4772d59 SingleVolSurfaceCommittedOutputRetriever enabled 2021-12-29 13:18:47 -05:00
Taha Afzal e4c13622f0 SingleVolSurfaceNonVolDataSource cleaned up 2021-12-29 13:18:46 -05:00
Taha Afzal a5ffdd5180 Cleaning up option driver publishing 2021-12-29 13:18:46 -05:00
John Colvin f0d86b92fb build: Add target opt to build cmd 2021-12-29 13:18:46 -05:00
John Colvin b67d2a45d0 refactor: Rename ContractPickerModel -> ContractPickerVM
Renames class, and file, as well as variables and class members of type
ContractPickerVM
2021-12-29 13:18:46 -05:00
John Colvin 6d1bad8b8c Clean up ContractPicker (model and view) 2021-12-29 13:18:45 -05:00
John Colvin 092f8fc371 Add queue_execute/flags params to defer_execution
This serves a common use case where the caller wants to invoke an action
once, at the end of a code block
2021-12-29 00:50:11 -05:00
John Colvin 15c2d416a8 refactor: Make security_type an ext fn (not member) 2021-12-29 00:50:11 -05:00
John Colvin c68c4ea9c9 Add ext fns for ImmutableSortedSet
AddRange, RemoveRange, and SetItems
2021-12-29 00:50:11 -05:00
John Colvin eacfd5c8fe Add SetItems ext fn for IImmutableSet/ImmutableHashSet 2021-12-29 00:50:11 -05:00
John Colvin 65304e6003 style: Clean up ImmutableSetExtensions 2021-12-29 00:50:11 -05:00
John Colvin 1a51a2e7a7 Fix bug where 'add' button was disabled in ContractPicker
This bug was occurring after the user added a criteria clause, and then
[only] changed the strike selection
2021-12-29 00:50:11 -05:00
John Colvin 8ddfa65f5f Make sec type list in ContractPicker constant
Don't filter security types based on selected exchange (consider them
orthogonal). This preserves the selected instrument type if you toggle
the selected exchange between one that lacks a particular instrument
type, and one that doesn't.
2021-12-29 00:50:11 -05:00
John Colvin 15ca25bf6d Remove ISecurityBasedSettings and TickDisplayParameters
These classes weren't referenced anywhere
2021-12-29 00:50:11 -05:00
John Colvin bc0689b529 refactor: Clean up GlbxSecurityFormatter
* Replace if blocks w/ switch statement
* Replace Substring calls w/ new c# range operator
2021-12-29 00:50:11 -05:00
John Colvin 43a5e27e8f Add options to ContractPicker 2021-12-29 00:50:10 -05:00
John Colvin 486e4c7113 build: Fix PYTHONPATH in CompileProto3 build tgt 2021-12-29 00:50:10 -05:00
John Colvin 83773d1335 Add fmt_pretty ext fn to SecurityCriteriaClause 2021-12-29 00:50:10 -05:00
John Colvin f0b8d3d44f Initialize tick fields in fake md 2021-12-29 00:50:10 -05:00
John Colvin 26e1d6e939 Add all_flags, all_flags_except fns to EnumHelper 2021-12-29 00:50:10 -05:00
John Colvin e6f5e437b7 Remove redundant security_in_criteria fn
Replace calls to ContractPickerModel.security_in_criteria with
SecurityCriteria.includes extension method, which should perform better.
Each clause represents an  'and' chain of smaller predicates, the fn
being replaced always evaluates all of the smaller predicates, while its
replacement only evaluates them as long as they return true.
2021-12-29 00:50:10 -05:00
John Colvin 22a3325d0c Add strikes/callputs to SecurityCriteria 2021-12-29 00:50:10 -05:00
John Colvin caa17b0073 Don't import apioptions in SparkProtos
The import is unused, and was causing a compilation warning as a result
2021-12-29 00:50:09 -05:00
John Colvin e3128c11a2 build: Copy (rather than symlink) .build_proxy to build
The sole purpose of the buildspark_redirect script is to workaround a bug in
the vscode c# extension.  Unfortunately some buggy behavior persists when these
dirs are symlinked.
2021-12-29 00:50:09 -05:00
John Colvin f06c1a86ea refactor: Clean up security extension/helper fns
* Define all security-related extension fns in SecurityExtensions
* Rename security extension/helper fns to be in snake_case
2021-12-29 00:50:09 -05:00
Taha Afzal fbccc80c77 Changing file name 2021-12-21 14:44:20 -05:00
Taha Afzal 73183aa007 Added BBO to fake securities 2021-12-21 14:44:20 -05:00
Taha Afzal 0d49c4c0fe Made the fake sec's consistent 2021-12-21 14:44:19 -05:00
Taha Afzal 9f2627869b Publishing fake options md 2021-12-21 14:44:19 -05:00
Taha Afzal 13139e6943 MDConsumerHandle abstracted out to allow the client to inject Fake securities 2021-12-21 14:44:19 -05:00
Taha Afzal 08e9157f17 Added IMDConsumerHandle as an indirection to innjetc market data in the system 2021-12-21 14:44:19 -05:00
Taha Afzal 076302a6b0 Adding saving exp params to AnalyticsTester 2021-12-21 14:44:19 -05:00
Taha Afzal 4c4c748be6 VolSurfaces are updated now 2021-12-21 14:37:04 -05:00
Taha Afzal 76dfd02aa8 AnalyticsServiceServer.save_volsurface was not calling the response return function 2021-12-21 14:34:46 -05:00
Taha Afzal 452a3eb698 Adding test code to create vs's 2021-12-21 14:31:20 -05:00
Taha Afzal adb88708fc Timer event etc... 2021-12-21 14:31:20 -05:00
Taha Afzal b399a1f9fb VoLSurfaceBBManager streamlined 2021-12-21 14:31:20 -05:00
Taha Afzal f2d000a91a Added VolSurfaceDisplayModel 2021-12-21 14:31:20 -05:00
Taha Afzal 9f28ef19ef ThreadedBB funciton name change 2021-12-21 14:31:20 -05:00
Taha Afzal 85c0e7780f Writes to threaded bb are also temptalized 2021-12-21 14:31:19 -05:00
Taha Afzal 145cf2d975 All Bus subscribers are using the templatized subscriptions 2021-12-21 14:31:19 -05:00
Taha Afzal 9d8dba23b9 threaded bb interacts with bus now 2021-12-21 14:31:19 -05:00
Taha Afzal 5a2c5e4c9a SingleVolSurfaceMarketImpliedVolSource 2021-12-21 14:31:19 -05:00
Taha Afzal 2480575e67 Straightened out (partially) some security misaallignments bw spark and aw2, added SingleOptionDriverPricePublisher 2021-12-21 14:31:19 -05:00
Taha Afzal d9337e1086 New AnalyticsServer completely hooked up 2021-12-21 14:31:19 -05:00
Taha Afzal 4a0fe9a19b Cleaning up VolSurfaceBlackboardManager 2021-12-21 14:31:19 -05:00
John Colvin 0c73900f57 build: Add --link-output-dir arg to buildspark.py 2021-12-21 11:50:54 -05:00
John Colvin f66749ee25 buildspark.py exists with code 1 on exception 2021-12-21 11:50:54 -05:00
John Colvin 043a9ecb4a Reword buildspark --output-dir help text 2021-12-21 11:50:54 -05:00
John Colvin f240b562ff Update linux docker 2021-12-21 11:32:01 -05:00
John Colvin a91ce93d43 Update externals 2021-12-21 11:31:51 -05:00
John Colvin 7819c1175a Upgrade compiler to clang-10 2021-12-11 15:50:50 -05:00
John Colvin 2ef66bc91f Fix server build after upgrading externals 2021-12-11 15:20:41 -05:00
John Colvin ea8bad4ece dev/john: Fix typo in Dockerfile 2021-12-09 14:16:52 -06:00
John Colvin 9ef529ab6c Upgrade docker 2021-12-09 11:53:49 -05:00
John Colvin fdb848eecb Remove unused import (apioptions.proto) from apicore.proto 2021-12-09 11:40:50 -05:00
John Colvin beecbbeb61 Upgrade pip when creating python virtual environment 2021-12-09 11:40:50 -05:00
Taha Afzal 58aa01de1b SingleVolSurfaceGateway completed 2021-12-09 11:40:50 -05:00
Taha Afzal b8bcc4a5f4 AnalyticsExpirationParameters 2021-12-09 11:40:50 -05:00
Taha Afzal 1cc00a9577 Hooking VolSurfaceBlackboatdManager to AnalyticsService 2021-12-09 11:40:50 -05:00
Taha Afzal 5eb1db7dd7 Start of interfacing the UI to the AnalyticsService 2021-12-09 11:40:50 -05:00
Taha Afzal c09b4e5ef4 Adding AnalyticsService to Run 2021-12-09 11:40:50 -05:00
Taha Afzal d86d621d38 Comments and wrapping up 2021-12-09 11:40:50 -05:00
Taha Afzal 0ee03a0d30 Persistence layer for vols 2021-12-09 11:40:50 -05:00
Taha Afzal 533a5c8f4a Filling up AnalyticsService 2021-12-09 11:40:50 -05:00
Taha Afzal 521e988b3a Added AnalyticsServiceServer 2021-12-09 11:40:50 -05:00
Taha Afzal 8786b48f33 Added AnalyticsService.proto 2021-12-09 11:40:50 -05:00
Taha Afzal 3f2d90c0ac Moving VoLSurfaceBlackboardManager 2021-12-09 11:40:50 -05:00
Taha Afzal 9b563e3dcb TheoPoint added 2021-12-09 11:40:50 -05:00
Taha Afzal a210e063f0 Migrating more code from edge 2021-12-09 11:40:50 -05:00
Taha Afzal 9055a6facb More classes moved 2021-12-09 11:40:49 -05:00
Taha Afzal 8f3ee23f6c SingleVolSurfaceOptionDriverSource added 2021-12-09 11:40:49 -05:00
Taha Afzal 29870ae7b0 More bus inhabitants added 2021-12-09 11:40:49 -05:00
Taha Afzal 7403155a88 Addedd SingleVolSurfaceTheoSource 2021-12-09 11:40:49 -05:00
Taha Afzal 4af73414cf Hooked a few more sources 2021-12-09 11:40:49 -05:00
Taha Afzal 6110a70b32 Added ThreadedBB interface and one user (SingleVolSurfaceDataSource) 2021-12-09 11:40:49 -05:00
Taha Afzal ed5e0a54cb Re-org'ing some 2021-12-09 11:40:49 -05:00
Taha Afzal 082b6aa86d Moved all UIAdapters from edge 2021-12-09 11:40:49 -05:00
Taha Afzal 18fb15dec4 Moving more AW2 ui code 2021-12-09 11:40:49 -05:00
Taha Afzal bf6658a265 Moved AW2 tags over 2021-12-09 11:40:49 -05:00
Taha Afzal 02728ddc56 Added tests 2021-12-09 11:40:49 -05:00
Taha Afzal 31bb4c418e Adding VoLSurface calulation code 2021-12-09 11:40:49 -05:00
John Colvin c0e75c2de2 Update CMakeDeps, CMakeDeps_win 2021-12-09 11:40:48 -05:00
John Colvin 62bf1d069c Fix build errors caused by big merge, externals upgrade
A lot of server-side changes were just merged as part of the Brandon
project (crypto).  Many of those changes were in libspark (a lib on
which both the client and server depend), and upgrades to its external
dependencies.  As a result, windows counterparts of several upgraded
external libs needed to be similarly upgraded (or added for the first
time).  These libs include: boost, btree, catch, curl, fmt, nlohmann json,
openssl, range, rxcpp, websocketpp

This change also makes protobuf generation compatible with python3, and thus
eliminates the build's dependency on python2
2021-12-09 11:40:42 -05:00
John Colvin 9091d50690 Remove Quantity negation '-' operator
This operator was a mistake to begin with, bc Quantity is unsigned
2021-12-08 10:58:00 -05:00
John Colvin 0544e21c97 Remove unnecessary includes in FlatUnorderedMap.h 2021-12-08 10:58:00 -05:00
John Colvin e9bb8201ed Add pragma once to ConfigurationState.h 2021-12-08 10:58:00 -05:00
John Colvin 75f8963ecd Merge remote-tracking branch 'origin/spark_crypto_base.server' into spark_crypto_base.client_server_merge 2021-12-07 18:33:18 -05:00
John Colvin e769926429 Update externals 2021-12-07 17:52:47 -05:00
John Colvin e09d4d24ba build: Add option to build sdk (or not)
The sdk isn't needed right now, and it adds several seconds to the build
2021-12-07 17:52:47 -05:00
John Colvin ed0924df02 fix build: Replace now-deprecated option in web build
Replace '-p' w/ '--mode production'
2021-12-07 17:52:47 -05:00
John Colvin cd6fcacc4f refactor: Clean up CryptoCommand
* Replace BinanceDemo w/ general purpose LiveLadderDemo
* Get rid of CryptoConfig.proto, as it inappropriately depended on
non-config protos
2021-12-07 17:52:42 -05:00
John Colvin 16bf52e193 refactor: Clean up MarketDataSubscription
* Define as class (not struct) to agree w/ fwd decls
* Make ctr inline since its defined in header
* Pass params to ctr by value (and std::move) rather than by const ref
  (and copy)
2021-12-06 16:41:24 -05:00
John Colvin df5aecd102 refactor: Replace refs to google/btree w/ Kronuz/btree
The former has been replaced with the latter in externals
2021-12-05 16:24:34 -05:00
John Colvin 75c0fee5bf Merge remote-tracking branch 'origin/spark_crypto_base.server' into spark_crypto_base.client_server_merge 2021-11-22 19:57:53 -05:00
John Colvin 5c251f4126 build: Add cmd to workaround vscode c# extension bug
For some reason, the build fails when the output dir is referenced by the c#
extension in vscode.  It produces errors saying various g.cs files (which are
generated for the spark csproj) could not be found.  However, examining the
contents of the output directory after the build "fails" show that those files
exist, and are in the proper build subdirectory.  Seems like a race.
2021-11-22 19:04:51 -05:00
John Colvin ccff827008 Remove unused file spark_server.sln 2021-11-22 18:26:26 -05:00
John Colvin 160769ea60 Add ladder scrollable_tick_window_size to config 2021-11-22 18:22:39 -05:00
John Colvin 16ecaa91b0 style: Clean up LadderOrdersHost 2021-11-22 17:54:06 -05:00
John Colvin 2614f91353 fix: Make order badges appear in ladder
Their positions in the LadderOrderHost were not in sync with the new
lazy/virtual visible tick range in LadderGridHost
2021-11-22 17:42:33 -05:00
John Colvin 2a9a041a36 fix: Init size_calculator earlier in NeworderTicketVM ctr
Avoids null reference exception
2021-11-22 17:33:56 -05:00
John Colvin c37ce8fab9 build (client, style): Fix typo in clean opt help text 2021-11-20 14:50:55 -05:00
John Colvin 3f38654652 refactor: Remove unused files TextBoxDialog.xaml(.cs) 2021-11-20 14:50:55 -05:00
John Colvin d54c6fe710 externals: Update linux boost includes 2021-11-20 14:50:55 -05:00
John Colvin 1ac8ceebe1 build (client): Fwd args from buildspark.cmd to buildspark.py 2021-11-20 14:50:55 -05:00
John Colvin 8cc72e6c96 build (style): Add comment abt paths wrapped in quotes 2021-11-20 14:50:55 -05:00
John Colvin 90ecb3c016 build (client): Add toggle opt to run msbuild /t:restore 2021-11-20 14:50:23 -05:00
John Colvin b3db213b1a build (client): Remove pygit2 dependency 2021-11-20 14:48:32 -05:00
John Colvin e389770e55 build (client): Don't choke on symlinked build dir 2021-11-20 14:48:32 -05:00
John Colvin 4d19101d01 build (client): Configure build with abs path to source dir 2021-11-20 14:48:32 -05:00
John Colvin 88d0f425d2 build (client): Add '--no' toggle to flag opts in buildspark.py 2021-11-20 14:48:32 -05:00
John Colvin 5a205304bb build (client): Fix build for non-default out dirs
Was building libspark and Spark.csproj separately, using msbuild for the
former and dotnet build for the latter
2021-11-20 14:48:07 -05:00
John Colvin 723442227c Update externals to include new websocketpp 2021-11-19 16:30:58 -05:00
John Colvin d4c867a835 Resurrect webserver
The webserver code was commented out when boost was upgraded, as the
former dependend on websocketpp, which, at that time, depended on the
previous version of boost.  Websocketpp has since been updated, so that
the dependency conflict no longer exists
2021-11-19 16:30:58 -05:00
John Colvin fd271b992a Remove ICE symbols from default conf 2021-11-19 16:30:58 -05:00
John Colvin f880399c4c Add unsubscribe fn to MarketDataGateway
Seems like this was accidentally omitted
2021-11-19 16:30:58 -05:00
John Colvin b1d3acb9f7 fix typo: Change < to <= in WebsocketClient::start 2021-11-19 16:30:58 -05:00
John Colvin 68848a74a4 fix build: Correct typo in include path in spreader_tests 2021-11-19 16:30:58 -05:00
John Colvin 9b7ac8d6eb refactor: Shorten field names in SecurityCommon
* security_id -> id
* security_group -> group
* security_desc -> desc
2021-11-19 16:30:58 -05:00
John Colvin 493262c99a Update docker/linux 2021-11-19 16:30:58 -05:00
John Colvin d9ff44cc93 docker (dev/john): Don't backup default .bashrc and .profile 2021-11-19 16:30:58 -05:00
John Colvin 5e3530faef docker (dev/john): Don't build fish docs
This breaks the build for some reason (don't care enough to investigate)
2021-11-19 16:30:58 -05:00
John Colvin c5ca47396b docker (dev/john): Don't install apt fish or git-powerline 2021-11-19 16:30:58 -05:00
John Colvin 2c21d4ddad docker (dev/john): Run apt w/ noninteractive frontend 2021-11-19 16:30:58 -05:00
John Colvin 8d5cae835f docker (dev/john): Update apt before installing fish dep 2021-11-19 16:30:58 -05:00
John Colvin 84221fe0d8 cli: Add emumba deribit demo subcommand 2021-11-19 16:30:58 -05:00
John Colvin 644613749d style (dev/john): Clean up Dockerfile
* Indent command chains
2021-11-19 16:30:58 -05:00
John Colvin c2a783ce96 refactor: Use protos in new Security class 2021-11-19 16:30:58 -05:00
John Colvin 23d645473c Update docker/linux to upgraded_18.04 branch 2021-11-19 16:30:58 -05:00
John Colvin 0f43de79e1 Update externals to use new json.hpp and node_modules 2021-11-19 16:30:58 -05:00
John Colvin eb86db3ef6 build (web): Symlink new node_module dirs in setup_builds 2021-11-19 16:30:58 -05:00
John Colvin 263c0503dc Don't link libiml (it's an artifact from spartan) 2021-11-19 16:30:58 -05:00
John Colvin 47cef95b11 build (web): Upgrade node packages 2021-11-19 16:30:58 -05:00
John Colvin 5a71cb4ac6 Add john's vscode files 2021-11-19 16:30:58 -05:00
John Colvin 0c3b3e9aa6 fix build: Comment out unused refs in websocketclient 2021-11-19 16:30:58 -05:00
John Colvin 09a5343daa Fix fsharp indentation error in gen'd code 2021-11-19 16:30:58 -05:00
John Colvin 254dcff1f6 Try to fix the goddamn web build
These dependencies are way to fragile.  It is a nightmare trying to
upgrade them.
2021-11-19 16:30:58 -05:00
John Colvin 2891e01de1 Add john's dev scripts (docker-related) 2021-11-19 16:30:58 -05:00
John Colvin f42568bed4 docker (john): Get john's vim files in Dockerfile 2021-11-19 16:30:58 -05:00
John Colvin a28f667df5 docker (john): Get john's bash config in Dockerfile 2021-11-19 16:30:58 -05:00
John Colvin ff1d561f7b docker (john): Change user to 'john' 2021-11-19 16:30:58 -05:00
John Colvin 94a91215fb Upgrade dev/john Dockerfile to ubuntu 21.04 2021-11-19 16:30:58 -05:00
John Colvin dccb50d269 fix build: Satisfy new compilers gcc10, clang12 2021-11-19 16:30:58 -05:00
John Colvin 6ca7d3904d Make plugin.py use env python (not hardcoded path) 2021-11-19 16:30:58 -05:00
John Colvin 0f81af3095 cli: Add crypto subcommand
This runs a test/example app that subscribes to binance md and prints
depth to the console
2021-11-19 16:30:58 -05:00
John Colvin 1ae124f0b2 Add SecurityResolver w/ fn bones 2021-11-19 16:30:58 -05:00
John Colvin e83c466bf2 Port over some handy tools from spartan 2021-11-19 16:30:58 -05:00
John Colvin 9a63cfa956 Add .tmp to gitignore 2021-11-19 16:30:58 -05:00
John Colvin 18250a98f7 Add fn to init WebsocketClientConfiguration w/ a url 2021-11-19 16:30:58 -05:00
John Colvin d18547806e Add output operators to websocket classes 2021-11-19 16:30:58 -05:00
John Colvin 03b475add1 fix build: Resolve struct/class fwd decl conflicts 2021-11-19 16:30:58 -05:00
John Colvin b35c43b55c refactor: Rename communication namespace to match path 2021-11-19 16:20:45 -05:00
John Colvin 48862f2b8d refactor: Rename 'communication' dir 'io' 2021-11-19 16:20:45 -05:00
John Colvin 41714fe3f2 Stop tracking .vscode 2021-11-19 16:20:45 -05:00
John Colvin f9db93e41a Add simple HTTPClient
The binance depth stream must be bootstrapped with a depth snapshot,
which is retrieved via an HTTP GET request
2021-11-19 16:20:45 -05:00
John Colvin 6573985bea Overload price comp fns to accept doubles 2021-11-19 16:20:41 -05:00
John Colvin 77dfe79d95 Add proto file settings to clang-format 2021-11-19 16:19:26 -05:00
John Colvin 1679dc61a1 Add bts_assert_msgf macro for templated assert msgs 2021-11-19 16:19:26 -05:00
John Colvin 07afba0b9e Remove websocket bones 2021-11-19 16:19:26 -05:00
John Colvin c018f86671 Add SecurityStore bones/basic impl 2021-11-19 16:19:26 -05:00
John Colvin 7eb8f0d685 Add protos for crypto 2021-11-19 16:19:26 -05:00
John Colvin 2e7bdbcac5 Add classes that mirror binance json structures 2021-11-19 16:19:26 -05:00
John Colvin 66f7474d62 style: Declare default copy ctrs for good taste
This will also satisfy more recent compilers, for when we finally
do upgrade the build
2021-11-19 16:19:26 -05:00
John Colvin 1ed3008c1c refactor: Split OrderGateway classes into sep files 2021-11-19 16:19:26 -05:00
John Colvin b3dbc041b5 refactor: Split md gateway classes into sep files 2021-11-19 16:19:26 -05:00
John Colvin 7bc5385783 Port Book type over from spartan 2021-11-19 16:19:23 -05:00
John Colvin 02513a8779 refactor: Make BookLevel fields non-const
Incremental diff streams would otherwise have to create entire new books
for each update (no copy assignment operator for elements which are stored in
an array)
2021-11-19 16:18:20 -05:00
John Colvin 27100e2e2d Implement OptionSecurity (was empty class) 2021-11-19 16:18:20 -05:00
John Colvin 4860d0cb3d refactor: Move classes out of MarketDataCommon.h into own files 2021-11-19 16:18:15 -05:00
John Colvin a0ce1b361f Add >=, <= operators to ValueWrapper 2021-11-19 15:42:35 -05:00
John Colvin 7ede27e90b refactor: Clean up ValueWrapper 2021-11-19 15:42:33 -05:00
John Colvin 0cfb27feba refactor (flatten): Move ExecutionGatewayFactory to own file 2021-10-25 13:27:12 -04:00
John Colvin 85c567ffc5 refactor (flatten): Move OrderServices to orderman dir 2021-10-25 13:27:12 -04:00
John Colvin 694309f80b refactor (flatten): Move OrderBuilder to orderman dir 2021-10-25 13:27:12 -04:00
John Colvin 0a6a4c35fa refactor (flatten): Move OrderServiceServer to orderman dir 2021-10-25 13:27:12 -04:00
John Colvin 923d9ee512 refactor (flatten): Move ChildOrder to orderman dir 2021-10-25 13:27:12 -04:00
John Colvin f2671ea4ba refactor: Remove unused file IOrderServices 2021-10-25 13:27:12 -04:00
John Colvin 0d3e27932a refactor (flatten): Move OrderRouter to orderman dir 2021-10-25 13:27:12 -04:00
John Colvin cc81fd3244 refactor (flatten): Move ilink3 dir to lib/orderman 2021-10-25 13:27:12 -04:00
John Colvin 014effef90 refactor: Move IExchangeGateways to gateways dir 2021-10-25 13:27:12 -04:00
John Colvin 903e59a814 refactor: Move order msg classes to own files 2021-10-25 13:27:12 -04:00
John Colvin 7e2b21602a refactor: Move Governor defs to .cpp 2021-10-25 13:27:12 -04:00
John Colvin aee394a792 refactor (flatten): Move Governor.h out of own dir 2021-10-25 13:27:12 -04:00
John Colvin e5e20af1f7 style: Clean up OrderServices
* Move non-template definitions to .cpp
* Move template definitions to bottom of .h
2021-10-25 13:27:12 -04:00
John Colvin 2d09a1ce33 Add .clangd to gitignore 2021-10-25 13:27:12 -04:00
John Colvin e0f9e0c48c Add .cache to gitignore 2021-10-25 13:27:12 -04:00
John Colvin f4f67d4289 Let the ui convert synth net change to n ticks
Whether or not to display a price in dollar or n ticks form is a display
setting, and furthermore the front end assumes all prices are in dollar
form
2021-10-25 13:27:12 -04:00
John Colvin ce68617d86 refactor: Rename TestObserver -> TestAlgo 2021-10-25 13:27:12 -04:00
John Colvin ba53334a7c Introduce SyntheticBook class
* Price levels are computed lazily

* Once computed, a price level can be accessed in O(1)

* Unit tests piggy back on rigorous existing unit tests in
  'synthetic_book_computation'

* Not integrated into the matcher, as that is non-trivial
  work, and the March 2021 roll is fast approaching
2021-10-25 13:27:12 -04:00
John Colvin 91925f9ec6 style: Run clang format on a few files 2021-10-25 13:27:12 -04:00
John Colvin 6b9b8ac403 Add ++/-- operators to Quantity 2021-10-25 13:27:12 -04:00
John Colvin 01d9af0bb2 Remove Price::abs method's price param, since it's non-static 2021-10-25 13:27:12 -04:00
John Colvin 63549fd3e2 refactor: Break up BookStatRecorder 2021-10-25 13:27:12 -04:00
John Colvin e3cd1e9fc3 refactor: Replace includes w/ fwd decls to speed up build
Also replace public templated function FifoMatcherContext::reset
with non-templated overloads, which call a private templated impl
2021-10-25 13:27:12 -04:00
John Colvin d0ceed37b5 cli: Remove ValidateFifo cmd (obsolete) 2021-10-25 13:27:12 -04:00
taha afzal 849adc5d7c Completed OrderGatewy inteface 2021-10-22 07:47:39 -04:00
Taha Afzal 317fc93c76 OrderGateway added for EMumba integration 2021-10-20 20:04:42 -04:00
Taha Afzal 3ff6c725a3 Hooked book 2021-10-18 13:51:01 -04:00
Taha Afzal 205953d928 Added more handler code to EmumbaMDListener 2 2021-10-15 19:32:46 -04:00
Taha Afzal 8a01969796 Added more handler code to EmumbaMDListener 2021-10-15 16:13:35 -04:00
Taha Afzal 38d94663cf More flesh on the skeleton 2021-10-14 16:09:14 -04:00
Taha Afzal c85ef44a1b Added skeleton for EmumbaMDListener 2021-10-13 12:48:33 -05:00
Taha Afzal 648a30ecf8 Fixing clang build 2021-10-11 19:46:34 -04:00
Taha Afzal fc7237c7b9 WebsocketClient working after and getting data from binance after adding the SSL handshake 2021-10-08 00:22:52 -04:00
Taha Afzal 936a3b624b Added WebsocketSyncClientTests 2021-10-07 14:20:49 -04:00
Taha Afzal fc4fa3893c added comments to the websocket interface and structures 2021-10-04 17:34:30 -04:00
Taha Afzal e34a2f5195 WebsocketClient - allows a user of this class to connect to a host url, and send and receive data asyncronously 2021-10-04 15:55:46 -04:00
Pedro Pinto ce98e862c3 Upgraded boost 2021-10-03 14:39:36 -04:00
Taha Afzal 930357d11c WebsocketClient 2021-09-27 11:52:57 -05:00
Taha Afzal 43c3584dd2 unified market data interface on which we will connect to crypto exchanges 2021-09-21 13:18:46 -05:00
John Colvin c0def90173 refactor (flatten): Move ExecutionGatewayFactory to own file 2021-09-15 23:53:59 -04:00
John Colvin 0d918510fd refactor (flatten): Move OrderServices to orderman dir 2021-09-15 23:53:59 -04:00
John Colvin 06141850fa refactor (flatten): Move OrderBuilder to orderman dir 2021-09-15 23:53:58 -04:00
John Colvin 8eab9a3f15 refactor (flatten): Move OrderServiceServer to orderman dir 2021-09-15 23:53:58 -04:00
John Colvin a7b7c45657 refactor (flatten): Move ChildOrder to orderman dir 2021-09-15 23:53:58 -04:00
John Colvin 15004f2762 refactor: Remove unused file IOrderServices 2021-09-15 23:53:58 -04:00
John Colvin be8242c7ac refactor (flatten): Move OrderRouter to orderman dir 2021-09-15 23:53:58 -04:00
John Colvin 601fd98508 refactor (flatten): Move ilink3 dir to lib/orderman 2021-09-15 23:53:58 -04:00
John Colvin c8bf9b41e4 refactor: Move IExchangeGateways to gateways dir 2021-09-15 23:53:57 -04:00
John Colvin 8d73cef4b2 refactor: Move order msg classes to own files 2021-09-15 23:53:57 -04:00
John Colvin 6f4a0f7ce4 refactor: Move Governor defs to .cpp 2021-09-15 23:53:57 -04:00
John Colvin a67056fbc9 refactor (flatten): Move Governor.h out of own dir 2021-09-15 23:53:57 -04:00
John Colvin cc67c3ced1 style: Clean up OrderServices
* Move non-template definitions to .cpp
* Move template definitions to bottom of .h
2021-09-15 23:53:57 -04:00
John Colvin edb2f1bac2 Fix server build (linux compiler doesn't like pragma push) 2021-09-15 23:53:57 -04:00
John Colvin 264ce8ddc4 Add .cache to gitignore 2021-09-15 23:53:57 -04:00
John Colvin 17642ca84b build: Use dotnet build (instead of msbuild) for c# projects
Continue using msbuild for c++ (i.e., libspark)
2021-09-15 23:53:57 -04:00
John Colvin f46d91a57e build: Remove erroneous PropertyGroup 2021-09-15 23:53:57 -04:00
John Colvin 8d145c9075 build: Remove erroneous AvailableItemName tags 2021-09-15 23:53:57 -04:00
John Colvin 78403a0baf style: Format msbuild project files 2021-09-15 23:53:57 -04:00
John Colvin 353b2fd7e0 build: Remove unused items in msbuild files 2021-09-15 23:53:57 -04:00
John Colvin ec1e1fda92 Add recursive .vscode dirs to gitignore 2021-09-15 23:53:57 -04:00
John Colvin da5331d8ca Stop tracking .vscode files 2021-09-15 23:53:57 -04:00
John Colvin 939f44b48c build: Refine build scripts so they work out of the box
* Automatically create python virtual envs
* Automatically actvate the vs dev prompt

Note: the python39 virtual env will remain active in the calling shell.
This behavior may be changed down the road.
2021-09-15 23:53:57 -04:00
John Colvin 5939df9345 Define naming conventions in editorconfig 2021-09-15 23:53:57 -04:00
John Colvin c366b9f4c8 style: Fix name violations, etc. on LadderGridHost 2021-09-15 23:53:52 -04:00
Taha Afzal d23baec6d9 comments and los 2021-09-10 09:13:59 -05:00
John Colvin 835e0f50ca Run dotnet format on spark proj 2021-09-06 19:35:31 -04:00
John Colvin ff4f338898 Add dotnet format tool 2021-09-06 19:35:30 -04:00
John Colvin 113871a150 Rename requirements.txt -> requirements27.txt
A requirements39.txt file was created (for a python 3.9 venv) after
requirements.txt, so the version specifier now seems appropriate.
2021-09-06 19:35:30 -04:00
John Colvin c31b5cf2b4 Run omnisharp formatter on spark project 2021-09-06 19:35:24 -04:00
John Colvin 7d75a6c3a9 Make ladder panel prices hyperlinks to jump to price 2021-09-06 18:34:28 -04:00
John Colvin 3995351b54 Fix bug where session range hidden 2021-09-06 18:34:28 -04:00
John Colvin 795942d8a9 Add style.yapf (python formatting config) 2021-09-06 18:34:28 -04:00
John Colvin f4be975fec Add omnisharp.json (c# formatting config) 2021-09-06 18:34:28 -04:00
John Colvin b7a0cc5c24 Add .venv dirs to .gitignore 2021-09-06 18:34:28 -04:00
John Colvin 8a666ae397 Add requirements39.txt for python 3.9 env 2021-09-06 18:34:28 -04:00
John Colvin 2cc8e519d8 Add cached branch build dirs to gitignore 2021-09-06 18:34:28 -04:00
John Colvin 48cd21aa46 build: Add option to cache branch builds 2021-09-06 18:34:27 -04:00
John Colvin 531fbb63be build: Add buildspark.py (bc bat is a horrible language) 2021-09-06 18:27:32 -04:00
John Colvin 6f3945cced Implement IObservable in SingleValuePump for convenience 2021-09-06 18:27:32 -04:00
John Colvin 9dc3c32769 Add bit_span param to auto_phase (hash fn)
Brought over from DJ_ICE bc it seems like a useful param for custom
hash impls (though there isn't an immediate need for it).
2021-09-06 18:27:32 -04:00
John Colvin 3f2f19f73c fix: Load FairValueLine price type in settings dialog 2021-09-06 18:27:32 -04:00
John Colvin 9a013d783e Add fair value lines for DJ 2021-09-06 18:27:32 -04:00
John Colvin 6ea217b674 fix: ContractPicker syncs selected sec/md w/ selected key 2021-09-06 18:27:32 -04:00
John Colvin 0356221066 ui (DJ): Avoid darkening price text in session range in ladder
Put the session range visual beneath the column backgrounds
(on the z axis), and make the background slightly translucent
while leaving the font color fully opaque.  This effectively
darkens the former without changing the latter.
2021-09-06 18:27:32 -04:00
John Colvin 50a0ed3823 Set alpha bits to 'FF' in historic ladder settings colors 2021-09-06 18:27:32 -04:00
John Colvin 1686d41c0c ui (dj): Reduce opacity of session range layer in ladder 2021-09-06 18:27:32 -04:00
John Colvin 65f2efa9a0 ui (dj): Make ladder look more like tt
These changes can be configured via LadderKnobs (defined in UI.proto)
2021-09-06 18:27:32 -04:00
John Colvin 84e9cf5261 fix: Correct visibility binding in ladder session high/low
The other price points visibility bindings were refactored
in a similar manner, for consistency's sake.
2021-09-06 18:27:32 -04:00
John Colvin dd256409e9 feat (DJ): Right align bid, price, and ask column text in ladder
This is hardcoded (not configurable via settings).
2021-09-06 18:27:32 -04:00
John Colvin 1e68c047ea feat (DJ): Give bid/ask cells with markets a lighter background in ladder
There is a small chance this will impact performance when
a large number of ladders (50+) are open.  Therefore, this
behavior can be toggled on/off in config, via
LadderKnobs.lighten_market_background.
2021-09-06 18:27:31 -04:00
John Colvin 56340fcc60 refactor: Consolidate tick tests after tricky merge
The branches that were merged, DJ_ICE and
DJ_ICE_ladder_price_aggregation, both added new
tick tests.  The former put them in a new file,
"TickTests.cs," while the latter added them
to "SecurityTests.cs."  This commit places all
tick tests in "TickTests.cs."
2021-09-06 18:27:31 -04:00
John Colvin af639286e1 Add tooltips to ladder left-panel price points 2021-09-06 18:27:31 -04:00
John Colvin bf32b6262d Tailor default ladder price point settings for DJ 2021-09-06 18:27:31 -04:00
John Colvin f2dd283751 feat (DJ): Display settings for ladder left-panel price points
* Add background and font settings for all price points

* Indicate 'day change' sign with modal settings (positive,
  zero, and negative) for background and font color

* Hide 'day change' leading zeros in tick part

* Don't show 'day change' zero integer part (e.g.,
  '25' instead of '0.25')
2021-09-06 18:27:31 -04:00
John Colvin c27cd8ca54 Make a few classes/structs public in spark_core
They are referenced in spark proj, so prob should have always been
public.
2021-09-06 18:27:31 -04:00
John Colvin 75c86f7b69 config toggle to show/hide ladder scrollbar for dj (defaults to hide) 2021-09-06 18:27:31 -04:00
John Colvin 2e1d65fa33 frozen price lines in ladder (for dj) 2021-09-06 18:27:31 -04:00
John Colvin 5cdd2629bf Copy a few ext methods from DJ_ICE 2021-09-06 18:27:31 -04:00
John Colvin 026bf6fb07 fix ColumnBase.SortDirection binding to DIYGridColumnModel 2021-09-06 18:27:31 -04:00
John Colvin 9054049ebf SelectionModel should only select the pending selection once (was reselecting it every time the items changed) 2021-09-06 18:27:31 -04:00
John Colvin d7a044c894 remove unused 'actual_width' prop from DIYGridColumnModel 2021-09-06 18:27:31 -04:00
John Colvin 2da8895f3e synchronize column model's GridColumnSettings with the column view 2021-09-06 18:27:31 -04:00
John Colvin 1e1a5897bc TextCell available_size is updated in ArrangeOverride 2021-09-06 18:27:31 -04:00
John Colvin d3a635b156 parameterize SecurityStore.join (don't mess with core logic/impl) 2021-09-06 18:27:31 -04:00
John Colvin f08c8a51ad made new SelectorVM (todo: replace refs to old one) 2021-09-06 18:27:31 -04:00
John Colvin 2f08e92a5e add SimpleGridSettingsManagerVM (uses DIYGridColumnModels instead of the view type ColumnBase) 2021-09-06 18:27:30 -04:00
John Colvin 336b009f24 add DIYGridColumnModel, so the DIYGrid column paradigm is cleanear mvvm 2021-09-06 18:27:30 -04:00
John Colvin e027454a36 add get/load_state methods to non-generic IDataGridColumnFilter 2021-09-06 18:27:30 -04:00
John Colvin af968c2c58 add PropertyEqualityComparerAttribute (supports simple automatic equality impl) 2021-09-06 18:27:30 -04:00
John Colvin 25a954b13c unify SecurityCriteria initialization with securities (use pretty_name if single sec) 2021-09-06 18:27:30 -04:00
John Colvin a45d8761e5 remove with_reguard_to_price param from tick 'format' extension 2021-09-06 18:27:30 -04:00
John Colvin e1d9ca6325 fix typo in ConvertUtils.update_value_type (was missing negation '!') 2021-09-06 18:27:30 -04:00
John Colvin d3853ddbf8 fix tick unit tests, and reorganize security tests a bit 2021-09-06 18:27:30 -04:00
John Colvin 7efa62c994 add precision param (epsilon) to tickup/down methods 2021-09-06 18:27:29 -04:00
John Colvin 9284bf5b14 TickFactors are cached in a ThreadStatic dictionary rather than concurrent (no locks required) 2021-09-06 18:27:29 -04:00
John Colvin 88ebf9f86f ticksize extension handles invalid tick props gracefully 2021-09-06 18:27:29 -04:00
John Colvin 85ab9d98de remove unused parameter from TickTestHelper.full_ticks_from_zero 2021-09-06 18:27:29 -04:00
John Colvin b8278bb310 fix ladder session low/high grid animation (was not using the ticks per row setting) 2021-09-06 18:27:29 -04:00
John Colvin 00ef27bf8c LadderGridHost invalidates '_spec' on connect_vm (not just on settings updates) 2021-09-06 18:27:29 -04:00
John Colvin d090a6d851 fix typo in LadderGridHost._spec getter (was accidentally returning the fallback value) 2021-09-06 18:27:29 -04:00
John Colvin 573b5e1c62 make tick unit tests more robust (test tick_up/down, use these methods to covalidate results) 2021-09-06 18:27:29 -04:00
John Colvin f6b1cf7c3a include Sim ContractSpecs in tick unit tests 2021-09-06 18:27:29 -04:00
John Colvin 08643c8af1 ladder settings dialog - fix 'when implied is > 0' label alignment 2021-09-06 18:27:29 -04:00
John Colvin b2b8c083a6 added tick unit test (namely for 'full_ticks_from_zero' method) 2021-09-06 18:27:29 -04:00
John Colvin fa882d5472 added 'full_ticks_from' method which accepts an origin price (instead of just an arbitrary 0) 2021-09-06 18:27:28 -04:00
John Colvin 8760481153 TickUtils.full_ticks_from_zero checks pricebreak 2021-09-06 18:27:28 -04:00
John Colvin 33338d2a0a move LadderUtils methods to TickUtils (all were related to ticks) 2021-09-06 18:27:28 -04:00
John Colvin 5b85c20d32 move tick data\utils to spark_core 2021-09-06 18:27:28 -04:00
John Colvin bbf8decd0a add 'ticks per row' ladder setting 2021-09-06 18:27:28 -04:00
John Colvin d5315054a2 add TickUp/DownCommand dependency props to TickUpDownUInt 2021-09-06 18:27:28 -04:00
John Colvin 6e7aa3fe9a fix ladder autoscroll (works perfect now) 2021-09-06 18:27:28 -04:00
John Colvin 48b42bf41f check pt 2021-09-06 18:27:28 -04:00
John Colvin e2f7c2ef20 Update devcmd.cmd for vs 16 2019 2021-09-06 17:45:53 -04:00
John Colvin 27294822ef Restore .vscode files in dev directory 2021-09-06 17:45:53 -04:00
John Colvin f0250338eb Don't track .vscode files in source control 2021-09-06 17:45:50 -04:00
John Colvin 7ee3ef4737 build: Init spark_build_python_path in Directory.Build.Props 2021-09-06 17:41:56 -04:00
John Colvin 03a1cf0395 Add .tmp to gitignore 2021-09-06 17:41:53 -04:00
John Colvin 5ad70b83d6 build: Add step to copy cpp libs to new client out dir 2021-09-06 17:40:58 -04:00
John Colvin 8eba500d1b Avoid race conditions exposed by new OnDispatcher impl 2021-09-06 17:40:58 -04:00
John Colvin 0a3d361621 refactor code to use dotnet core 6
Most changes revolve around MEF, as the new version (5.0.0) lacks
feature parity with the previous version (3.1)
2021-09-06 17:40:58 -04:00
John Colvin fd5f54d8c9 Implement 'OnDispatcher' for dotnet core 6
That extension method doesn't exist in this version
2021-09-06 17:40:58 -04:00
John Colvin 957daf5392 build: Upgrade client build to net5.0 2021-09-06 17:40:58 -04:00
John Colvin c4953590bc Remove spark_excel from spark_client.sln 2021-09-06 17:40:58 -04:00
John Colvin 578d6c8518 build: Update win compiler to Visual Studio 16 2019 2021-09-06 17:35:03 -04:00
John Colvin 54bcff0b8f import compute_synthetic_book method from spartan 2021-09-06 17:32:34 -04:00
Pete Fisher 9f74e57a05 updating submodule to latest 2021-09-06 17:28:33 -04:00
John Colvin a58298edb9 Update externals for vs 2019 compilation 2021-09-06 15:03:04 -04:00
John Colvin c7e2905255 Disable align related warning in vs 2019 build 2021-09-06 15:03:04 -04:00
John Colvin 799126f06a Update build scripts to use vs 2019 build tools 2021-09-06 15:03:04 -04:00
Taha Afzal 1d041357aa Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2021-04-08 22:59:17 -04:00
Pedro Pinto d53bfb70ff Added structured logging to SQLite. 2021-02-16 18:20:37 -05:00
Pedro Pinto e4a9636583 Added spartan logging. 2021-02-16 16:06:59 -05:00
Taha 3c744e9678 Adding sec/spread (optional) parameter and better logs 2021-02-15 13:42:18 -06:00
Pedro Pinto 28cfa69a23 Added ringbuffer. 2021-02-14 10:26:29 -05:00
Pedro Pinto e4c8437f1f And yet some more. 2021-02-12 12:52:52 -05:00
Pedro Pinto b5668d9534 Fixed the build some more. 2021-02-12 12:39:21 -05:00
Pedro Pinto e756fece66 Fix build. 2021-02-12 12:34:49 -05:00
Pedro Pinto 80c2c58a5a More refactoring 2021-02-12 09:17:28 -05:00
Pedro Pinto 047aa43880 The great flatening. 2021-02-12 09:03:20 -05:00
Pedro Pinto e0d33e6099 Cleaner feed handler. 2021-02-11 17:52:40 -05:00
Pedro Pinto f60a55815d Cleaned up gateway. 2021-02-11 17:47:59 -05:00
Pedro Pinto 33bde966b7 Algo manager. 2021-02-11 17:10:30 -05:00
Pedro Pinto 77210f7c90 Cleaning up Error handling. 2021-02-11 16:58:21 -05:00
Pedro Pinto 058f32c941 IL3 cleanup. 2021-02-11 16:49:33 -05:00
Pedro Pinto 979f06e6d0 Fixed release build. 2021-02-11 14:58:20 -05:00
Pedro Pinto 595b77c3c6 More clean up. 2021-02-11 13:40:51 -05:00
Pedro Pinto 2788ea31ff Moved to delegates. 2021-02-11 13:07:46 -05:00
Pedro Pinto 94d9601d23 Removed obsolete interfaces. 2021-02-10 14:41:24 -05:00
Pedro Pinto 51520e0e0a Changed MD to use delegates. 2021-02-10 14:34:00 -05:00
Pedro Pinto 6bb8da9a36 Minor doc. 2021-02-10 08:52:18 -05:00
Pedro Pinto cde3f7900f Fixed broken build scripts. 2021-02-10 08:50:06 -05:00
Pedro Pinto 357d4625fa Cleaned up delegate. 2021-02-10 08:49:18 -05:00
Pedro Pinto 51b37abae7 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2021-02-09 21:57:18 -05:00
Pedro Pinto cca7ded152 More algo man. 2021-02-09 21:56:37 -05:00
Pedro Pinto 3d9aa58ac1 Added a FAF Delegate. 2021-02-09 21:55:58 -05:00
John Colvin 695d7e4f74 fix: Initialize '_args' member in md subcommands 2021-02-09 16:33:12 -06:00
John Colvin 7bec8a103b build: Change build path to 'build/<compiler>/<build_type>' 2021-02-09 16:33:12 -06:00
John Colvin 3be4c57530 style: Format vscode json files
* Indent with 2 spaces
2021-02-09 12:18:23 -06:00
John Colvin 70d0ed54a4 fix: Apply ib qty change in OrderModification::apply 2021-02-09 12:11:15 -06:00
John Colvin 36ac807635 vscode: Tweak presentation of linux_build task 2021-02-09 12:11:15 -06:00
John Colvin 430a9b38ef refactor: Make SecurityMatcher::book return const BookSide& 2021-02-09 12:11:15 -06:00
Pedro Pinto e3574e9d23 mdp3 removal. 2021-02-09 07:47:01 -05:00
Pedro Pinto 6591ed7a3c less mdp3. 2021-02-08 21:45:17 -05:00
Pedro Pinto 5f292ae46a More mdp3 excising. 2021-02-08 20:30:24 -05:00
Pedro Pinto bd9f5ff862 Removing mdp3. 2021-02-08 19:50:03 -05:00
Pedro Pinto 69614a158e Towards removing mdp3:: 2021-02-08 19:46:37 -05:00
Pedro Pinto cf8ec8bbad Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2021-02-08 16:50:46 -05:00
Pedro Pinto 91c3d820fc Towards an algo manager. 2021-02-08 16:50:40 -05:00
Taha f435203794 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2021-02-08 14:57:20 -06:00
Taha b4c013f4da Logging mode, log shots in addition to logging all active polygon states 2021-02-08 14:54:21 -06:00
Pedro Pinto 37ecb69379 Towards an algo manager. 2021-02-08 15:19:17 -05:00
Pedro Pinto d1643e9a09 More refactoring. 2021-02-08 15:13:37 -05:00
Pedro Pinto 0456d837d8 Continued to refactor feed handler. 2021-02-08 11:29:23 -05:00
Pedro Pinto b493b17602 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2021-02-08 09:24:25 -05:00
Pedro Pinto 206386b263 Separated pure MD interface (IFeedObserver) from analysis obs. 2021-02-08 09:23:16 -05:00
Pedro Pinto 51d336405a More refactoring. 2021-02-08 09:07:40 -05:00
taha e068a3807a Added logs for when file is not found 2021-02-07 00:05:32 -06:00
taha f585f54016 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2021-02-06 22:54:31 -06:00
taha cf3b87d3aa Fixed the logs (and got rid of prev value, we were not using it and it was adding extra unneeded complexity) 2021-02-06 22:54:24 -06:00
Pedro Pinto 3164c0fd56 Refactor. 2021-02-05 21:58:44 -05:00
Pedro Pinto bdfed43b01 Refactor. 2021-02-05 21:09:37 -05:00
Pedro Pinto 1e794aaa12 Refactored. 2021-02-05 20:30:16 -05:00
Pedro Pinto 1297b97b2d Fixed build. 2021-02-05 20:06:18 -05:00
Pedro Pinto ca80857607 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2021-02-05 18:41:02 -05:00
Pedro Pinto 417e331e8e Cleaned up mdp3. 2021-02-05 18:37:12 -05:00
taha 8602da1753 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2021-02-05 00:25:21 -06:00
taha 0c9af3ffee Added order key to 2 log messages 2021-02-05 00:25:15 -06:00
John Colvin 12ba2a2724 fix (cli): Add md->channels subcmd 2021-02-04 13:08:39 -06:00
Pedro Pinto e892b8b3e5 Towards il3 new 2021-02-04 13:49:17 -05:00
John Colvin 8d91d597fe fix: Repair 'sparkd run' cmd (so client/ui can connect)
This was broken in the cli11 revamp.
2021-02-03 23:59:54 -06:00
Pedro Pinto b8f146364b Windows continues to suck ass. 2021-02-03 16:17:28 -05:00
Pedro Pinto 3866f8709f Fucking windows include order bullshit. 2021-02-03 16:17:14 -05:00
Pedro Pinto 0eeffd1984 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2021-02-03 14:54:24 -05:00
Pedro Pinto b15973b00c Adding market segment id. 2021-02-03 14:54:08 -05:00
Pedro Pinto ddf65972c0 Trying to fix windows build. 2021-02-03 14:52:05 -05:00
Taha Afzal c10bf44bfc Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2021-02-03 14:46:35 -05:00
Taha Afzal 4bf9be860b comments added for sniper 2021-02-03 14:46:29 -05:00
Pedro Pinto e0313958b3 Merged 2021-02-03 11:15:57 -05:00
Pedro Pinto cda4c522fd Some refactoring in il3 store. 2021-02-03 11:12:44 -05:00
Taha Afzal 38bd2ac74c Removing sim switch for security names 2021-02-02 20:31:42 -06:00
Pedro Pinto 36da47f66e MDP3 refactoring. 2021-02-02 14:11:04 -05:00
Taha Afzal 805efc912e Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2021-02-02 13:37:59 -05:00
Taha Afzal 3642dbcd86 more guard rails 2021-02-02 13:37:37 -05:00
Pedro Pinto d3cfe1f6e1 Refactor. 2021-02-02 09:43:09 -05:00
John Colvin 88acbdd8b9 refactor: Replace std::maps with boost flat_maps in Trace 2021-02-01 23:44:21 -06:00
John Colvin 214f2667f2 vscode: Reference clang symbols/include paths in c_cpp_properties 2021-02-01 23:44:21 -06:00
John Colvin 7b16cc9d7b fix: Clear used_order_keys in Matcher::clear 2021-02-01 23:44:21 -06:00
John Colvin 9035ed453f vscode: Add spartan dir to include/browse paths 2021-02-01 23:44:21 -06:00
John Colvin b0affc8611 Add BookLevel != operator
Define both == and != operators in BookLevel.cc
2021-02-01 23:44:21 -06:00
John Colvin 09fb35c80b refactor: Move Quantity method/op defs to Quantity.cc
Also restyle code in a manner similar to that of the Price operator
code (it's a little cleaner, and brings about consistency).
2021-02-01 23:44:21 -06:00
John Colvin 6badc8099f refactor: Make ValueWrapper constructors constexpr 2021-02-01 23:44:21 -06:00
John Colvin 8520add970 Replace includes with fwd declarations in FifoMatcherContext 2021-02-01 23:44:21 -06:00
John Colvin 058b4d0020 refactor: Move MatcherOrder struct into its own file 2021-02-01 23:44:21 -06:00
John Colvin 68db9e1254 refactor: Make FifoMatcherContext a class instead of struct 2021-02-01 23:44:21 -06:00
John Colvin 0cddda43f2 Replace includes with fwd declarations in FifoMergedSecurityMatcher 2021-02-01 23:44:21 -06:00
John Colvin 077ce786cb refactor: Rename 'fill_depot' files 'FillDepot' 2021-02-01 23:44:21 -06:00
John Colvin 46de6b8d8b Optimize FifoMergedSecurityMatcher logging
* Reduce string copying by using fmt::format

* Shorten log header prefix (messages that fit on one line are easier to
  read)
2021-02-01 23:44:21 -06:00
John Colvin 1aea4beffe refactor: Matcher conveys updates with OrderModification struct
The OrderModification explicitly indicates which order properties have
changed, so the FifoSecurityMatcher does not need to infer this
information from arbitrary signals in the OrderUpdate.
2021-02-01 23:44:21 -06:00
John Colvin 38a5341d08 fix: Don't automatically reset show qty on passive updates 2021-02-01 23:44:21 -06:00
John Colvin 17752dcce1 refactor: FifoImpliedSecurityMatcher uses new LegDefinition type 2021-02-01 23:44:21 -06:00
John Colvin 1aedac39fd fix: FifoSecurityMatcher::book_side only includes visible qty 2021-02-01 23:44:21 -06:00
John Colvin 1cfb7ee6a4 refactor: Re-implement implied market logic in 'ImpliedMarketModel' 2021-02-01 23:44:21 -06:00
John Colvin 290b5d9da2 refactor: Clean up FifoImpliedSecurityMatcher
* Remove dependency on symbol (was only there to make logs prettier, but
  sec id alone provides sufficient information)

* Remove several includes from the header to reduce compilation overhead
2021-02-01 23:44:21 -06:00
John Colvin b66241b006 Remove unused method in FifoMergedSecurityMatcher 2021-02-01 23:44:21 -06:00
John Colvin cf615efcd0 refactor: Move LegDef into its own file
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.
2021-02-01 23:44:21 -06:00
John Colvin c57b832305 fix: Only flip implied_candidates_dirty when they've actually changed 2021-02-01 23:44:21 -06:00
John Colvin e5c3ae1f9f Add permutation 'of length' method, and permutation unit tests 2021-02-01 23:44:21 -06:00
John Colvin e9232e3bae Add math utils 'factorial' and 'choose' 2021-02-01 23:44:21 -06:00
John Colvin f4bb9544d4 fix: Fill same-priced passive icebergs evenly
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.
2021-02-01 23:44:21 -06:00
John Colvin 28aaf22ea8 refactor: Change Matcher structs to be classes instead 2021-02-01 23:44:20 -06:00
John Colvin de49920af7 fix: Don't change show qty when order is filled (matcher) 2021-02-01 23:44:20 -06:00
John Colvin e05c01fc77 Clean up set_total_qty method
* remove unused vars

* replace if/else with ternary operator
2021-02-01 23:44:20 -06:00
John Colvin 9f6dc5da11 Pipe event id through the matcher for better tracing 2021-02-01 23:44:20 -06:00
John Colvin 84c9eb87e6 refactor: Replace size_ts with EventID alias 2021-02-01 23:44:20 -06:00
John Colvin 9f290b550b Pass effects vector to FifoSecurityMatcher calls 2021-02-01 23:44:20 -06:00
John Colvin 6e4950ec1c clang-format: PenaltyReturnTypeOnItsOwnLine
Discourage clang from putting the return type on its own line.
2021-02-01 23:44:20 -06:00
John Colvin c727389f53 refactor: Replace map with unordered_map in Matcher 2021-02-01 23:44:20 -06:00
John Colvin 20e8ac2910 fix: FifoMergedSecurityMatcher handling of icebergs
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.
2021-02-01 23:44:20 -06:00
John Colvin 7e59145102 add TestObserver (IAlgoModel)
This is an empty implementation of IAlgoModel, so new algo ideas may be
tested without the overhead of creating new classes/files.
2021-02-01 23:44:20 -06:00
John Colvin 5e01a37b6e feat (cli): Add cmd to record matcher event proc times 2021-02-01 23:44:20 -06:00
John Colvin 95d2363435 feat (cli): Add cmd to record matcher fills
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.
2021-02-01 23:44:20 -06:00
John Colvin 82332bf92f refactor: Replace SimBooks cmd with Matcher->BooksCmd
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.
2021-02-01 23:44:20 -06:00
John Colvin 042c451bd6 refactor: Move classes from sim_common.h into their own files
* 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'
2021-02-01 23:44:20 -06:00
John Colvin 3e66c3e5db refactor: Move Fill into domain/fill 2021-02-01 23:44:20 -06:00
John Colvin a6f3852846 refactor: Improve Stopwatch impl 2021-02-01 23:41:23 -06:00
John Colvin 1f622b0c1e Optimize logging in IcebergFileCache
* Replace std::cout call with 'Info' log

* Use const char * templates to reduce string copying
2021-02-01 23:41:23 -06:00
John Colvin 48aaf9de6c refactor: Move iceberg_file_cache to matcher/common/IcebergFileCache
Also change static 'iceberg_file_cache' namespace methods to static
'IcebergFileCache' class methods
2021-02-01 23:41:23 -06:00
John Colvin 8b5e86c1ba refactor: Make Iceberg related structs classes instead
* IcebergInput

* IcebergInputBuilder

* IcebergFinder
2021-02-01 23:41:23 -06:00
John Colvin 2a975c95b2 Account for nan in Price::to_double 2021-02-01 23:41:23 -06:00
John Colvin b89555a2e2 Account for nan in price comparison methods 2021-02-01 23:41:23 -06:00
John Colvin 166ab7d299 refactor: Make ValueWrapper binary ops constexpr 2021-02-01 23:41:23 -06:00
John Colvin d2bf8f1b53 Add security_groups field to SecurityCriteria 2021-02-01 23:41:23 -06:00
John Colvin e363840937 refactor: Rename SecurityCriteriaClause -> SecurityCriteria::Clause 2021-02-01 23:41:23 -06:00
John Colvin d8fb275b20 fix: PCapOrderChangeBootstrapper
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.
2021-02-01 23:41:23 -06:00
John Colvin 13719170c9 refactor: Move OrderKey.h into domain/order 2021-02-01 23:41:23 -06:00
John Colvin 2c4db5bf02 refactor: Move Order types into domain/order 2021-02-01 23:41:23 -06:00
John Colvin 7e957527ac Add Price::nan method 2021-02-01 23:07:01 -06:00
John Colvin b94a1d943f refactor: Clean up Price
* Move impl from Price.h to Price.cc

* Make ctrs, methods, ops constexpr (where possible)

* Overload all binary ops to accept Price, or int64 param
2021-02-01 23:07:01 -06:00
John Colvin 3efb4da14b diag: Add Trace parameter to matcher constructor
This makes it easy for matcher-validation commands to bind trace
parameters, such as order/event ids, to cli options.
2021-02-01 22:56:21 -06:00
John Colvin 9c53f4b949 refactor: Move Trace into its own file 2021-02-01 22:56:21 -06:00
John Colvin 35d395fc35 refactor: Hide private matcher members behind PImpl 2021-02-01 22:56:21 -06:00
John Colvin cf19a63aac Delete superfluous move constructor/operator in Matcher 2021-02-01 22:56:21 -06:00
John Colvin 6456060a6c refactor: Define AlgoEventID struct, and EventID alias
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'
2021-02-01 22:56:21 -06:00
John Colvin 702547a88b refactor: Revamp 'md' command with CLI11 App
The files 'run_md.h/cpp' are removed, as their functionality is
distributed among the subcommands: md, run, and web.
2021-02-01 22:56:21 -06:00
John Colvin 2447da3c08 refactor: Rename 'map_utils.h' -> 'MapUtils.h/cc'
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.
2021-02-01 22:56:21 -06:00
John Colvin 8df420c37c refactor: Rename 'table_display.h' -> 'TableDisplay.h/cc'
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.
2021-02-01 22:56:21 -06:00
John Colvin d18a345b5b refactor: Rename 'permutation.h' -> 'Permutation.h/cc'
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.
2021-02-01 22:56:21 -06:00
John Colvin 1770274dd0 refactor: Rename 'action_summarizer' -> 'ActionSummarizer' 2021-02-01 22:56:21 -06:00
John Colvin 746dd506f8 refactor: Rename 'file_stream_utils.h' -> 'FileUtils.h/cc'
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.
2021-02-01 22:56:21 -06:00
John Colvin 78be0004af refactor: Rename 'reverse_comp.h' -> 'ReverseComp.h' 2021-02-01 22:56:21 -06:00
John Colvin 333a378230 refactor: Rename 'string_splitter.h' -> 'StringUtils.h/cpp'
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.
2021-02-01 22:56:21 -06:00
John Colvin 5e8f776334 refactor: Rename dir 'spartan/util' -> 'spartan/utils' 2021-02-01 22:56:21 -06:00
Pedro Pinto 5470a82b94 Real time ilink3 handler code complete. 2021-02-01 20:28:44 -05:00
Pedro Pinto 7959c96bcd Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2021-02-01 13:57:37 -05:00
Pedro Pinto aeb4bec02d Refactored sim types to have a sim prefix. 2021-02-01 13:57:16 -05:00
Taha Afzal b92df15594 Reducing logging 2021-01-30 23:37:29 -06:00
Taha Afzal 86089ec3b4 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2021-01-30 20:04:14 -05:00
Pedro Pinto 2cffaa9d73 Refactored include path for spartan. 2021-01-30 15:11:46 -05:00
Taha Afzal 94da28c5cc Better log messages 2021-01-29 22:41:58 -05:00
Pedro Pinto 86b7f30e0e Towards realtime il3 handler. 2021-01-29 15:22:32 -05:00
Taha Afzal e5b01ad92f Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2021-01-29 11:28:41 -05:00
Taha Afzal 9d381c2848 Sniper code complete 2021-01-29 11:28:35 -05:00
Pedro Pinto f81c0280e4 Initial cert tests pass. 2021-01-28 22:35:16 -05:00
Pedro Pinto b13ffff044 Tests work for il3 connection setup. 2021-01-27 20:56:37 -05:00
Pedro Pinto d068ac40ec Am able to set party details. 2021-01-27 14:27:23 -05:00
Pedro Pinto db5e428709 Starting to test il3. 2021-01-25 16:42:32 -05:00
Pedro Pinto 77396111aa Can build. 2021-01-25 12:57:22 -05:00
Taha Afzal 7af05e3f4a Cleaned up, tested a fair bit, few (safety related) features to come 2021-01-24 21:56:34 -05:00
Pedro Pinto 8665ad24c1 Refactored. 2021-01-22 14:59:35 -05:00
Pedro Pinto 72e6e11238 Towards il3 gateway. 2021-01-20 16:49:07 -05:00
Taha Afzal 3468201f32 Moving sniper data and initialization to SniperAlgoCommon 2021-01-18 20:43:31 -05:00
Pedro Pinto fb7496aaf2 Added commission model to sim. 2021-01-18 15:21:03 -05:00
Pedro Pinto 9193653773 Added new spartan 'test' subcommand. 2021-01-18 15:20:47 -05:00
Pedro Pinto a80641f8f4 Added testing note to docs. 2021-01-16 16:04:27 -05:00
Pedro Pinto eb7f1ba9ee Disabled IB cross test. 2021-01-16 12:38:19 -05:00
Pedro Pinto 39820205ce Market matcher tests as part of spartan. 2021-01-16 12:33:38 -05:00
Pedro Pinto 2cffcb4e25 Merged 2021-01-16 12:32:34 -05:00
Pedro Pinto 2d2c664ce9 More il3 gateway work. 2021-01-16 11:53:04 -05:00
John Colvin ca4e477f56 fix: CLI11 integration
* Run 'sparkd tests' outside of the CLI::App framework
  (delegate to 'catch', which has a solid cli).  This
  fixes a bug which prevented callers from specifying
  test tags (in the form of '[<tag>]'), as the CLI::App's
  parse method removes square brackets from cli options.

* Bind cli options to instance members of their subcommand's
  CLI::App derived class.  This seems to fix a bug which caused
  the [static instance] binding source to be destructed twice.

 * Add help text for several subcommands
2021-01-16 00:01:15 -06:00
Pedro Pinto 3ec36c4db1 Refactoring IReactorConnection and friends. 2021-01-15 09:41:11 -05:00
Pedro Pinto d593696df2 Tagged spartan tests. 2021-01-15 08:49:28 -05:00
John Colvin 45de55a552 Remove unused files 'args_parser.h/cpp' 2021-01-15 00:32:55 -06:00
John Colvin 17d20bac8b Remove unused file 'ImpliedFifoSecurityMatcher.h'
This was an old version of the implied fifo matcher,
now defined in 'FifoImpliedSecurityMatcher.h'.
2021-01-15 00:32:55 -06:00
John Colvin f42137d86c Don't assert that an iceberg order's vis qty <= show qty
There isn't a compelling reason to enforce this
constraint.  The show qty is the 'reload' qty, and
is orthogonal to the current [visible] qty.
2021-01-15 00:32:55 -06:00
John Colvin 456177af30 typo: Flip ternary op clauses, and delete superfluous 'return' 2021-01-15 00:32:55 -06:00
John Colvin 41374d62ea spartan cli: Add SimBooks command
This command is a diagnostic tool that produces a
csv file of matcher-generated books for a
particular pcap, which can then be imported to
sql, and joined with the actual books table for
comparison.
2021-01-15 00:32:55 -06:00
John Colvin 25395fcac3 refactor: Replace api::Side w/ spartan::Side 2021-01-15 00:32:55 -06:00
John Colvin 9b49c66136 fix: Require valid side param in 'has_min_qty' method
Although the side can be inferred by comparing the
first two price levels, the book may not have two
price levels to compare.
2021-01-15 00:32:55 -06:00
John Colvin 36bfc9e770 Add SecurityCriteria struct to filter instrument sets
Inspired by the c# 'SecurityCriteria' class from
spark's front end.  This may come in handy as a cli
option for spartan subcommands, among other things.
2021-01-15 00:32:55 -06:00
John Colvin 2a04341b3b Allow for non-null, or non-empty effects vector in 'match' method 2021-01-15 00:07:02 -06:00
John Colvin c0a7f1b3fe refactor: Use c++ 'char_traits::length' instead of c 'strlen' 2021-01-15 00:07:02 -06:00
John Colvin 66e1b94d1b refactor: Revamp cli with CLI11 App 2021-01-15 00:07:02 -06:00
John Colvin 25e07d0a60 refactor: Move BookStatRecorder into 'feed_observers' dir 2021-01-14 21:25:14 -06:00
Pedro Pinto 2731f2b287 Fixed weird duplicate symbol issue. 2021-01-14 13:53:31 -05:00
Pedro Pinto 5140cb1c2c Towards an order gateway. 2021-01-14 13:09:39 -05:00
Pedro Pinto e11566537c More refactoring. 2021-01-13 14:50:29 -05:00
Pedro Pinto b884dc910e Refactor MDP3 feed handler types. 2021-01-13 14:48:13 -05:00
Pedro Pinto 35cefe3b89 Added IL3 Parser. 2021-01-13 12:04:34 -05:00
Pedro Pinto 96af106a9d Refactored MDP3Parser 2021-01-13 11:16:23 -05:00
Pedro Pinto ac5d961a70 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2021-01-13 09:47:34 -05:00
Pedro Pinto 8f4e529766 Refactoring SBE parsing. 2021-01-13 09:47:23 -05:00
Taha Afzal 19a7e2898e normalizing ticks/price/cash in the report 2021-01-12 18:12:45 -05:00
Pedro Pinto 0ef29c181a Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2021-01-12 15:48:10 -05:00
Pedro Pinto 81d3d5f11d Adding ilink3 notes 2021-01-12 15:47:54 -05:00
Pedro Pinto c4e0518228 Whitespace. 2021-01-12 11:57:45 -05:00
Taha Afzal 121b7df59e Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2021-01-12 11:28:21 -05:00
Taha Afzal 6740f6b1fb Adding status col to polygon_values 2021-01-12 11:27:52 -05:00
Pedro Pinto 5a7a267daf Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2021-01-12 11:10:59 -05:00
Pedro Pinto fb1040fb2c Cleaned up generation of mdp3 files. 2021-01-12 11:10:39 -05:00
Taha Afzal ecad5518eb Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2021-01-12 11:10:37 -05:00
Taha Afzal 4361e2277a vid constraint on polygon values 2021-01-12 11:10:24 -05:00
Pedro Pinto 7d7e25fd25 More refactoring. 2021-01-12 10:38:59 -05:00
Pedro Pinto 8f0cfe2c2a Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2021-01-12 10:32:10 -05:00
Pedro Pinto c470c5f161 Cleaned up iLink3 code generation. 2021-01-12 10:31:36 -05:00
Taha Afzal 2302e5f37e Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2021-01-12 09:40:19 -05:00
Pedro Pinto fc1b84f966 Refactor of directory names. 2021-01-12 09:02:50 -05:00
Pedro Pinto 25ad869030 Adding iLink3 generation code 2021-01-12 08:57:16 -05:00
Taha Afzal a35559da30 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2021-01-11 22:35:18 -05:00
Taha Afzal 0103abbec3 merging 2021-01-11 22:34:57 -05:00
Pedro Pinto ee725747ad Added trade summary signal 2021-01-11 13:23:28 -05:00
Taha Afzal ef0f044e8d Adding more data to polygon_values 2021-01-11 12:58:23 -05:00
Pedro Pinto d42b72ea79 Added Trade summary signal to spartan. 2021-01-11 11:56:52 -05:00
Pedro Pinto f177441d07 Refactored. 2021-01-11 10:14:38 -05:00
Pedro Pinto 939c6442be Added book signa to realtime handler. 2021-01-11 10:10:35 -05:00
Pedro Pinto 33dad3db73 More book tweaks. 2021-01-10 18:02:25 -05:00
Pedro Pinto ef296d4b1c More clean up. 2021-01-10 17:21:15 -05:00
Pedro Pinto 58fbb8e04f Cleaning up book merging. 2021-01-10 17:17:45 -05:00
Pedro Pinto 0200b53c3e Refactored Book class. 2021-01-10 14:16:48 -05:00
Pedro Pinto cdaef11761 Refactored Book class. More to follow. 2021-01-10 14:16:27 -05:00
Pedro Pinto 853d9f8ddd Refactor Book. 2021-01-08 20:29:30 -05:00
Pedro Pinto 61aac1f1b2 Refactoring book. 2021-01-08 19:37:45 -05:00
Pedro Pinto 48f33e7e4c Added some comments. 2021-01-08 18:20:57 -05:00
Pedro Pinto 216ebb2454 Moved security snapshot to domain. 2021-01-08 18:17:54 -05:00
Pedro Pinto 5c36f21f06 Refactored. 2021-01-08 18:13:04 -05:00
Pedro Pinto 66360844b2 Refactor. 2021-01-08 14:58:10 -05:00
Pedro Pinto 8eae549af3 Refactor 2021-01-08 14:49:58 -05:00
Pedro Pinto 721bc6d68f Refactor. 2021-01-08 14:43:53 -05:00
Pedro Pinto b7d7b3dceb Refactored. 2021-01-08 14:27:36 -05:00
Pedro Pinto d3ad5ee823 Refactor. 2021-01-08 14:06:00 -05:00
Pedro Pinto c119b4b6ef Refactor. 2021-01-08 13:52:37 -05:00
Pedro Pinto 9aa5e6435d Cleaned up quicktest. 2021-01-08 10:57:29 -05:00
Pedro Pinto b4eced0cd3 Set buffer size and non blocking option on reactor. 2021-01-08 10:57:03 -05:00
Pedro Pinto 1f159aacf0 Getting market data from the wire. 2021-01-08 10:37:07 -05:00
Pedro Pinto d2ed70b6dd Added a few comments. 2021-01-08 10:36:24 -05:00
Pedro Pinto 76be885a60 Algoman. 2021-01-07 17:56:50 -05:00
Pedro Pinto f7173cd477 Towards algoman 2021-01-06 16:11:46 -05:00
Pedro Pinto b448db51f4 More refactor. 2021-01-06 09:15:25 -05:00
Pedro Pinto a413b2401b Refactor. 2021-01-06 09:11:33 -05:00
Pedro Pinto 37a673d336 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2021-01-05 11:35:39 -05:00
Pedro Pinto 37cb60a777 Refactor. 2021-01-05 11:35:24 -05:00
Pedro Pinto 18fc857b78 Towards algoman. 2021-01-05 11:34:27 -05:00
Taha Afzal aa4912bba9 Opp summary 2021-01-05 10:17:15 -05:00
Pedro Pinto 7eff7f89d1 Towards an algo framework. 2021-01-04 14:58:24 -05:00
Taha Afzal 9010003a0d Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2021-01-04 10:07:10 -05:00
Taha Afzal 9a0bc05b8b Added edge filter for static analysis 2021-01-04 10:06:51 -05:00
Pedro Pinto 0e4327c3f9 Merged 2021-01-04 09:36:24 -05:00
Pedro Pinto cc9b4b874c Renamed MDP3Price to Price. 2021-01-04 09:04:35 -05:00
Pedro Pinto 333609d23a Renamed MDP3Price::price() to MDP3Price::to_double() 2021-01-04 08:56:48 -05:00
Pedro Pinto 1f7e682900 Fixed some tests that were using MDP3Price. 2021-01-04 08:53:00 -05:00
John Colvin 635d4196f1 build: Resolve QuantityTag template parameter conflict
The linker was mixing up the QuantityTag template
parameter structs declared in the aliases
'bts::Quantity,' and 'bts::spartan::mdp3::Quantity.'
2021-01-03 22:46:02 -06:00
John Colvin 3f7ce90cef spartan cli: Add 'book_stats' command
Generates a csv file consisting of basic stats
about each book update (one row per per update).
2021-01-03 22:46:02 -06:00
John Colvin 1c8859ced6 Inline 'event_flags_name' method 2021-01-03 22:35:50 -06:00
John Colvin 04257535e1 clang-format: Add 'AlwaysBreakTemplateDeclarations: true' 2021-01-03 22:34:37 -06:00
John Colvin ae71fb9c33 Overload Formatter::join to accept ostream&
* Existing join methods all create and return a
  string, while the overload passes values directly
  to the ostream&, and avoids creating/copying a string.

* This will come in handy when creating csv rows.
2021-01-03 22:34:31 -06:00
Pedro Pinto 8f68e5afaf Dowgraded default filter message in polygons to Info. 2021-01-03 17:10:50 -05:00
Pedro Pinto 23160f7843 Fixed bug in algo effect sort order. 2021-01-03 17:10:17 -05:00
Taha Afzal 2788e39cd6 Refining the pandas code for sniper analysis 2021-01-01 20:15:28 -05:00
Pedro Pinto e536cae63a Droppped md::IntPrice in favour od MDP3Price. 2021-01-01 16:32:22 -05:00
Taha Afzal e6b96b3fc3 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2021-01-01 12:56:52 -05:00
Taha Afzal 6d357c8d22 One place to look at static analysis of sniper opportunuities 2021-01-01 12:56:44 -05:00
Pedro Pinto 02dcd57817 IntPrice 2020-12-31 17:17:54 -05:00
Pedro Pinto 7a2c5425a1 Towards replacing md::IntPrice 2020-12-31 17:13:31 -05:00
Pedro Pinto 8b667e056c Removed security db class. 2020-12-31 17:01:29 -05:00
Pedro Pinto 125fe90aaf Refactored instrument definition. 2020-12-31 16:56:47 -05:00
Pedro Pinto c7a4d08372 Working on instrument definition. 2020-12-31 16:01:38 -05:00
Pedro Pinto d2bae92e92 Refactored. 2020-12-31 13:07:21 -05:00
Pedro Pinto 9ff4c81a11 More refactor. 2020-12-31 12:15:24 -05:00
Pedro Pinto bda105c550 Merged 2020-12-31 12:08:17 -05:00
Pedro Pinto df36b6d24f Refactored iceberg quantity. 2020-12-31 12:06:33 -05:00
Pedro Pinto b34ef9283d Refactored quantity. 2020-12-31 11:57:22 -05:00
Pedro Pinto 7e13e8cb67 More refactoring. 2020-12-31 11:48:21 -05:00
Taha Afzal a51f96cc6f Added product to polygon values 2020-12-31 01:43:07 -05:00
Taha Afzal 99ea103944 merging 2020-12-31 00:34:55 -05:00
Taha Afzal 3b2e5e5d95 Spartan run with sql option, can optionally (based on config) not write the books to the database 2020-12-30 23:24:46 -05:00
Pedro Pinto e06ce66513 Refactor MDP3TimeStamp to TimeStamp. 2020-12-30 21:11:00 -05:00
Pedro Pinto 738862cb22 Tweaked header layout. 2020-12-30 17:32:41 -05:00
Pedro Pinto de063e51f0 Another clang-format run, changed how parameters are binned 2020-12-30 17:30:10 -05:00
Pedro Pinto 8f21a77150 Ran clang-format across all files 2020-12-30 17:11:18 -05:00
Pedro Pinto a27321df2e Apparently you need a newline at the end of afile 2020-12-30 16:50:01 -05:00
Pedro Pinto 0fb7ba5987 Ran clang-format on spartan, changed format defaults. 2020-12-30 16:30:37 -05:00
Pedro Pinto a0a508e64f More documentation. 2020-12-30 16:16:46 -05:00
Pedro Pinto d8a80419eb Added some documentatio, run clang-format on iLink3 code. 2020-12-30 14:22:56 -05:00
Pedro Pinto 862df2efb6 Made MDP3 compression tolerant of data loss. 2020-12-30 14:02:08 -05:00
Pedro Pinto 9dcbab9628 Refactor. 2020-12-29 20:02:04 -05:00
Pedro Pinto ae7b25e120 Refactor. 2020-12-29 20:01:48 -05:00
Pedro Pinto bb1e7df7a9 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-12-29 17:15:38 -05:00
John Colvin b620d33f98 fix build: correct typo 'view' -> 'views'
Both 'view' and 'views' are namespaces within
the 'ranges' namespace.  They contain some methods
with identitical signatures, although those in
the former are deprecated.
2020-12-29 16:10:18 -06:00
Pedro Pinto 19b5004920 Merged 2020-12-29 16:46:49 -05:00
John Colvin 337fb2ae45 Restore (uncomment) iceberg impl in Sim
The bug that was the reason it was originally commented out
has been fixed.
2020-12-29 12:58:24 -06:00
John Colvin e87d4a796a fix: IcebergFinder bootstraps with 'orders' instead of 'order_changes' 2020-12-29 12:58:24 -06:00
John Colvin a419ee9ed1 cli: Make icebergs_csv cmd's columns match those in sql 2020-12-29 12:58:24 -06:00
John Colvin 2fe6e3dcab cli: Make icebergs_csv command always generate new csv
Change the command so it does not attempt to retrieve the
icebergs from a bin file before observing the pcap, nor does it
write the icebergs to a bin file after observation.  This behavior
was originally intended as a way to avoid wasting time regenerating
the same set of icebergs when pcap observation was significantly slower.
2020-12-29 12:58:24 -06:00
John Colvin 262b6352a6 test: Add unit tests for synth book computation 2020-12-29 12:58:24 -06:00
John Colvin a18d29b66a Add several MDP3Quantity int binary operators 2020-12-29 12:58:24 -06:00
John Colvin b464b9ab88 Overload SidePriceComp '()' operator for SmallBookLevel 2020-12-29 12:58:24 -06:00
John Colvin 8bf8b6b36e Clean up, and optimize compute_synthetic_book method
* Improve code-readability

* Add documentation

* Avoid copying leg books
2020-12-29 12:58:24 -06:00
John Colvin cbd10c7a7c Refactor book_utils::fmt_ladder
* use md::IntPrice/MDP3Quantity rather than double/uint32_t

* overload fmt_ladder to accept a single book-side, and an
  optional 'side' argument.  If 'side' isn't specified, deduce
  the side by comparing 2 price levels.
2020-12-29 12:54:47 -06:00
John Colvin a6bfa8f976 fix: compute_synthetic_book sometimes only populates 1st price level
Incorrect 'limiting factor' logic was causing the method to exit
when the qty in the first price level of the first leg was used.
2020-12-29 12:54:47 -06:00
John Colvin 8850d7d188 fix: running_cost accumulation in 'change_unit_qty' method 2020-12-29 12:54:47 -06:00
Taha Afzal 9b62a70c8f PolygonFinder can be parameterized for symbols(assets), expirations 2020-12-29 12:54:47 -06:00
Taha Afzal 950887851a Added a product list config for polygon generation 2020-12-29 12:54:47 -06:00
Pedro Pinto 6f5c41ca14 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-12-29 08:06:54 -05:00
Pedro Pinto 5223529af1 Sorted match effects so that price updates are delivered before order updates. 2020-12-29 08:06:27 -05:00
Taha Afzal 2632d7ea9f Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-12-28 23:17:28 -05:00
Taha Afzal de60a0abd1 PolygonFinder can be parameterized for symbols(assets), expirations 2020-12-28 23:17:23 -05:00
Pedro Pinto c4e4ff57d8 Multiple changes to sniper including use of quantity in shot selection. 2020-12-28 20:06:43 -05:00
Pedro Pinto b6f108f7ea More precise alignment of sim time and pcap time. 2020-12-28 20:05:33 -05:00
Pedro Pinto 96c39e68ee More deterministic names for polygons. 2020-12-28 20:03:49 -05:00
Pedro Pinto a3d5e63fb6 DB Fixes. 2020-12-28 20:03:35 -05:00
Pedro Pinto c1be834e54 Changed logging. 2020-12-28 20:02:48 -05:00
Pedro Pinto caf0914b4d Better names for sim time. 2020-12-28 20:02:24 -05:00
Pedro Pinto 0fc522f8c2 Removed commented out code. 2020-12-25 13:41:46 -05:00
Pedro Pinto a247f7e396 Re-enabling all polygons. 2020-12-25 13:36:45 -05:00
John Colvin 03d5047798 fix: compute_synthetic_book sometimes only populates 1st price level
Incorrect 'limiting factor' logic was causing the method to exit
when the qty in the first price level of the first leg was used.
2020-12-24 14:22:58 -06:00
John Colvin 391b8ece7a fix: running_cost accumulation in 'change_unit_qty' method 2020-12-24 14:22:42 -06:00
Taha Afzal 7d75654cf0 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-12-24 12:53:31 -05:00
Taha Afzal 6a46ad2b0e Added a product list config for polygon generation 2020-12-24 12:53:27 -05:00
Pedro Pinto e413ad216e Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-12-24 10:44:43 -05:00
Pedro Pinto d582005d64 Added assert to make sure books are correct. 2020-12-24 10:44:29 -05:00
Pedro Pinto 02fa07552b Added expiration to instrument definition. 2020-12-24 10:44:08 -05:00
Taha Afzal b032926581 hooking polygon book calc to polygon_values 2020-12-23 18:05:03 -05:00
Pedro Pinto 189cb66daf Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-12-23 14:24:47 -05:00
Pedro Pinto 36f1df58f0 Intermediate commit. 2020-12-23 14:24:23 -05:00
Taha Afzal 8489eda3a6 Merging 2020-12-23 12:42:37 -05:00
Taha Afzal 3e189a751d Allow negative payups 2020-12-23 12:32:45 -05:00
Pedro Pinto b2f6be6d10 Added back all polygons, had a temp break to debug synth book. 2020-12-23 12:22:48 -05:00
John Colvin b656632e86 fix: synthetic book computation
* the fix was technically in the 'change_unit_qty' method,
  which is called from 'compute_synthetic_books.'

* Although the 'change_unit_qty' method was correctly dividing
  quantity by 'unit_qty', it was not scaling the prices.
2020-12-23 10:28:59 -06:00
John Colvin 22cf50282c .vscode: change python interpreter path setting 2020-12-23 10:28:59 -06:00
Taha Afzal 7650e15a52 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-12-23 10:55:20 -05:00
Taha Afzal 235d6ecd2f Polygon values have legs books (as text columns), and synthetic books. There is a also new view that joins polygon values with events 2020-12-23 10:55:10 -05:00
Pedro Pinto c9a0d4489b Added max loss, added start/stop times for simulation, added price only order changes. 2020-12-22 10:58:05 -05:00
Pedro Pinto c6697b82fe Added code to convert ptime to mdp3 time. 2020-12-22 10:56:16 -05:00
Pedro Pinto e0231c7dd5 Fixed PCapReader destructor. 2020-12-22 10:55:42 -05:00
Pedro Pinto f3bcbf85dd Reduced console logging. 2020-12-21 10:16:41 -05:00
Pedro Pinto 7e04f9a5b3 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-12-21 10:00:13 -05:00
Pedro Pinto 1835d490a3 Added the ida of parameter sets in the simulator. 2020-12-21 09:59:38 -05:00
Taha Afzal 36bf94aad9 placeholder orders are not fired in file mode 2020-12-18 09:17:28 -05:00
Taha Afzal 468df062c3 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-12-17 12:15:27 -05:00
Taha Afzal 544a9212cf Sniper launched placeholder orders that are then used to snipe 2020-12-17 12:15:19 -05:00
Pedro Pinto 822f43c5a1 Better logging of shot sequence number. 2020-12-17 10:22:53 -05:00
Pedro Pinto 85106cb293 Better logging of clean/saved/forced shots. 2020-12-17 10:22:33 -05:00
Pedro Pinto ebd0fa4809 Added utility to parse performance logs. 2020-12-17 09:40:04 -05:00
Pedro Pinto 43f4fe2011 Better logging for sniper model. 2020-12-17 09:39:41 -05:00
Taha Afzal ffcebdf94a Perf logs in the sniper 2020-12-16 00:05:31 -05:00
Pedro Pinto 0e7b104c76 Added more performance logging. 2020-12-15 18:04:10 -05:00
Pedro Pinto f0b76f244c Added packet structure to sql DB. 2020-12-15 17:01:27 -05:00
Pedro Pinto e4dc9103e1 Fixed typo in md.sql 2020-12-15 14:17:42 -05:00
Pedro Pinto afb88122ad Added performance logging. 2020-12-15 13:40:08 -05:00
Pedro Pinto 18a0fa7fb9 Tweak to md sql DB. 2020-12-15 13:34:55 -05:00
Pedro Pinto b491b2b4cd Added seq numbers to top of the book and opportunity views. 2020-12-15 09:45:53 -05:00
Pedro Pinto 4b1e9afe28 Corrected corid for trade summary signal. 2020-12-15 09:45:35 -05:00
Pedro Pinto abb9a56761 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-12-14 11:56:52 -05:00
Pedro Pinto 09505b2005 Added pause between shots, added clean flag to shot outcome. 2020-12-14 11:56:37 -05:00
Pedro Pinto e3a9adbf3f Fixed clean up of sim db. 2020-12-14 11:55:47 -05:00
Taha Afzal 9aafed66c0 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-12-14 10:50:15 -05:00
Taha Afzal a259aa8419 Lookeahd book top guessed aggressively 2020-12-14 10:50:06 -05:00
Pedro Pinto 4daf6e127e Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-12-14 10:32:52 -05:00
Pedro Pinto 1ac36e932e Fixed unbuscription from trade signal on algo termination. 2020-12-14 10:32:26 -05:00
Pedro Pinto 23b038a6a7 Optionall automatically clear previous runs from sim_db. 2020-12-14 10:17:54 -05:00
Pedro Pinto e2069c8584 Fixed key remapping in sim. 2020-12-14 10:17:25 -05:00
Pedro Pinto 525cf4652e Removed old proto from include. 2020-12-14 10:17:07 -05:00
Pedro Pinto 6eb3595294 Added sniper_run view to sim_db. 2020-12-14 10:16:14 -05:00
Taha Afzal 8c421d0726 Slight log change 2020-12-14 10:15:12 -05:00
Pedro Pinto 870c69b834 Removed incorrect assertions. 2020-12-13 18:08:09 -05:00
Pedro Pinto 4f39307b9b Disabled icebergs because of show quantity set to 0. 2020-12-13 18:07:37 -05:00
Pedro Pinto b687e339a4 Improved logging during sniper run. 2020-12-13 18:07:11 -05:00
Pedro Pinto 8623f2369f Fixed a bug in sniper model. 2020-12-13 18:06:56 -05:00
Taha Afzal 7eade56042 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-12-13 16:29:08 -05:00
Taha Afzal 1091c983f9 More logs 2020-12-13 16:29:02 -05:00
Pedro Pinto 533ca3e601 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-12-13 10:33:21 -05:00
Pedro Pinto e4b8594d44 Ran clang format. 2020-12-13 10:33:07 -05:00
Taha Afzal 22e5a53e32 FillType flag 2020-12-12 21:48:22 -05:00
Pedro Pinto 6c5f5116b4 Tweaked 'shots' view in sim db. 2020-12-12 20:03:51 -05:00
Pedro Pinto b5e455ff75 Adjusted polygon filter to include dec/march. 2020-12-12 19:20:18 -05:00
Pedro Pinto 03cd5c164f Improved caching of pcap data during simulations. 2020-12-12 19:19:26 -05:00
Pedro Pinto c4aa99636e Added pay up to sniper model. 2020-12-11 19:45:16 -05:00
Pedro Pinto ed0eb9be19 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-12-11 14:13:32 -05:00
Pedro Pinto d155f8ed12 Tweaked python analysis tools. 2020-12-11 14:12:32 -05:00
Pedro Pinto ffcfe3cf9c Added more parameters to sim db. 2020-12-11 14:11:59 -05:00
Taha Afzal d848a15217 lookahead diagnostics log 2020-12-11 11:03:55 -05:00
Taha Afzal 951f8e9442 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-12-11 10:00:58 -05:00
Taha Afzal f10f46b811 corid and use_lookahead logged 2020-12-11 10:00:50 -05:00
Pedro Pinto d7e80a1303 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-12-10 22:24:09 -05:00
Pedro Pinto de0d6c5891 Cleaned up sniper model 2020-12-10 22:21:52 -05:00
Pedro Pinto 4e7c0122d7 Cache preload of sim. 2020-12-10 22:21:07 -05:00
Pedro Pinto cb75e46161 Better DBs. 2020-12-10 22:20:11 -05:00
Taha Afzal 6954f5842f Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-12-10 12:36:16 -05:00
Taha Afzal cbc1cc6b5b using trade summs of atleast 2 messages, more logs 2020-12-10 12:35:57 -05:00
Pedro Pinto 3cc2cf0783 Hard coded filtering of polygon opportunities to just the one polygon. 2020-12-10 12:22:46 -05:00
Pedro Pinto b3e7bcf2e1 Fixed iceberg table in sql command. 2020-12-10 12:22:00 -05:00
Pedro Pinto dd3c33387d Forgot to add the number of levels to the actual interface. 2020-12-10 11:02:21 -05:00
Pedro Pinto 84a8f11846 Added number of levels to trade signal. 2020-12-10 10:50:33 -05:00
Pedro Pinto 4d2ba5fc41 Fixed initialization bug in sniper. 2020-12-10 09:10:10 -05:00
Pedro Pinto b980e39ebb Merged 2020-12-10 09:03:14 -05:00
Pedro Pinto 0dc97dd2d9 Refactor part 8. 2020-12-10 08:56:14 -05:00
Pedro Pinto cef6815e5c Refactor, part 8. 2020-12-10 08:47:07 -05:00
Pedro Pinto 4e84b7d789 Refactor, part 7 2020-12-10 08:44:25 -05:00
Pedro Pinto f632fa2e50 Refactor, part 6 2020-12-10 08:42:09 -05:00
Pedro Pinto 1919440a83 Refactor, part 5. 2020-12-10 08:25:26 -05:00
Taha Afzal 1a43dafb2e Evaluating in response to trade summary,improved logs 2020-12-09 18:52:57 -05:00
Taha Afzal bd54f19bdb More logging 2020-12-09 17:13:22 -05:00
Pedro Pinto 5f2e98beed More clean up. 2020-12-09 14:58:55 -05:00
Pedro Pinto f7ea0cd254 Removing old sim code part 3. 2020-12-09 14:51:58 -05:00
Taha Afzal af1ab49219 added sweep test for the sell side 2020-12-09 14:49:57 -05:00
Taha Afzal 2ac74c5e29 Clang build fix, sweep book calc test 2020-12-09 14:35:32 -05:00
Pedro Pinto fb42df3117 Removing old sim, part2 2020-12-09 14:34:31 -05:00
Pedro Pinto 443dacaefb Removing old simulator, part 1. 2020-12-09 14:26:10 -05:00
Taha Afzal 0d5b3d9018 detaching all children before completing the sniper after each shot 2020-12-09 13:15:51 -05:00
Taha Afzal cc75c46b1a sniper turns itself off after shooting 2020-12-09 12:54:35 -05:00
Taha Afzal 1ee60f743e added the cumm price/qty constraint, everything hooked up 2020-12-09 12:11:24 -05:00
Taha Afzal dc8fd8baef Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-12-09 09:55:39 -05:00
Taha Afzal 67b6884200 cumm edge/qty parameter to sniper 2020-12-09 09:55:30 -05:00
Pedro Pinto 03a81280f4 Merged 2020-12-09 08:49:27 -05:00
Pedro Pinto 34675696f3 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-12-09 08:38:44 -05:00
Pedro Pinto 0e1687c853 Changed trade summary signal to include last qty. 2020-12-09 08:38:00 -05:00
John Colvin ccf8a8e492 fix iceberg integration with new simulator
* Sim uses MergedMatcher::reset to inject a particular exchange state
  into the matcher (the matcher does not reset the visible quantity to the
  show quantity in a reset op).

* iceberg_helper::add_iceberg_annotation does not set the visible
  quantity to the show quantity if the order change type is 'added'.
2020-12-09 00:12:31 -06:00
John Colvin a0d0a30ad3 refactor 'is_exhausted' -> 'is_empty' in compute_synthetic_books 2020-12-09 00:11:51 -06:00
John Colvin ff02801000 compute_synthetic_book doesn't copy leg market tuples as it iterates through them 2020-12-09 00:11:51 -06:00
John Colvin 590ca3892d compute_synthetic_book was multiplying leg prices by their qty twice
This is a pre-emptive bug fix, as the method has only been fed synths
with leg quantities +/-1.
2020-12-09 00:11:51 -06:00
John Colvin 1674486dc0 vscode (build): change linux build task to run in docker
* prompts user for configuration (debug or release)

* looks for docker instance named "${USER}s_docker"
2020-12-09 00:11:51 -06:00
John Colvin dc5301f8b0 vscode (intellisense): add build/ninja_debug/src to browse path 2020-12-09 00:11:51 -06:00
Taha Afzal 436f7eefe9 Added logic for book calculation based on sweep 2020-12-09 00:57:34 -05:00
Taha Afzal fd8bd63f55 Added payup ticks to sniper and logic to alternate bw main book and lookahead book 2020-12-08 21:47:25 -05:00
Pedro Pinto 64b42aef99 Trade summary signal code complete. 2020-12-08 16:01:46 -05:00
Pedro Pinto 1d323ddc37 Fixed bug in parsing a few sim run options. 2020-12-08 11:42:26 -05:00
Pedro Pinto c1331df2fe Fixed cumm qty. 2020-12-08 11:03:19 -05:00
Pedro Pinto cb1946a8d0 Delayed simulation start until first algo order to improve accuracy. 2020-12-08 09:14:54 -05:00
Pedro Pinto 09c043b11f Added some validation for the sniper synth book. 2020-12-08 08:47:16 -05:00
Pedro Pinto 6df3dce95d Commented out the IB annotation until we get it sorted out. 2020-12-07 19:51:00 -05:00
John Colvin 9787f2ed8e Merged in spartan_tas.sim_icebergs (pull request #415)
integrate new IcebergInput logic into sim runs

Approved-by: Pedro Pinto
2020-12-08 00:37:00 +00:00
John Colvin 654f79b42d integrate new IcebergInput logic into sim runs 2020-12-07 17:55:26 -06:00
Taha Afzal 1840120af8 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-12-07 14:31:30 -05:00
Taha Afzal b90ac3d629 Adding jupyter notebooks for ES sniper analysis 2020-12-07 14:31:21 -05:00
Pedro Pinto e846420f9d Fixed bug in valuation 2020-12-07 14:29:49 -05:00
John Colvin 87a7fca75c overload compute_synthetic_book with standard Book type params 2020-12-07 11:22:05 -06:00
Pedro Pinto a9c07ec770 Merged 2020-12-07 11:43:52 -05:00
Pedro Pinto fc2bd8230a Merge branch 'spartan_tas' into sim2 2020-12-07 11:42:38 -05:00
Pedro Pinto 36c2b7b952 Added skelleton for min_cumm_qty and min_cumm_price params. 2020-12-07 11:39:58 -05:00
John Colvin fb3f843309 (vscode) setting: don't configure cmake on open 2020-12-06 20:24:56 -06:00
John Colvin 12eef87fb0 fix typos to remove clang build warnings 2020-12-06 20:24:56 -06:00
Taha Afzal 4c066859c4 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-12-06 20:31:01 -05:00
Taha Afzal b4716db99d Adding synthetic test runner to jason 2020-12-06 20:30:56 -05:00
John Colvin 07f13de58e Merge remote-tracking branch 'origin/sim2' into spartan_tas 2020-12-06 18:09:05 -06:00
Pedro Pinto 92bdb06ceb Integrated commission model.. 2020-12-06 12:41:07 -05:00
John Colvin 256b1aeb59 implement MergedMatcher::clear 2020-12-06 11:30:23 -06:00
John Colvin 9b20c2a230 remove CheckedMatcher struct, replace usage with matcher (was only using the matcher member anyways) 2020-12-06 11:30:23 -06:00
John Colvin 78c3617749 add missing comma to settings.json 2020-12-06 11:30:23 -06:00
John Colvin 9a041af544 MergedMatcher uses new '_asset_matcher' method to remove redundant code 2020-12-06 11:28:35 -06:00
Pedro Pinto 8687de6fa2 Added better logging of param values. 2020-12-06 11:45:59 -05:00
Pedro Pinto c7a4bb461a Sim2 working. 2020-12-05 21:54:34 -05:00
Pedro Pinto c96f142709 Towards simple sim. 2020-12-04 20:57:54 -05:00
John Colvin 6367375ac6 add clear, reset methods to Direct/MergedMatcher (for state injections during sim runs) 2020-12-03 23:51:25 -06:00
John Colvin 0530e50a04 fix documentation of iceberg_helper::add_iceberg_annotation 2020-12-03 18:29:21 -06:00
John Colvin afd05f3c7c add missing comma to generated books csv 2020-12-03 17:11:34 -06:00
John Colvin fff7faab90 added some diagnostic spartan cmds to track down sim_books mismatches 2020-12-03 17:11:34 -06:00
John Colvin e4c36c8470 improve iceberg deduction 2020-12-03 17:11:34 -06:00
Pedro Pinto 11527282c8 Added some matcher validatio helpers. 2020-12-03 08:39:40 -05:00
John Colvin 085764b9a4 add src/.clang-format to .gitignore 2020-12-01 13:44:44 -06:00
Pedro Pinto 96e3c3b9ac Added updated_price only change to possible order changes.
This is needed to facilitate iceberg management.
2020-12-01 13:43:41 -06:00
Pedro Pinto 2c9893c524 Accelerated CSV generation. 2020-12-01 13:42:47 -06:00
John Colvin cbf444d5ed added IcebergStateMapper to determine exact sequence of iceberg state per event id 2020-12-01 13:41:14 -06:00
John Colvin 25e52df136 add create_polygon_books.sql 2020-12-01 12:44:25 -06:00
John Colvin 85afd6966c add some docker scripts (start_docker.sh, docker_bash.sh) 2020-12-01 12:44:25 -06:00
John Colvin 724df36bdc refactor vector<tuple<price,qty>> to SmallBook (vector alias), and SmallBookLevel (actual struct instead of tuple) 2020-12-01 12:44:25 -06:00
John Colvin afb0cdfbaf added SyntheticBookRecorder and polygon_books spartan command 2020-12-01 12:44:22 -06:00
Pedro Pinto 2de4ec6ebe Sim2 and polyobserver agree. 2020-12-01 07:44:59 -05:00
John Colvin 70ca670955 overload 'Formatter::fmt_values' for any Iter type 2020-11-30 22:00:02 -06:00
John Colvin acea32f618 add 'analysis/data' to .gitignore (I symlink this to pcap/sqlite data for jupyter-notebooks) 2020-11-30 22:00:02 -06:00
John Colvin be11f93de7 add src/.clang-format to .gitignore 2020-11-30 22:00:02 -06:00
John Colvin 067ec9b2b9 extracted member functions from FifoImpliedSecurityMatcher into book_utils namespace 2020-11-30 11:33:11 -06:00
Pedro Pinto 398397ca7f Towards self-correcting simulator. 2020-11-29 17:05:45 -05:00
Pedro Pinto 3599fa2b0c Added reference code. 2020-11-21 18:24:17 -05:00
Pedro Pinto f650177758 Towards better pcap DB generation and use. 2020-11-21 18:23:43 -05:00
Pedro Pinto 56227b77d2 Updated .gitignore 2020-11-20 12:18:41 -05:00
Pedro Pinto 9deaf6bc6d More analysis tools 2020-11-20 12:16:50 -05:00
Pedro Pinto 0f4d5a7047 Updated jupyter notebooks 2020-11-19 08:08:02 -05:00
Pedro Pinto b82004cf26 Improved analysis. 2020-11-18 17:09:11 -05:00
Taha Afzal 59a0eba902 Fixing the aggressive order's qty adjustment for icebergs 2020-11-16 12:12:12 -05:00
Taha Afzal e979fc86b2 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-11-16 11:09:55 -05:00
Taha Afzal b28ba12146 Added some comments to the matcher test and traced back the failing test to crossing order (that bnecomes a resting order) bug 2020-11-16 11:09:48 -05:00
Pedro Pinto 4cfd4bec24 Fixed lost fills on aggressor 2020-11-15 15:06:32 -05:00
Pedro Pinto d9aa4eea38 Minor refactor 2020-11-14 17:52:15 -05:00
Pedro Pinto fefe716d2f Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-11-14 12:42:51 -05:00
Pedro Pinto c6c0dc21e2 Added better logging to simulator 2020-11-14 12:42:44 -05:00
Taha Afzal cd6bdb1576 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-11-11 10:22:11 -05:00
Taha Afzal 9266e919b6 Bridge is untested but completed 2020-11-11 10:21:58 -05:00
Pedro Pinto 116131f0a8 Cleaned up and sped up sim log. 2020-11-10 20:06:46 -05:00
Pedro Pinto 7fb644ee3e Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-11-10 12:01:10 -05:00
Pedro Pinto 321550d418 More updates to sim db. 2020-11-10 11:59:59 -05:00
Taha Afzal 4234087c34 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-11-10 11:35:57 -05:00
Taha Afzal bdac6bc3fa Callbacks in the AlgoBridge are routed back 2020-11-10 11:35:45 -05:00
Pedro Pinto 524e83c595 Streamlined sim db schema for easier querying. 2020-11-10 10:49:14 -05:00
Pedro Pinto f9b2f413d7 Accoutend for algo transaction latency in simulation. 2020-11-10 10:48:50 -05:00
Pedro Pinto d2f21c4b36 Deterministic names for polygons. 2020-11-10 10:47:46 -05:00
Pedro Pinto 95d8d8a42d Better logging for sniper. 2020-11-10 10:47:34 -05:00
Pedro Pinto 63a2ba032d Cleaned up some queries in md.sql. 2020-11-10 10:46:52 -05:00
Taha Afzal e8ccd265ca More bridge work 2020-11-10 08:48:56 -05:00
Taha Afzal 2c2968fe1a Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-11-08 23:44:59 -05:00
Taha Afzal 2df07f446b Bridge filling in 2020-11-08 23:44:53 -05:00
Pedro Pinto a906eb951e Mapped order ids to be unique 2020-11-08 11:57:08 -05:00
John Colvin 50f3e39b2f Matcher asserts against duplicate/recycled keys 2020-11-06 19:52:30 -06:00
Pedro Pinto 7c730f7b96 Multiple changes. 2020-11-06 19:17:02 -05:00
Pedro Pinto 7bb19d446d Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-11-06 13:10:45 -05:00
Pedro Pinto 8887962d6f Towards a patient sniper 2020-11-06 13:10:41 -05:00
Taha Afzal 2f032def09 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-11-06 11:50:13 -05:00
Taha Afzal 426781a839 Security translation in the bridge 2020-11-06 11:50:01 -05:00
John Colvin 65b3addfdb FifoMergedSecurityMatcher passes order changes directly to FifoSecurityMatcher when implied_matching is off 2020-11-05 16:48:12 -06:00
Taha Afzal b104326036 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-11-05 16:31:28 -05:00
Taha Afzal 74267bbba9 Filling in the bridge 1 2020-11-05 16:31:22 -05:00
Pedro Pinto 5f454bcd6e Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-11-05 15:52:11 -05:00
Pedro Pinto c300bdcac9 Fixed up md.sql. 2020-11-05 15:51:44 -05:00
John Colvin b85604097d fix matcher partial-fills bug (part 2, fill at actual order price if implied matching is off) 2020-11-05 11:57:58 -06:00
Taha Afzal 89d9585ad8 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-11-05 11:53:30 -05:00
Taha Afzal 8e992a6979 IAlgoServices adapter 2020-11-05 11:53:24 -05:00
Pedro Pinto 51a4aabc09 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-11-04 16:37:49 -05:00
Pedro Pinto b423872e66 More DB work. 2020-11-04 16:37:28 -05:00
John Colvin a5ef9fd3cb fix matcher partial-fills bug 2020-11-04 16:15:56 -05:00
Taha Afzal a48686ce11 Adding corid to logs 2020-11-04 10:55:31 -05:00
Pedro Pinto 440a68cb9b Added correlation id to IAlgoServices. 2020-11-04 08:51:35 -05:00
Pedro Pinto 480fd57ea4 Merged 2020-11-04 08:45:40 -05:00
Pedro Pinto f07e018fbd Many changes. 2020-11-04 08:42:43 -05:00
Taha Afzal 95a2093dc3 SniperPolygon was not getting the pid assigned 2020-11-03 17:34:35 -05:00
Taha Afzal e3ec53c3f3 better logs 2020-11-03 11:16:30 -05:00
Taha Afzal 6d679f302b Adding cancel in no side affect orders 2020-11-02 23:24:01 -05:00
Taha Afzal 85fa61768f Commenting out shooting orders till code review 2020-11-02 23:14:31 -05:00
Taha Afzal 447d1a3997 Bridge work start 2020-11-02 23:07:35 -05:00
Taha Afzal a5520204f5 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-11-01 23:13:28 -05:00
Taha Afzal 9b8ebe32d4 Sniper 1.0 completed 2020-11-01 23:13:22 -05:00
Taha Afzal 7914ed4147 Shooting real order 2020-11-01 10:19:04 -05:00
Pedro Pinto a851dc6bb5 Rigged sniper to terminate simulation early so that we iterate quicker 2020-11-01 09:47:06 -05:00
Pedro Pinto c9d9ab9a20 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-11-01 08:55:32 -05:00
Pedro Pinto 84e75c28e5 More tweaks to DB. 2020-11-01 08:55:21 -05:00
John Colvin 1e6829afc7 fix affect-free matching (actually add hypothetical fills to effects vector) 2020-10-31 12:47:01 -04:00
Pedro Pinto 1d23955868 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-10-30 18:42:30 -04:00
Pedro Pinto aebe59a69f Added early termination of simulation. 2020-10-30 18:41:53 -04:00
John Colvin 0b125e3299 fix ERROR logging macro in FifoMergedSecurityMatcher 2020-10-30 18:20:01 -04:00
John Colvin 46b4fab4ed FifoMergedSecurityMatcher affect-free matching impl (assumes no implied markets) 2020-10-30 18:18:10 -04:00
John Colvin 2d6ca5a347 FifoMergedSecurityMatcher should subtract fill qty from working before the post-fill order state is logged 2020-10-30 16:30:20 -04:00
Taha Afzal 145cf2b482 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-10-29 13:36:57 -04:00
Taha Afzal 0a94c729e5 -ve edge allowed, can also be modified on the fly 2020-10-29 13:36:47 -04:00
Pedro Pinto a31331be0c Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-10-29 12:26:12 -04:00
Pedro Pinto 67ab58a99b Added exporting of matcher/sim generated books. 2020-10-29 12:25:03 -04:00
Taha Afzal 3835824d36 Key type is a parameter in the UI 2020-10-29 12:22:02 -04:00
Taha Afzal 02f98accd3 Polygon files can have bts keys or exchange keys (optionally) 2020-10-29 11:19:08 -04:00
Taha Afzal d84119ca6a Merge 2020-10-28 23:32:56 -04:00
Taha Afzal c39fb79fda Fixed the algo string params (SniperAlgo uses it now) 2020-10-28 23:13:20 -04:00
Pedro Pinto d6a5a4023b Fixed sim input bootstraped orders priority 2020-10-28 17:39:21 -04:00
Taha Afzal 8b0a0269ec Better logging and some cleanup 2020-10-28 17:02:28 -04:00
Pedro Pinto 334493c1be Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-10-27 19:21:47 -04:00
Pedro Pinto 71bae99c38 Added more data to the polygon valuation. 2020-10-27 19:21:18 -04:00
John Colvin 3d1ab364dc change bts_assert to log error instead 2020-10-27 18:02:26 -04:00
John Colvin 46820eecff FifoSecurityMatcher::has_same_orders returns the error msg (shouldn't return an empty error msg on failure, as that indicates success) 2020-10-27 17:49:26 -04:00
John Colvin 4bc5f07815 add version header to .icebergs file 2020-10-27 17:46:15 -04:00
John Colvin c78731e033 IcebergFinder subtracts qty changes from estimated qty (the matcher should adjust the total qty incrementally) 2020-10-27 17:40:58 -04:00
John Colvin f063d7ecbd tone down console output in MatcherValidationObserver; change hardcoded GC to ES (temp measure until the cmd accepts symbol args) 2020-10-27 17:40:58 -04:00
John Colvin f67071708d fix iceberg handling in MatcherValidationObserver 2020-10-27 17:40:58 -04:00
John Colvin 09d7d996cd iceberg_helper::subtract_iceberg_fills protects against overfills 2020-10-27 17:40:58 -04:00
John Colvin a143d851f2 add != operators for IcebergQuantity and optional<IcebergQuantity> 2020-10-27 17:40:58 -04:00
John Colvin a25f089810 fix iceberg_file_cache (matcher validation observer saves ibs in file to speed up repeated runs on same pcap) 2020-10-27 17:40:58 -04:00
John Colvin 862d2a7ee8 remove unnecessary field '_side' from FifoSecurityMatcher::BookKeeper 2020-10-27 17:40:58 -04:00
Taha Afzal 408ae423c6 Modifications to the book affecting bit 2020-10-27 16:15:48 -04:00
Taha Afzal 0e1da96e52 Added test for sim order with no book effects 2020-10-27 14:38:03 -04:00
Taha Afzal d0aa686693 FifoMatcher can match without affecting the existing markets 2020-10-27 11:54:07 -04:00
Pedro Pinto 317da795ec Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-10-27 08:52:10 -04:00
Taha Afzal 07887e60c5 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-10-26 18:47:12 -04:00
Taha Afzal a2a7859a04 SniperAlgo 2020-10-26 18:47:04 -04:00
Pedro Pinto d69aee25f9 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-10-26 17:53:17 -04:00
John Colvin 87e855086d FifoSecurityMatcher recomputes book lazily to improve performance 2020-10-26 17:27:38 -04:00
Pedro Pinto e918521266 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-10-26 15:26:42 -04:00
Pedro Pinto 969a3fd843 Intermediate commit 2020-10-26 15:25:57 -04:00
John Colvin 4adfe5708a enable implied matching again (GatewayAgent uses MergedMatcher) 2020-10-26 14:59:24 -04:00
John Colvin d270f60c2c speed up FifoPriceLevelMatcher::populated() method (return as soon as 1 qty is detected) 2020-10-26 14:59:24 -04:00
Pedro Pinto 192f6ef390 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-10-26 13:38:17 -04:00
Pedro Pinto df552e27d6 More views in sim_db. 2020-10-26 13:37:51 -04:00
Pedro Pinto 4850d279f6 CMAke 2020-10-26 13:37:35 -04:00
Pedro Pinto 29896b5ca4 Better logging. 2020-10-26 13:37:27 -04:00
John Colvin 710e05b029 migrate recent iceberg improvements over to DirectMatcher, and disable implied matching (need to resolve slowness in the MergedMatcher) 2020-10-26 12:40:52 -04:00
Pedro Pinto f627bf9238 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-10-26 10:21:32 -04:00
Pedro Pinto 8a59948fe5 Made sniper check available depth before shooting, added a sniper mode
to just log.
2020-10-26 10:20:53 -04:00
Pedro Pinto 5de34a52bd Added some new DB functionality, added utilities to manipulate book. 2020-10-26 10:18:44 -04:00
John Colvin 511b9551e3 delete old test code, clean up logging/console output in FifoMergedSecurityMatcher 2020-10-23 18:20:02 -04:00
John Colvin 8ddaaac244 define mdp3quantity operators with macro 2020-10-23 17:26:43 -04:00
John Colvin ff0d0a2592 add implied_book method to Matcher, make book/implied_book methods const 2020-10-23 16:33:20 -04:00
John Colvin 919d5eb880 uncommented macro to enable implied matching in simulator (enables new iceberg code by side effect) 2020-10-23 16:32:21 -04:00
John Colvin 2e65f52802 Matcher gets iceberg qty directly from MDP3Order (since they are now generated w/ sim_input) 2020-10-23 16:12:19 -04:00
John Colvin 048f170727 fix build 2020-10-23 14:03:43 -04:00
John Colvin bef915fd56 better iceberg deduction; integrate deduced icebergs into matcher 2020-10-23 13:29:37 -04:00
John Colvin 4f493aaf29 add pragma once to security_comp.h 2020-10-23 13:28:26 -04:00
Pedro Pinto 6b91e28d40 added icebergs to simulator input. 2020-10-23 11:28:56 -04:00
Pedro Pinto 895e3eebdd Fixed clang build. 2020-10-23 08:29:57 -04:00
Pedro Pinto 2fed9da9fa Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-10-23 08:28:52 -04:00
Pedro Pinto f6641e2ed1 Added observer algo to help validate the simulator. 2020-10-23 08:28:29 -04:00
Pedro Pinto e5579871b5 Adjusted logging levels as per console/file discussion. 2020-10-23 08:28:08 -04:00
Pedro Pinto e7a68a2ab3 Added top of the book view. 2020-10-23 08:27:32 -04:00
Pedro Pinto 0a58d69083 Faster combination generation. 2020-10-22 11:27:45 -04:00
Pedro Pinto ed1915582c Added view to summarize opportunity. 2020-10-22 11:27:30 -04:00
Pedro Pinto 5ea147efec Trying to speed up polygon valuations. 2020-10-21 10:34:17 -04:00
Pedro Pinto f1c5ba93d3 Fixed bugs in handling of CME fixed sized strings. 2020-10-21 10:31:37 -04:00
Pedro Pinto e741b33810 Added command to list securities. 2020-10-21 10:30:24 -04:00
Pedro Pinto 044b331d27 Fixed build. 2020-10-19 10:18:13 -04:00
John Colvin 9f3124793a implied matching seems slow, added macro in GatewayAgent.cpp to toggle it on or off while i investigate 2020-10-19 00:17:02 -04:00
John Colvin f7c33b5eee tone down logging/console output in matcher 2020-10-19 00:16:12 -04:00
John Colvin d1fc809553 integrate implied matching into simulator 2020-10-18 23:06:25 -04:00
Pedro Pinto e305ad124e Toned down logging 2020-10-17 21:41:26 -04:00
Pedro Pinto f68458a0f8 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-10-17 21:34:44 -04:00
Pedro Pinto b33251fc64 Better opportunity static analysis. 2020-10-17 21:34:14 -04:00
John Colvin 695e484fd7 update externals (added ranges-v3 lib) 2020-10-17 20:28:42 -04:00
John Colvin 281c1d1919 add fifo implied matching facilities 2020-10-17 19:55:56 -04:00
John Colvin 62ad17011e IntPrice * operator for regular ints 2020-10-17 19:34:44 -04:00
Pedro Pinto 52420a1256 build. 2020-10-16 20:19:21 -04:00
Pedro Pinto 9a2ff85669 Logged missing CPP's rather than crashing. 2020-10-16 20:14:54 -04:00
Pedro Pinto 76e0bced60 More realistic limits for polygon search space. 2020-10-16 20:14:37 -04:00
Pedro Pinto e9cdb26d46 Better logging. 2020-10-16 20:13:39 -04:00
Pedro Pinto e780ba5867 Merged 2020-10-15 14:25:39 -04:00
Pedro Pinto e5d77593d1 Changed logging 2020-10-15 14:24:02 -04:00
Pedro Pinto 6580f3883b Added logging of cancel/replace 2020-10-15 14:18:57 -04:00
Pedro Pinto 5e825b70d2 Added logging of cancel/replace 2020-10-15 14:18:28 -04:00
Pedro Pinto 2e13820e28 Dropped polygon opportunities with quantity 0 2020-10-15 10:56:56 -04:00
Pedro Pinto 24c06c5492 Fixed query. 2020-10-15 09:57:28 -04:00
Pedro Pinto ad8ac601ce Added commonly needed indexes to md DB, fixed duration calculation in
polygon opportunity calculation.
2020-10-15 09:53:49 -04:00
Pedro Pinto fc21544cf2 Better polygon opportunity analysis. 2020-10-15 09:17:26 -04:00
Pete Fisher a66eae66bb fixing for python3 2020-10-14 21:56:49 -04:00
Pedro Pinto af6636b44b Added polygon opportunity analysis to SQL. 2020-10-14 21:17:36 -04:00
Pedro Pinto 7ab55a2fe6 Generating merged books. 2020-10-14 16:54:17 -04:00
Pedro Pinto 973cc1195a Added implied book merging. 2020-10-14 12:30:47 -04:00
Pedro Pinto ef849f04a4 Fixed reporting of event id in shout outcome in sniper. 2020-10-14 10:07:04 -04:00
Pedro Pinto f1b91625e2 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-10-14 10:05:21 -04:00
Pedro Pinto 1100d8e1cd Added event it so sniper shots. 2020-10-14 10:00:46 -04:00
Taha Afzal 18bcd7e911 fixing the merge 2 2020-10-13 14:10:03 -04:00
Taha Afzal 5a4e3f5acc Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-10-13 13:25:58 -04:00
Taha Afzal efacf2986f fixing merge conflict 2020-10-13 13:25:52 -04:00
Pedro Pinto 1f6255f751 Another broken build, I hope no one is watching 2020-10-13 13:16:01 -04:00
Taha Afzal 79d03c73d7 Added some more n_contracts, symbol, ticks to sniper output 2020-10-13 12:56:09 -04:00
Pedro Pinto 2905a80138 Massively improved memory usage for simulations. 2020-10-13 11:56:56 -04:00
Pedro Pinto 5cbab11310 Fixed the build, sorry. 2020-10-13 11:06:10 -04:00
Pedro Pinto 51edfb5d61 Improved performance, reduced memory usage in simulation. 2020-10-13 10:44:43 -04:00
Pedro Pinto 7324c160f8 Reduced logging. 2020-10-13 10:44:23 -04:00
Pedro Pinto cb6f67f689 Avoided copying events. 2020-10-13 08:52:37 -04:00
Pedro Pinto 6cfd1cd070 Added better logging of polygon opportunities. 2020-10-13 08:24:32 -04:00
Pedro Pinto d732b7d691 Added better dimenionsing of shot to Sniper. 2020-10-13 08:23:55 -04:00
Pedro Pinto 588319478e Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-10-12 21:26:47 -04:00
Pedro Pinto 814b9f810b Added polygon opportunities logging to sql command. 2020-10-12 21:26:02 -04:00
John Colvin f41f2e5d55 add 'on_order_completed' and 'reset' method placeholders to FifoSecurityMatcher 2020-10-12 15:31:59 -05:00
John Colvin 4d592b1c3b fix FifoSecurityMatcher::book_level (skip empty levels) 2020-10-12 13:52:53 -05:00
Pedro Pinto 1a1de31457 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-10-12 10:15:12 -04:00
Pedro Pinto 38b800981b Tweaks to queries. 2020-10-12 10:14:36 -04:00
Pedro Pinto 89ef56f131 Naming polygons in the SQL DB. 2020-10-12 10:13:45 -04:00
Taha Afzal 2400f5b91c Function for John to be used for implied matching 2020-10-11 18:31:27 -04:00
Taha Afzal 85c3ba0fa3 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-10-11 10:34:53 -04:00
John Colvin c6822be685 add 'fill' method placeholder to FifoSecurityMatcher 2020-10-10 23:09:57 -04:00
Pedro Pinto cb81b0e53e Cleaned up DB. 2020-10-10 18:32:27 -04:00
Taha Afzal 180d776929 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-10-10 15:45:12 -04:00
Pedro Pinto 332f98b3a7 Fixed non deterministic order for events. 2020-10-10 12:44:23 -04:00
Taha Afzal 08a65a290d Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-10-10 11:59:02 -04:00
Pedro Pinto 8bb5301fbb Not sure how I messed this up. 2020-10-10 11:58:06 -04:00
Taha Afzal 51d402fbd5 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-10-10 10:29:11 -04:00
Taha Afzal 6e5f2f1a49 Added better logging in Matcher 2020-10-10 10:29:05 -04:00
Pedro Pinto 3a73b6cb9e Changed sniper, md 2020-10-10 10:15:09 -04:00
Pedro Pinto 64f35f869e Re-enabled sniper. 2020-10-09 14:50:04 -04:00
Pedro Pinto 67d9758ad2 Sped up matching. 2020-10-09 14:15:28 -04:00
Pedro Pinto bcf4a04409 Disabled sniper, added logging to report sim progress. 2020-10-09 11:43:03 -04:00
Pedro Pinto 3be5afc08b Fixed some sniper bugs. 2020-10-09 10:31:47 -04:00
Pedro Pinto 637a8f1efc Added progress logging to simulation. 2020-10-09 10:31:31 -04:00
Pedro Pinto 00f9c9ec2e Fixed utility. 2020-10-09 10:31:11 -04:00
Pedro Pinto 722750faeb Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-10-09 08:12:57 -04:00
Taha Afzal 74d10749b7 Bug where orders changing levels and getting completely filled were not marked as inactive 2020-10-08 23:38:05 -04:00
Pedro Pinto 9dd96b05e2 Better logging. 2020-10-08 17:10:25 -04:00
Taha Afzal e927b35586 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-10-08 14:31:26 -04:00
Taha Afzal e1fb9319a0 better error checking and validation in the matcher 2020-10-08 14:31:19 -04:00
Pedro Pinto 684b7d54b6 Fixed incorrect qty parameterization 2020-10-08 14:25:42 -04:00
Pedro Pinto 925997947f Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-10-08 14:09:10 -04:00
Pedro Pinto dcbd86c1f5 Updated cpp reference data, improved polygon discovery 2020-10-08 14:08:58 -04:00
Taha Afzal 2f45ee3fe3 validation of incoming OrderChange 2020-10-08 13:26:18 -04:00
Pedro Pinto 0d4888111d Merged 2020-10-08 11:50:19 -04:00
Pedro Pinto a062dbe321 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-10-08 11:48:12 -04:00
Pedro Pinto 6ab0824532 Added polygon descriptors 2020-10-08 11:23:21 -04:00
Taha Afzal 385de5108e Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-10-08 11:08:05 -04:00
Taha Afzal c25310c491 assert for correct OrderUpdate state 2020-10-08 11:07:58 -04:00
Pedro Pinto 0fb6bc72a4 Merge remote-tracking branch 'refs/remotes/origin/spartan_tas' into spartan_tas 2020-10-08 10:43:39 -04:00
Pedro Pinto 88039a4c83 Refactored PandL facilties. 2020-10-08 10:43:24 -04:00
Taha Afzal fd1ac28302 clean up period changed 2020-10-08 09:25:38 -04:00
Pedro Pinto e8c6a2ad1c Re-enabled run_sim command. 2020-10-07 18:08:30 -04:00
Pedro Pinto 1ee21c8d3e Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-10-07 18:07:08 -04:00
Pedro Pinto c5388b07f9 code complete for sim logging. 2020-10-07 18:06:46 -04:00
Taha Afzal a165d6d193 Moved MatcherOrder in common 2020-10-07 14:16:58 -04:00
Taha Afzal 77f02d81d5 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-10-07 12:46:34 -04:00
Taha Afzal fc8620939f speed up 2020-10-07 12:46:13 -04:00
Pedro Pinto d319c7ddb8 Fixed build. 2020-10-06 16:10:30 -04:00
Pedro Pinto 24df444584 Driving the simulator across days and parameter variations. 2020-10-06 16:08:33 -04:00
Pedro Pinto 6984676e7f Towards orchestration of simulator runs. 2020-10-06 10:56:40 -04:00
Pedro Pinto 6356cf68f8 Added a field to instrumentdefinition. 2020-10-05 13:13:53 -04:00
Pedro Pinto 8ef76590a1 Many changes related to sniper simulation. 2020-10-05 11:57:20 -04:00
Taha Afzal 724eea5403 Added cancel perf test 2020-10-03 22:18:31 -04:00
Pedro Pinto 96cf8dcfac Added better pnl 2020-10-02 11:27:11 -04:00
Pedro Pinto 5add27a107 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-10-02 11:12:09 -04:00
Pedro Pinto 2683bb6c34 Re-enabled P&L 2020-10-02 11:12:00 -04:00
Taha Afzal 8bdce09aec Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-10-02 11:01:56 -04:00
Taha Afzal a732e926a9 Speed improvements, plus missing sec in execution report filled 2020-10-02 11:01:49 -04:00
Pedro Pinto 2fdec04336 Fixed build. 2020-10-02 10:19:25 -04:00
Pedro Pinto 3199689772 Temporarily disabled display factor adjustment until we have secs in fills. 2020-10-02 10:15:47 -04:00
Pedro Pinto 69efd022bd Fixed P&L calculation for algos. 2020-10-02 10:14:31 -04:00
Pedro Pinto 1604beb3f8 More refactoring. More to come. 2020-10-02 07:25:34 -04:00
Pedro Pinto 0ad57ef290 Fixed build. 2020-10-02 07:08:47 -04:00
Pedro Pinto 376c250802 Refactored. 2020-10-02 07:06:32 -04:00
Pedro Pinto cf1191bf0a Refactoring 2020-10-02 06:46:42 -04:00
Pedro Pinto e1a8870dda Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-10-01 10:33:42 -04:00
Pedro Pinto 7991b8e8bd Improved output 2020-10-01 10:33:20 -04:00
Taha Afzal 198d52eca1 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-10-01 10:24:19 -04:00
Taha Afzal 707c8fbd41 Fixed the side in the matcher execution report 2020-10-01 10:24:13 -04:00
Pedro Pinto 299bf7b4da Sniper is sniping. We are going to be simulated millionaires. 2020-10-01 09:38:00 -04:00
Pedro Pinto 1fb1af7132 First run of the simulator. 2020-09-30 17:17:57 -04:00
Pedro Pinto ce2a6d3b2f Sped up sim runs by caching simulator inputs. 2020-09-30 14:41:22 -04:00
Pedro Pinto 271e14ae5b Cleaned up polygon generation. 2020-09-30 09:51:40 -04:00
Pedro Pinto 110af7795e Cleaned up simulator input generation. 2020-09-30 08:25:33 -04:00
Pedro Pinto 617b4e2bba Added polygons to SQL DB. 2020-09-29 14:35:06 -04:00
Pedro Pinto 5f9705cbdb Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-09-29 13:50:23 -04:00
Pedro Pinto 54333ccb7b Improved polygon detection speed and correctness. 2020-09-29 13:39:02 -04:00
Taha Afzal 5049212af5 FifoMatcher can optionally ignore internally matched orders 2020-09-29 12:53:21 -04:00
Taha Afzal a5a1f87528 Moved the matcher tests into its own file 2020-09-29 11:09:42 -04:00
Taha Afzal f83d57fc0c Spreader tests pass while sending orders to sim 2020-09-28 21:32:19 -04:00
Pedro Pinto e2f4fc83a2 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-09-28 15:03:12 -04:00
Pedro Pinto 2bb246262c Refactored to modularize pcap queries. Added pcap polygon generation cmd. 2020-09-28 15:02:12 -04:00
Taha Afzal ed3cc43e59 Fixed the first ack issue 2020-09-28 14:04:36 -04:00
Taha Afzal 4c505f58c5 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-09-27 22:27:25 -04:00
Taha Afzal 47ac6c5dd3 tests for the spreader bridge 2020-09-27 22:26:48 -04:00
Pedro Pinto e889d0835f Added views to md.sql, documented better. 2020-09-26 12:08:36 -04:00
Pedro Pinto 01ce2211f3 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-09-26 11:53:16 -04:00
Pedro Pinto ffc39be466 Added polygon generation. 2020-09-26 11:52:55 -04:00
Taha Afzal dcfada0b81 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-09-24 14:26:16 -04:00
Taha Afzal ee03de52b7 Events were not getting passed back to the spreader 2020-09-24 14:26:03 -04:00
Pedro Pinto 2fc3a797eb Fixed bug in import. 2020-09-24 12:06:32 -04:00
Pedro Pinto 419dc355e3 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-09-24 08:37:26 -04:00
Pedro Pinto ec994a93e7 Fixed bug in CSV generation. 2020-09-24 08:36:58 -04:00
Taha Afzal 679330ba53 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-09-24 00:21:53 -04:00
Taha Afzal 87d0f93043 spreader ready to go with sim 2020-09-24 00:21:43 -04:00
Pedro Pinto 7e85f390b3 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-09-23 18:02:52 -04:00
Pedro Pinto ef18b37fd3 Added additional security info to sqlite. 2020-09-23 18:02:24 -04:00
Taha Afzal ef016bfafc SpreaderChildOrderUpdate takes a side arg to work better with IAlternateOrderGateway 2020-09-23 17:48:50 -04:00
Taha Afzal 9824ef7686 Added order indirection interface 2020-09-23 12:37:27 -04:00
Taha Afzal 2f21e73d8d Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-09-22 11:24:01 -04:00
Taha Afzal 22f4a7a324 order bridge bw spark and spartan has one link remaining 2020-09-22 11:23:50 -04:00
Pedro Pinto 6bf4966fb3 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-09-22 11:17:08 -04:00
Pedro Pinto 0e552bbcad Improved order deduction. Improved iceberg deduction. 2020-09-22 11:15:08 -04:00
Taha Afzal 4a6b14caa4 Merging 2020-09-21 14:40:31 -04:00
Taha Afzal 519d08cb78 Interfacing sim with spreader 60-70% done 2020-09-21 14:31:32 -04:00
Pedro Pinto e89b4206f9 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-09-21 14:05:21 -04:00
Pedro Pinto 4adbe82e1e Simulator is code complete. 2020-09-21 11:24:21 -04:00
Pedro Pinto 18b7f71020 More simulator framework. 2020-09-21 09:27:13 -04:00
Taha Afzal 86e631ae3e Calling spreader's initialization functions from SimSpreader 2020-09-19 17:22:20 -04:00
Taha Afzal 87bc9b2d25 SimSpreader and some cleanup 2020-09-18 23:49:32 -04:00
Pedro Pinto c7b65ac062 Added simulator framework. 2020-09-18 14:22:14 -04:00
Taha Afzal cb07fc1cb7 Cleaning up FIFO 2020-09-17 11:37:18 -04:00
Taha Afzal 5f489a33f7 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-09-16 14:49:56 -04:00
Taha Afzal a22e3efb64 Filling in matcher 2020-09-16 14:49:51 -04:00
Pedro Pinto fc51a03a70 Fixed estimation of iceberg order to take into account fill status. 2020-09-14 17:16:13 -04:00
Pedro Pinto 090a9dfb17 Added iLink3 documentation. 2020-09-14 12:02:37 -04:00
Taha Afzal ad5000d835 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-09-14 10:11:21 -04:00
Taha Afzal abd1651034 Events causing IB issues added list of traced events 2020-09-14 10:11:15 -04:00
Pedro Pinto 8d94794cdb Added the hability to run the simulator across multiple channels. 2020-09-13 15:53:58 -04:00
Pedro Pinto ab6ffebe20 Simulator is code complete. 2020-09-11 18:59:00 -04:00
Pedro Pinto 0698aa90b3 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-09-11 08:19:17 -04:00
Pedro Pinto 00deda50ec Fixed fifo validation, more refactoring of sim 2020-09-11 08:18:59 -04:00
Taha Afzal c914d97376 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-09-10 12:46:37 -04:00
Taha Afzal b574de32ae facility for fifo to ignore events, plus log a mismatch istead of asserting 2020-09-10 12:46:31 -04:00
Pedro Pinto ab6be7624e Added allowance for self match prevention when deducing orders 2020-09-10 10:56:52 -04:00
Pedro Pinto 300ba5a16e Skipped bad events. 2020-09-10 08:53:47 -04:00
Taha Afzal 9da7784b1b Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-09-09 19:40:50 -04:00
Pedro Pinto 8b2046a4c4 Skiped first 40K events in fifo validation, for speed 2020-09-09 17:45:07 -04:00
Pedro Pinto a5b9e40b53 Skipped open when testing fifo 2020-09-09 17:40:57 -04:00
Pedro Pinto 6c6dd86c02 More refactoring of sim. 2020-09-09 16:42:55 -04:00
Taha Afzal 109a12412a Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-09-09 14:06:07 -04:00
Taha Afzal 10edd13593 Log adjustments again 2020-09-09 14:06:01 -04:00
Pedro Pinto d7014ce172 Better deduced order detection, refactored sim 2020-09-09 13:47:28 -04:00
Pete Fisher 27aa43f44d fixed time on ilink2 audit 2020-09-09 12:16:57 -04:00
Pedro Pinto 19e087aa69 Fixed time reporting in iLink3. 2020-09-09 10:58:34 -04:00
Taha Afzal 899218ccf6 Moving MatchingCommon to the new matching directory 2020-09-09 10:41:41 -04:00
Taha Afzal 5fbd5b8804 Fixing merge conflict 2020-09-09 10:35:14 -04:00
Taha Afzal 8a564c38e9 More selective logging to catch the offending orders 2020-09-09 10:13:04 -04:00
Pedro Pinto 5758b56296 Improved iceberg detection 2020-09-09 10:00:52 -04:00
Pedro Pinto da8c8c271a Merged 2020-09-08 11:59:38 -04:00
Pedro Pinto 26a0508e03 Simulator in progress. 2020-09-08 11:55:45 -04:00
Taha Afzal 80294f9f37 Fixing merge 2020-09-08 10:19:31 -04:00
Taha Afzal c408825a8d better logging to trace down specific orders 2020-09-08 10:09:29 -04:00
Pedro Pinto 5cdc4f5a66 Flushing out simulator. 2020-09-07 14:41:23 -04:00
Pedro Pinto d5bc1a0acb Tweaked test. 2020-09-07 14:41:08 -04:00
Pedro Pinto 0f8ae1e345 Refactored simulator names, structure. 2020-09-07 09:03:58 -04:00
Pedro Pinto 6bcd13f30c Added generation of sim input. 2020-09-04 14:14:38 -04:00
Pedro Pinto a330ecf24d Skipped icebergs in FIFO validation. 2020-09-04 10:34:19 -04:00
Pedro Pinto 8df3bf38cd Cleaned up sqlite file generation. 2020-09-04 08:32:00 -04:00
Pedro Pinto 9e1f72df94 Added a SQL command that generates a SQL DB from a pcap. 2020-09-03 21:01:49 -04:00
Pedro Pinto b615a6105a Added to md.sql documentation. 2020-09-03 11:50:30 -04:00
Pedro Pinto 5c9595f4a6 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-09-03 11:46:57 -04:00
Pedro Pinto efa8aa297d Working Sim. 2020-09-03 11:46:44 -04:00
Taha Afzal 47b45d2a53 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-09-03 11:39:20 -04:00
Taha Afzal cf3eae1311 added comments to the columns in the sql script 2020-09-03 11:39:01 -04:00
Pedro Pinto f197077e78 Ran clang-format on spartan. 2020-09-03 10:33:19 -04:00
Pedro Pinto 0240be755a Added icebergs 2020-09-02 15:58:09 -04:00
Pedro Pinto 0c69024f7a Added Icebergs to CVS output. 2020-09-02 15:30:40 -04:00
Pedro Pinto 15be25a382 Added helper in FIFO matcher. 2020-09-02 11:18:45 -04:00
Pedro Pinto 3047cc2570 Included priorIty In deduced order, why not. 2020-09-02 11:18:26 -04:00
Pedro Pinto 4369cb61fe Cleaned up debug output 2020-09-02 09:29:16 -04:00
Pedro Pinto 04c4674582 Improved diagnostics. 2020-09-02 09:26:44 -04:00
Pedro Pinto 504ef84da3 Better diagnostic 2020-09-01 17:27:26 -04:00
Pedro Pinto 8cc564da96 Merged 2020-09-01 17:13:47 -04:00
Pedro Pinto 2abc69fd7c Fixed a bug in deducing orders, improved output. 2020-09-01 17:06:44 -04:00
Taha Afzal 87d0498c23 Improved the on_same_orders return message 2020-09-01 16:34:32 -04:00
Taha Afzal ecb3893370 Fixing merge conflict 2020-09-01 14:21:49 -04:00
Taha Afzal f974d90eaa FifoSecurityMatcher::on_same_orders now returns an optional<string> 2020-09-01 13:40:27 -04:00
Pedro Pinto 6a4e06873b Added diagnostics, fixed order priority insertion 2020-09-01 11:02:17 -04:00
Taha Afzal 3b235efd3f Changing Info logging to Diag 2020-08-31 16:21:20 -04:00
Taha Afzal 2f8436e131 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-08-31 16:17:16 -04:00
Taha Afzal e801951820 More logging 2020-08-31 16:17:11 -04:00
Pedro Pinto 2b61e65bf5 Added seamless XZ decompression on any spartan cmd. 2020-08-31 10:45:31 -04:00
Pedro Pinto f5fe552cd9 Working on adding seamless decompression. 2020-08-31 08:00:41 -04:00
Taha Afzal 6b529d0f7e Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-08-29 23:54:58 -04:00
Taha Afzal 4c3ad827c5 fixed bug, more logs, ahdered to new IB in MDP3Quantity 2020-08-29 23:54:47 -04:00
Pedro Pinto 6b09e18948 Referenced iml. 2020-08-28 15:50:43 -04:00
Pedro Pinto 9103a00f20 cleaned up slightly 2020-08-28 13:46:04 -04:00
Pedro Pinto 7a7588f8d9 Changed the fifo matcher harness 2020-08-28 13:44:12 -04:00
Pedro Pinto 7ee0068ff0 Added inital harness to test fifo. 2020-08-28 12:01:06 -04:00
Pedro Pinto 9b586b2ae2 Better documentation. 2020-08-28 10:38:05 -04:00
Pedro Pinto 09f7879c83 Comment in SQL. 2020-08-28 10:35:32 -04:00
Pedro Pinto d80e27f989 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-08-27 12:04:17 -04:00
Pedro Pinto 45f9e53f10 Fixed deduced orders, iceber orders. 2020-08-27 12:03:26 -04:00
Taha Afzal e2d11cb59b Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-08-27 10:41:20 -04:00
Taha Afzal d0b923339d fixed cross IB test (bug was in the test) 2020-08-27 10:41:09 -04:00
Pedro Pinto 9deb6182d0 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-08-27 08:27:37 -04:00
Pedro Pinto 4c4e870c67 Merge branch 'master' into spartan_tas 2020-08-27 08:24:01 -04:00
Pedro Pinto 167c8c23a0 Fixed batching of orders under iLink3. 2020-08-27 08:19:47 -04:00
Pedro Pinto 3f3b481654 Merged 2020-08-26 11:21:40 -04:00
Pete Fisher 0fa870ea40 added MJF 2020-08-26 11:05:15 -04:00
Pedro Pinto 2b3b551898 Merged 2020-08-26 11:03:15 -04:00
Pedro Pinto ad4d97c17e Tweaked IB struct. 2020-08-26 08:29:09 -04:00
Taha Afzal c941105502 IB cross order 2020-08-25 19:24:16 -04:00
Taha Afzal 174743cdb6 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-08-25 13:44:48 -04:00
Taha Afzal a752ad0cbc fixed bug with iceberg filling 2020-08-25 13:44:43 -04:00
Pedro Pinto 477e33eb81 Merged 2020-08-25 13:39:56 -04:00
Pedro Pinto 052268f052 Better json printing, faster processing on sec status change, progress in iceberg detection. 2020-08-25 13:37:43 -04:00
Taha Afzal 27294f125d iceberg test 2020-08-25 11:39:19 -04:00
Pete Fisher d235f4be41 fixed jetfix.conf ports on relay 2020-08-25 10:03:09 -04:00
Pete Fisher e80c634bd1 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-08-25 09:01:28 -04:00
Pete Fisher 37f33778e1 fixed jetfix.conf 2020-08-25 09:01:13 -04:00
Taha Afzal c540fdd11f Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-08-24 23:17:14 -04:00
Taha Afzal e7f9e98f0a Resting IB matching engine completed 2020-08-24 23:17:05 -04:00
Taha Afzal 253586fc79 Iceberg reloading 2020-08-24 20:40:11 -04:00
Pedro Pinto ec43dbd82d Maybe fixed the self match prevention problem. 2020-08-24 17:02:58 -04:00
Pedro Pinto f07998d6a6 Fixed order rounding error in ilink3 2020-08-24 16:17:31 -04:00
Pedro Pinto 9d0c99a17b Richer console logging 2020-08-24 16:16:11 -04:00
Pedro Pinto 58992eb893 Changed logging subsystem from ilink3 to iLink3 2020-08-24 16:16:11 -04:00
Pete Fisher a471670a91 added audit log scripts to be run by the docker container 2020-08-24 16:15:27 -04:00
Pete Fisher 96e1d25ca4 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-08-24 15:22:54 -04:00
Pete Fisher d4bb88dbfe added jetfix going to cert relay 2020-08-24 15:21:45 -04:00
Taha Afzal bbc2277bae Order's exchange priority need not be kept around 2020-08-24 12:25:14 -04:00
Taha Afzal d54861a9d0 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-08-24 12:02:18 -04:00
Taha Afzal a5d98a32b6 Iceberg related changes 2020-08-24 12:01:59 -04:00
Pedro Pinto b3dc2cdcd4 Changed logging subsystem from ilink3 to iLink3 2020-08-24 11:06:44 -04:00
Pedro Pinto a2ea2239da Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-08-24 08:37:41 -04:00
Pedro Pinto 5e56a66171 Multiple improvements. 2020-08-24 08:37:08 -04:00
Taha Afzal fa0674a657 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-08-21 23:23:36 -04:00
Taha Afzal 2eb2b07f8f fixed bug with sweeps 2020-08-21 23:23:26 -04:00
Taha Afzal b7f15986ad tests for order remove/modify and its affects on the book 2020-08-21 18:49:00 -04:00
Pedro Pinto 3e0cdde714 Corrected how we handle security tradus status changes. 2020-08-21 17:49:12 -04:00
Pedro Pinto 3334f1b709 A few more tweaks. 2020-08-21 17:49:12 -04:00
Taha Afzal 29e080da71 remove tests 2020-08-21 16:18:24 -04:00
Taha Afzal 927cd60d41 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-08-21 12:15:56 -04:00
Pedro Pinto 7c5cb5b7f7 Updated csv generation to include implied matching status. 2020-08-21 12:13:23 -04:00
Taha Afzal 9f84f7215c Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-08-21 12:09:45 -04:00
Taha Afzal 14fd296aa2 some iceberg adjustments, and more tests 2020-08-21 12:09:32 -04:00
Pedro Pinto 470f94f6e1 Added support for implied matching status. 2020-08-21 11:48:33 -04:00
Pedro Pinto 9bfd33320e More changes to instrument definition. C++ continues to mistify. 2020-08-21 10:33:48 -04:00
Pedro Pinto f7a2693952 Cleaned up instrument definition. 2020-08-21 09:28:44 -04:00
Pedro Pinto d573447d64 Added method to visit security 2020-08-21 09:03:47 -04:00
Pedro Pinto ccd7d29501 Fixed some bugs in cvs export 2020-08-21 01:00:10 -04:00
Pedro Pinto 291699fb9b Added books to CSV output. 2020-08-21 00:22:36 -04:00
Pedro Pinto 056e0f8aa7 Removed debug break 2020-08-20 17:25:44 -04:00
Pedro Pinto 45ed583d46 Fixed a few bugs, made it possible to stream through a pcap once only 2020-08-20 17:13:52 -04:00
Pedro Pinto 54a2131b20 Fixed typo. 2020-08-20 12:01:51 -04:00
Taha Afzal a4bbb6c88b Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-08-20 10:59:02 -04:00
Taha Afzal e6c2ceb931 tests for single price level 2020-08-20 10:58:57 -04:00
Pedro Pinto c43ec4a56d Added script to easily compress pcaps. 2020-08-20 10:43:58 -04:00
Pedro Pinto b871cc4e09 Cleaned up code. 2020-08-20 09:25:38 -04:00
Pedro Pinto 6aec729b6a Added prettier logging when observing spartan pcaps 2020-08-19 21:16:54 -04:00
Pedro Pinto 025625e0b9 Simplified console logging 2020-08-19 21:15:40 -04:00
Pete Fisher 0963aee137 added audit log scripts to be run by the docker container 2020-08-19 17:49:47 -04:00
Pedro Pinto 5c5bc243d2 Added new spartan command to clean up pcaps to just what we need. 2020-08-19 16:29:49 -04:00
Taha Afzal 0d0af32b85 Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas 2020-08-19 14:30:17 -04:00
Taha Afzal 46c2d2e916 cleaning 2020-08-19 14:30:10 -04:00
Taha Afzal ff6d0f0e1b cleaning up, fixing the sorting of prices 2020-08-19 14:14:40 -04:00
Pedro Pinto 86ca092f18 Fixed bug that was preventing import of oil data. 2020-08-18 13:06:58 -04:00
Pedro Pinto ec3d642cee Better export to CSV. 2020-08-18 10:58:42 -04:00
Pedro Pinto 7489d70c95 Added some sql tools, added order deduction 2020-08-18 07:51:16 -04:00
Pedro Pinto 81bb5404cb Merged 2020-08-18 07:50:59 -04:00
Taha Afzal a0155beb83 Fifo Matching Engine 2020-08-18 00:02:10 -04:00
Pedro Pinto c2f8e92b10 Hopefully fixed the ilink3 filled qty reporting problem.
This was crashing the spreader.
2020-08-13 08:42:43 -04:00
Pedro Pinto 7ae0142dff Fixed reset of sequence numbers problem 2020-08-12 11:56:08 -04:00
Taha Afzal 780b74fc56 Basic scaffolding plus price level match 2020-08-11 20:09:09 -04:00
Pedro Pinto 78bc14348d Miscelaenous improvements. 2020-08-10 13:46:59 -04:00
Pedro Pinto 52bc0f1a17 Better spelling. 2020-08-09 17:24:55 -04:00
Pedro Pinto c52c24c3f2 Fixed some more issues. Everything looks good now. 2020-08-09 17:06:53 -04:00
Pedro Pinto 0d9277bf6a Added test file, discovered feeds automatically. 2020-08-08 16:32:54 -04:00
Pedro Pinto 761797dc24 Fixed a few more bugs. 2020-08-07 20:32:31 -04:00
Pedro Pinto 39a560c394 Fixed a couple more serious bugs. 2020-08-07 14:15:04 -04:00
Pedro Pinto b4f01da8d8 Added print. 2020-08-07 13:13:33 -04:00
Pedro Pinto f7ca1efdb8 Fixed a number of bugs. 2020-08-07 13:08:51 -04:00
Pedro Pinto 1b4ed339d6 More bugs, more fixes. 2020-08-06 12:20:00 -04:00
Pedro Pinto 5af89e0124 Fixed a few more bugs. 2020-08-06 12:11:58 -04:00
Pedro Pinto 1fddbf1cca More tests, more fixes. 2020-08-06 08:58:10 -04:00
Pedro Pinto 1cd1a23c80 Added a unit test and fixed some bugs. 2020-08-05 11:22:09 -04:00
Pedro Pinto b987ec6a8a Added a smoke test for MD. 2020-08-04 17:28:17 -04:00
Pedro Pinto f509026815 Code complete on MD. 2020-08-04 17:13:48 -04:00
Pedro Pinto 557b658146 Almost done. 2020-08-04 16:54:00 -04:00
Pedro Pinto e3c4960622 Fixed build. 2020-08-04 08:32:42 -04:00
Pedro Pinto 350b4307dc Refactor. 2020-08-03 20:59:54 -04:00
Pedro Pinto 762ca47a59 Refactored. 2020-08-03 20:47:25 -04:00
Pedro Pinto 79b83ba494 Refactored. 2020-08-03 20:47:04 -04:00
Pedro Pinto 51f5155a1a Removed obsolete code. 2020-08-03 20:42:53 -04:00
Pedro Pinto d0b3124813 Recovery complete. 2020-08-03 20:36:42 -04:00
Pedro Pinto 29128dd014 Almost code complete. 2020-08-03 18:15:46 -04:00
Pedro Pinto 9e8f5809c3 Starting work on integrating recovery with realtime processing. 2020-08-03 11:11:06 -04:00
Pedro Pinto 7e2001744c More refactoring. 2020-08-03 09:43:51 -04:00
Pedro Pinto f5b83efade Incremental Queue completed. 2020-08-02 16:22:57 -04:00
Pedro Pinto aedb9d2ae1 Refactored for consistency. 2020-08-02 16:10:54 -04:00
Pedro Pinto 5ccd28d84d Refactored. 2020-08-01 20:38:53 -04:00
Pedro Pinto 3320888fc8 Instrument defintion copy. 2020-07-30 17:16:35 -04:00
Pedro Pinto 456e9bf357 Finished real time feed processor. 2020-07-30 16:11:35 -04:00
Pedro Pinto 275a757eb7 Finished up InstrumentSnapshot. 2020-07-30 10:32:10 -04:00
Pedro Pinto d51d170891 Lots of progress on real time feed processing 2020-07-29 13:22:34 -04:00
Pedro Pinto 87d138740f More refactoring and tools. 2020-07-27 08:45:18 -04:00
Pedro Pinto 625f165a63 Life-time management bug, one & cost a whole day. 2020-07-24 18:13:56 -04:00
Pedro Pinto 8421ed0ae9 Small changes. 2020-07-24 18:13:39 -04:00
Pedro Pinto 2a03eb323d Initial tests run. 2020-07-21 12:08:27 -04:00
Pedro Pinto cac6a9cd53 Refactoring. 2020-07-20 09:38:22 -04:00
Pedro Pinto a148b8fdcb More recovery work. 2020-07-20 08:29:18 -04:00
Pedro Pinto d635e8a978 Getting close to recovery. 2020-07-17 20:16:57 -04:00
Pedro Pinto 7aadd38934 More refactoring. 2020-07-17 08:52:46 -04:00
Pedro Pinto b63b11982b Refactoring. 2020-07-15 12:24:01 -04:00
Pedro Pinto 88a4d2ed80 Crazy template stuff. 2020-07-12 16:40:08 -04:00
Pedro Pinto 26bdef7ddd Merged with master 2020-07-11 12:30:06 -04:00
Pedro Pinto db0ffba8ed Fixed windows build 2020-07-10 13:00:20 -04:00
Pedro Pinto a274a214b4 Merged with master 2020-07-10 11:31:47 -04:00
Pedro Pinto bbcfa3c75a merged with prod 2020-07-10 10:45:10 -04:00
Pedro Pinto 89229d65f1 Merge branch 'master' of bitbucket.org:bluetradesys/spark 2020-07-10 10:43:34 -04:00
Pedro Pinto 0e75cde409 Fixed a bad asser in recovery, a few typos, haderned against bad securities. 2020-07-10 10:36:03 -04:00
Pedro Pinto 42fa6dfaff Fixed life cycle of exe reports and config during replay. 2020-07-09 16:06:39 -04:00
Pedro Pinto 400143c84d Protected against ticker subs for expired securities. 2020-07-09 14:45:51 -04:00
Pedro Pinto e915945880 Trying to replay fix logs. 2020-07-09 14:27:22 -04:00
Taha Afzal ca6673e98f Merge branch 'prod' 2020-07-09 13:09:57 -04:00
Taha Afzal 479f3dccff Adding OnSignal (this is a new algo which is hidden by default) 2020-07-09 13:07:28 -04:00
Pedro Pinto 9601ebab20 Adding replay of stored messages. 2020-07-09 10:16:31 -04:00
Taha Afzal c272d8a8c2 Pyramid Algo: Takes care of the rounding error when Top == sum (child orders) 2020-07-08 13:35:21 -04:00
Pedro Pinto b344ab3377 Fixed an issue with order recovery from Exec reports. 2020-07-08 12:07:48 -04:00
Pedro Pinto ae3080b031 Refactoring. 2020-07-08 10:10:14 -04:00
Pedro Pinto f0464331cb Added better handling of cancel rejects. 2020-07-08 09:52:18 -04:00
Pedro Pinto 0648b618bf Refactored. 2020-07-08 08:42:53 -04:00
Pedro Pinto 59282b8c70 Added one more test to manual order entry list. 2020-07-08 08:42:18 -04:00
Pedro Pinto 34a86009ce Doc and tool minor update. 2020-07-08 07:44:01 -04:00
Pedro Pinto 0ad9ae9001 Small tweak to logging tool. 2020-07-07 20:19:59 -04:00
Pedro Pinto a296e1e772 Fixed parsing of stop px in link3. 2020-07-07 20:19:41 -04:00
Pedro Pinto 7f53d8b161 Improved logging, fix iceberg order, removed duplicate logging. 2020-07-07 17:01:24 -04:00
John Colvin fbd8bbd4a8 algo abbreviation code uses string.Join instead of list_string (the latter method is redundant, should be removed) 2020-07-07 13:16:18 -05:00
John Colvin 3da52b350f fix pure crash (algo abbreviation code choked on names that end with a space) 2020-07-07 13:15:55 -05:00
Pedro Pinto 243d6827d4 Merge remote-tracking branch 'refs/remotes/origin/ilink3_final' into ilink3_final 2020-07-07 12:12:09 -04:00
Pedro Pinto 00221f9bd9 Fixed spread order entry. 2020-07-07 12:11:11 -04:00
Pedro Pinto a6171ae405 Fixed spread order entry. 2020-07-07 11:55:05 -04:00
Pedro Pinto be5d01a797 Fixed fills. 2020-07-07 06:47:58 -04:00
Pedro Pinto e5d9d324bf Order order entry manual test. 2020-07-06 18:22:39 -04:00
Pedro Pinto c34dee9d96 Taked order status from execution report, parse error message in il3 2020-07-06 18:21:44 -04:00
Pedro Pinto e5a98aab41 Merged with master 2020-07-06 12:49:24 -04:00
Pedro Pinto 10cd35372b Can enter, modify, cancel orders. 2020-07-06 11:38:17 -04:00
Pedro Pinto ad4515be39 Renamed NativeOrder to GLBXNativeOrder 2020-07-06 09:47:34 -04:00
Pedro Pinto ff4d87dd6b Fixed IL3 execution report parser to convert exchange prices. 2020-07-06 09:34:26 -04:00
Pedro Pinto 8ddde3f9da Part 2 of MBO service fix. 2020-07-06 09:34:09 -04:00
Pedro Pinto 51093dc3a5 Added simple tool to watch spark logs. 2020-07-06 09:33:35 -04:00
Pedro Pinto 5d5db9ad9f Fixed MBO parser to extract the right exchange key. 2020-07-06 09:33:06 -04:00
Pedro Pinto fca808fe0d Made ilink3 gw wait for start() before its starts. 2020-07-03 14:11:22 -04:00
Pedro Pinto 07d14f877b More nonsense 2020-07-02 20:28:49 -04:00
Pedro Pinto 5ea6dccdd4 Something here breaks 2020-07-02 19:04:49 -04:00
Pedro Pinto ac956a5c02 Renamed ExchangeOrderIDu64 to ExchangeOrderID64 2020-07-02 19:00:32 -04:00
Pedro Pinto 1fba09cf94 Refactor of ids. 2020-07-02 11:05:04 -04:00
Pedro Pinto 0baa6b875e Fixed merge error. 2020-07-02 09:09:20 -04:00
Pedro Pinto cdacc2d4d4 Merged 2020-07-02 07:26:43 -04:00
Pedro Pinto 1433541947 Automatically advanced our own seq number on connection failure.
It is fairly easy for our sequence number to be behind CME if we
crash. Since we can detect this issue (CME tells us about it) we can
try to fix it automatically by incrementing our own sequence
number. This should allow us to recover automatically in some
scenarios.
2020-07-02 06:57:01 -04:00
Pedro Pinto 1070ca7ace Ran clang-format. 2020-07-02 06:28:32 -04:00
Pedro Pinto 56fa27dd7e Handled non text timestamp in native order. 2020-07-02 06:23:07 -04:00
Pedro Pinto d87b522bc6 Added better logging when terminated by exchange. 2020-07-02 06:22:38 -04:00
Eric Harding 166cb03782 Provide account when parsing execution reports. 2020-07-01 14:40:10 -04:00
John Colvin 40bad84c48 algo studio includes algos with undefined children in the dropdown 2020-07-01 12:09:12 -05:00
Eric Harding c3786d9d64 ilink3: Provide SecurityOracle to execution report parser 2020-07-01 11:50:03 -04:00
Pedro Pinto 9080e3124b Filled in cust_order_handing_inst 2020-07-01 11:29:47 -04:00
Pedro Pinto d9c536124a Fixed logging of session seq numbers. 2020-07-01 11:29:30 -04:00
Pedro Pinto 7de6b2907e Filled in sendercompid in routing record.
iLink3 requires this.
2020-07-01 10:48:01 -04:00
Eric Harding 75f017e9f8 ilink3: Get PartyDetails from sender_cmp_id 2020-07-01 10:29:20 -04:00
Pedro Pinto 7757ab3ea0 Fixed a few bugs. 2020-06-30 19:35:53 -04:00
Pedro Pinto 3186dd383c We can connect now. 2020-06-30 19:03:35 -04:00
Pedro Pinto 45f751c9c6 Bad merge. 2020-06-30 19:03:35 -04:00
Pedro Pinto e4d3774980 Better logging. 2020-06-30 19:03:35 -04:00
Eric Harding eedb3ce05d Clear hmac for json logging 2020-06-30 17:11:01 -04:00
Eric Harding 6a7d38c0fd flip session bool 2020-06-30 16:10:26 -04:00
Eric Harding 7f9967834d add readme note 2020-06-30 15:34:03 -04:00
Eric Harding 31ccbfcd19 Switch to ilink3 logging group 2020-06-30 14:43:38 -04:00
Eric Harding c2abf90cc4 IL3MessageFramer owns outgoing messages so it needs to outlive ILinkGW 2020-06-30 14:36:02 -04:00
Eric Harding 8dc4735248 ilink3: set_state(Error) only after disconnect 2020-06-30 14:25:59 -04:00
Pedro Pinto d940d9f11d For now, caught serialization error in some ilink3 msgs. 2020-06-30 14:10:07 -04:00
Pedro Pinto 1e0c75c6c7 Added iLink3 subsystem for logging. 2020-06-30 14:09:55 -04:00
Eric Harding fbaa17bc40 Add some comments to marketdata.proto 2020-06-30 13:16:30 -04:00
Eric Harding 38e3cd6197 Update market data readme 2020-06-30 13:13:48 -04:00
Pedro Pinto 3bb9961af4 Refactor. 2020-06-30 11:35:40 -04:00
Pedro Pinto da8088fd8d Rebased 2020-06-30 11:27:56 -04:00
Eric Harding 748a65f671 Merge branch 'ilink3_gateway' of bitbucket.org:bluetradesys/spark into ilink3_gateway 2020-06-30 10:05:33 -04:00
Eric Harding 66d80136bd ilink3: Keep outgoing messages alive forever. 2020-06-30 10:04:42 -04:00
Eric Harding 10386311d4 Update market data readme 2020-06-29 12:25:30 -04:00
Eric Harding 629a7f8130 Remove unused class in MD 2020-06-29 12:25:14 -04:00
Pedro Pinto 81189bb2cc Forgot to add message logger. 2020-06-29 12:08:22 -04:00
Pedro Pinto e5681a50f2 Made session name come from date. 2020-06-29 10:59:15 -04:00
Pedro Pinto 69fe4569e3 Made FIX session name available as uint64_t as well as strings. 2020-06-29 10:57:40 -04:00
Pedro Pinto faedb0a49e Feed handler. 2020-06-29 07:34:51 -04:00
Pedro Pinto c7caf66f9c Changed the ILink3 log format to json. 2020-06-26 19:11:05 -04:00
Pedro Pinto 14504f4a94 Cleaned up comment. 2020-06-26 19:10:49 -04:00
Pedro Pinto 5b601a4016 Fixed encofing of clorid. 2020-06-26 19:10:23 -04:00
John Colvin e3207b921a truncate list of securities in transitive compare test (was timing out due to too many permutations) 2020-06-26 13:32:27 -05:00
Pedro Pinto d148255917 Refactored mdp3feedhandler. 2020-06-26 08:08:07 -04:00
Taha Afzal 98db8e61a5 Removing hardcoded ref's to Katallage 2020-06-25 17:05:10 -04:00
Pedro Pinto 45aa75e8bb Brought back the ilink3/ilink2 encoding abstraction. 2020-06-25 16:49:46 -04:00
Pedro Pinto b2471d45b2 Added tool 2020-06-25 16:49:10 -04:00
Pedro Pinto 11e2df8c76 Tweaked build tools. 2020-06-25 16:49:10 -04:00
Pedro Pinto cba6852655 Updated docker 2020-06-25 16:49:10 -04:00
Pedro Pinto 5eeaedde26 Added a few build tools. 2020-06-25 16:49:10 -04:00
Pedro Pinto b63052dbaa Updated ICE Onixs 2020-06-25 16:49:10 -04:00
Pedro Pinto 29f5bc798e Added +x 2020-06-25 16:49:10 -04:00
Pedro Pinto 04603acbb9 Added publishing of new routing info when orders are recorevered from disk 2020-06-25 16:49:10 -04:00
Pedro Pinto bc6890055e temp commit, fixing glbxnative order 2020-06-25 16:49:10 -04:00
Pedro Pinto ea94c09c78 Eric intermediate ilink3 fixes 2020-06-25 16:49:10 -04:00
Pedro Pinto 00b1d3c51c Feed handler 2020-06-25 06:02:17 -04:00
Eric Harding e3c3bc78fc Note what this address list is for 2020-06-24 20:55:20 -04:00
Eric Harding a11d390dcd ilink3 message logging 2020-06-24 20:52:21 -04:00
Eric Harding 7c74a961d4 Add canned cert sessions for ilink3 nrcert 2020-06-24 20:43:27 -04:00
Eric Harding 5db21ad2ca fix build, session and clordid changes 2020-06-24 19:32:12 -04:00
Pedro Pinto b68c963b5e c2 2020-06-24 19:16:59 -04:00
Pedro Pinto a43070f812 c1 2020-06-24 19:15:14 -04:00
Eric Harding f703dabdfe Raw msg should be 2 strings 2020-06-24 17:53:30 -04:00
Eric Harding 237d3eea4b encode_clordid needs security key 2020-06-24 17:29:06 -04:00
Taha Afzal e009316bfb Merge branch 'DJ_ICE' of bitbucket.org:bluetradesys/spark into DJ_ICE 2020-06-24 17:13:38 -04:00
Taha Afzal 5528efd2d2 Cleaning up 2020-06-24 17:13:31 -04:00
Eric Harding 818bdec130 Add NrCert keys 2020-06-24 15:07:02 -04:00
John Colvin 09f91735fe Security sort tests run with ice securities 2020-06-24 12:58:29 -05:00
John Colvin d9fc18547b SecurityHelper.Compare fallsback on 'ToString' then 'Id' comparisons to guarentee deterministic sort 2020-06-24 12:56:29 -05:00
Eric Harding d257cf2c77 Disable broken ilink3 tests for now 2020-06-24 13:28:33 -04:00
Eric Harding 079f46404f Add some testing notes 2020-06-24 10:57:15 -04:00
Pedro Pinto f6b5ab040c Refactor. 2020-06-24 08:25:56 -04:00
Pedro Pinto 86ddf3078d Refactor. 2020-06-24 07:32:59 -04:00
Pedro Pinto bc4fe19bdb Refactor. 2020-06-24 07:32:33 -04:00
Eric Harding edcc73e934 Remove old ILink3ExecutionGateway. Instead use GlbxIlink3ExecutionGateway 2020-06-23 22:41:33 -04:00
Taha Afzal 5905ca3e92 Merging frmo master 2020-06-23 13:51:14 -04:00
Pedro Pinto bb259b128a More tools 2020-06-23 13:43:05 -04:00
Pedro Pinto bc7ac8523b Added tool 2020-06-23 13:06:15 -04:00
Eric Harding 0c4c2b7231 cme autocert msgw_failover test script 2020-06-23 13:05:32 -04:00
Eric Harding 420351c093 Replay refactor #4 2020-06-23 12:01:52 -04:00
Eric Harding f69e6b89c5 Sequence number fixes 2020-06-22 22:23:13 -04:00
Eric Harding c3e22e4b23 Recovery revamp #3 2020-06-22 20:16:21 -04:00
John Colvin 32b7b7f40d quantity conversion for ladder right click order 2020-06-22 17:02:23 -05:00
Pedro Pinto 1d443531fd Merge branch 'master' into spartan_tas 2020-06-22 11:27:43 -04:00
Pedro Pinto 54e5a68730 Tweaked build tools. 2020-06-22 08:41:19 -04:00
Pedro Pinto 880c95d92b Tweaked build tools. 2020-06-20 17:17:22 -04:00
Pedro Pinto 40956c5335 More spartan tools. 2020-06-20 17:13:50 -04:00
Pedro Pinto 44aba08978 Tweaked build tools. 2020-06-20 17:13:29 -04:00
John Colvin e7da6dd79e remove unused 'save/remove_template_cmd' props from OrderPropertiesEditor 2020-06-19 16:42:38 -05:00
John Colvin 8bf78aa880 cleanup/normalize whitespace in OrderDataHelper.cs 2020-06-19 16:37:21 -05:00
John Colvin 1c44165181 remove unused methods/props in OrderDataHelper.cs 2020-06-19 16:35:15 -05:00
John Colvin 8165ec0e3d fix AlgoProvider.get_permitted_algos (seed intersection aggregate a full set instead of empty) 2020-06-19 16:14:58 -05:00
John Colvin 7d1ec5b82a Merge remote-tracking branch 'refs/remotes/origin/DJ_ICE' into DJ_ICE 2020-06-19 15:48:55 -05:00
John Colvin 02e7fb1ee0 iceberg 'show quantity' param uses display divisor 2020-06-19 15:45:17 -05:00
John Colvin c0ea6943e1 AlgoProvider ensures synthetic security algo's last child is a Spreader algo 2020-06-19 15:12:42 -05:00
John Colvin 4c914a2d48 Merge branch 'DJ_ICE_algo_config' into DJ_ICE 2020-06-19 10:59:10 -05:00
Taha Afzal 0ee86f2dd4 CPP override fix 2020-06-19 11:58:58 -04:00
Taha Afzal 00bf3c7f47 Fixing the PNL timestamp 2020-06-19 11:10:23 -04:00
Taha Afzal b61e18d10e CPP logic 2020-06-19 00:44:13 -04:00
John Colvin 90b2607f86 pnl window symbol filter items are sorted 2020-06-18 13:06:41 -05:00
John Colvin e452697088 remove struct contraint on TKey in KeyedMultiSelector, and TableUpdateItemsFilter 2020-06-18 12:50:23 -05:00
John Colvin 1988443497 fix pnl symbol filter (was checking the security.Symbol instead of the 'pnl_symbol') 2020-06-18 12:40:07 -05:00
John Colvin 3f33627f00 add pnl_cpp_tuple extension method bones (taha will implement) 2020-06-18 12:14:44 -05:00
John Colvin 0610612ae6 make PNLData.with a member method instead of extension so it isn't
passed by value (it's a large struct)
2020-06-18 11:35:00 -05:00
John Colvin efcf78bb95 pnl window restores fill/market price decimal format when workspace loaded 2020-06-18 11:28:17 -05:00
John Colvin 03678e79a5 PNLSettings.cs line endings (need to figure out why they keep changing) 2020-06-18 11:00:32 -05:00
Taha Afzal c15a364496 Merge branch 'DJ_ICE_pnl_decimals' into DJ_ICE 2020-06-17 23:50:17 -04:00
Taha Afzal d8ec713dc5 Spreads in PNL show under a different symbol 2020-06-17 23:22:33 -04:00
Taha Afzal daaa7311a0 Merge branch 'DJ_ICE_pnl_symbol' into DJ_ICE_cpp_mult 2020-06-17 22:58:10 -04:00
Taha Afzal f893af1930 Strip Legs are not counted toward futures 2020-06-17 22:57:08 -04:00
Taha Afzal 6ec413c516 Dictinction bw spread legs and strip legs 2020-06-17 15:50:06 -04:00
John Colvin a2a0d88a81 pnl window disposes filters of type IDisposable 2020-06-17 12:39:59 -05:00
John Colvin 7a4dca9589 PNLWindow uses special pnl_symbol (taha will implement pnl_symbol method later, returns regular symbol in meantime) 2020-06-17 12:30:01 -05:00
John Colvin b21cd12cea copy AppendTable extension from another branch 2020-06-17 12:24:58 -05:00
John Colvin ec0b726751 ladder mid tick rounds down for negative numbers (still rounds up for positive) 2020-06-16 16:40:28 -05:00
Pedro Pinto 9ec1c8fdae Merge branch 'master' into spartan_tas 2020-06-16 17:05:11 -04:00
John Colvin a9f2b4ad9a PNL window - setting for market/fill price column decimal places 2020-06-16 15:32:51 -05:00
Taha Afzal 9cb3a21e5a position service exposes both cpp and overridden cpp 2020-06-15 23:05:53 -04:00
Eric Harding 3231ffb343 Meaningless autocert code 2020-06-15 22:48:28 -04:00
Eric Harding 8d7f1738cf update cert secure logon 2020-06-15 22:47:30 -04:00
John Colvin 60d4dd87fd rename ISecurityAlgoProvider.cs -> IAlgoProvider.cs 2020-06-15 17:01:02 -05:00
John Colvin 3a7eeda70e AlgoProvider.subscribe_algos always fires at least once (doesn't depend on studio algos being present) 2020-06-15 17:00:13 -05:00
John Colvin 712146e028 Merge branch 'algo-type-config' into DJ_ICE_algo_config 2020-06-15 16:57:07 -05:00
Eric Harding 9101214e66 Add message logger and revamp replay sequence handling 2020-06-15 14:51:41 -04:00
Taha Afzal f381d536d6 Merge branch 'DJ_ICE' into DJ_ICE_cpp_mult 2020-06-15 09:53:32 -04:00
Pedro Pinto d8d5f3b93c Merge branch 'DJ_ICE' of bitbucket.org:bluetradesys/spark into DJ_ICE 2020-06-15 09:29:08 -04:00
Pedro Pinto 1d4dc47a62 Added missing update to session/high low. 2020-06-15 09:28:23 -04:00
Taha Afzal 482c300b72 Merge branch 'DJ_ICE_space_bar_recenter' into DJ_ICE 2020-06-14 21:08:51 -04:00
Pedro Pinto 59774ccbb5 Updated docker 2020-06-14 15:27:18 -04:00
Pedro Pinto fcb6c9b8d9 Added a few build tools. 2020-06-14 15:27:01 -04:00
Pedro Pinto 69ad995ba9 Updated docker 2020-06-14 15:23:18 -04:00
Pedro Pinto 0b26ec1132 Added a few build tools. 2020-06-14 15:21:55 -04:00
John Colvin 3de494c80f recenter all ladders on spacebar (don't require shift) 2020-06-12 17:05:53 -05:00
Eric Harding c6b2e2f21e OMF setting to true, always 2020-06-12 17:49:37 -04:00
Eric Harding 2eac97c1a9 meaningless cert change 2020-06-12 15:18:20 -04:00
Eric Harding b4b0e10f29 Fix IOC=FAK order type (not FOK) 2020-06-12 15:17:38 -04:00
John Colvin 7deb25dd1c fix ladder recenter on spacebar 2020-06-12 13:16:57 -05:00
Pedro Pinto 7a29ae1a83 Merge branch 'DJ_ICE' of bitbucket.org:bluetradesys/spark into DJ_ICE 2020-06-12 08:44:36 -04:00
Pedro Pinto 6da893128c Cleaned up logging. 2020-06-12 08:44:20 -04:00
Pedro Pinto 2cb458af2d Added OnBehalfofcompid tag to ICE as per cert. 2020-06-12 08:42:40 -04:00
Taha Afzal 04db38d627 Merge branch 'DJ_ICE_release_candidates' into DJ_ICE 2020-06-11 21:22:18 -04:00
John Colvin a144b03361 ladder recenter on spacebar (across thread barrier) 2020-06-11 18:28:37 -05:00
John Colvin 9c89a9a47e TabDocument forwards key press events to IShellWindows 2020-06-11 18:24:26 -05:00
John Colvin 007af71bb2 fix ladder center-on-settle behavior once and for all 2020-06-11 17:09:05 -05:00
John Colvin 7cfe8f4214 add override cpp context menu item in pnl window 2020-06-11 16:33:28 -05:00
John Colvin 24f8e66953 add IPositionModel (has function to override cpp) 2020-06-11 16:30:35 -05:00
John Colvin 90fc6d901f add PropertyEditor control/dialog 2020-06-11 16:29:45 -05:00
Eric Harding 38d9db4a90 Session and sequence number fixes 2020-06-11 11:36:37 -04:00
Taha Afzal a216d1cc81 Fixing sell order check for distance from settlement 2020-06-11 09:19:03 -04:00
Pedro Pinto f8395c11b5 Fixed application, vendor tags for DJ. 2020-06-11 08:26:26 -04:00
John Colvin 2b0e46ed38 fix ladder center around settle behavior 2020-06-11 00:36:11 -05:00
John Colvin 5f3b243265 'max settlement cross ticks limit' ladder setting 2020-06-10 18:16:52 -05:00
John Colvin c9ce2d18bf simplify 'Safety Checks' content alignment in ladder settings dialog 2020-06-10 17:33:13 -05:00
John Colvin 7b563ba66c ladder centers around settlement price if no bid/ask market 2020-06-10 13:17:01 -05:00
Eric Harding 6a679ff78c Fix for cancel/replace 2020-06-10 14:13:28 -04:00
Taha Afzal 3e1be70923 Fix for HHD Balmo spreads 2020-06-10 13:57:19 -04:00
John Colvin aadd7df6c6 quantity divisor is 1 for 'ICE Lots' secs 2020-06-09 22:49:57 -05:00
Eric Harding aba3f21020 stop order does not carry price 2020-06-09 19:18:36 -04:00
John Colvin 8206132a37 quantity conversion in pnl for dj 2020-06-09 17:27:29 -05:00
John Colvin f8b3fd2e14 QuantityConversionData.to/from_display extensions use 'safe_divide' 2020-06-09 17:10:21 -05:00
Eric Harding fede19fd11 stop-limit success 2020-06-09 16:30:00 -04:00
John Colvin 8b17ee72ff quantity conversion in ladder when last size is transposed over volume column 2020-06-09 10:50:06 -05:00
Pedro Pinto 0508858859 Better parser 2020-06-09 10:04:15 -04:00
Eric Harding 3fa8dbf112 Cannot send price with market order 2020-06-08 23:09:10 -04:00
Eric Harding 77ae4703b3 Fix clOrdID and custOrdCapacity 2020-06-08 22:58:53 -04:00
John Colvin 31ed473999 quantity conversion in time and sales for dj 2020-06-08 17:25:13 -05:00
John Colvin 673805a7f4 quantity conversion in fills for dj 2020-06-08 17:10:39 -05:00
John Colvin 91422449e9 quantity conversion in manual fills for dj 2020-06-08 17:02:55 -05:00
John Colvin 438089a1cd quantity conversion in mview for dj 2020-06-08 16:36:57 -05:00
John Colvin 6a186d1d7e MarketViewRow - remove unreferenced fields 2020-06-08 16:33:55 -05:00
John Colvin 9d831a2569 fix line endings in MarketViewVM.cs 2020-06-08 16:33:55 -05:00
John Colvin d47cf1a54e (Dynamic)DoubleDivisorConverter uses safe_divide extension 2020-06-08 16:33:55 -05:00
John Colvin 8c9f669e72 refactor IsRealNonZero to is_real_positive (orig name was a typo), add a few more similar extensions to MathUtils 2020-06-08 16:33:55 -05:00
John Colvin f5bda11797 quantity conversion in orderbook for dj 2020-06-08 12:19:43 -05:00
John Colvin 1841a75fec quantity conversion in ladder/ticket for dj 2020-06-08 12:19:43 -05:00
John Colvin 34cdaeec93 don't use Disposable.replace bc it creates the next disposable before disposing the previous one 2020-06-07 16:01:27 -05:00
Taha Afzal 3230fb9e48 Regular TAS contract's formatting did not have the word TAS in it 2020-06-05 16:42:05 -04:00
Taha Afzal 888b4e22c0 Ignoring strips with > 512 components 2020-06-05 14:11:34 -04:00
Taha Afzal 534ce5a8ec strips are XL too 2020-06-05 13:12:57 -04:00
Taha Afzal c2b9ac57dc Fixing build 2020-06-05 11:55:54 -04:00
Taha Afzal 2783361325 Merge branch 'master' into DJ_ICE 2020-06-05 10:50:42 -04:00
Taha Afzal 46d35131d7 Overridable cpps 2020-06-05 10:01:18 -04:00
Pedro Pinto 3b95154c04 Updated ICE Onixs 2020-06-05 09:11:03 -04:00
Pedro Pinto e840b9617f Tweaked MD to Json parsing. 2020-06-05 08:22:24 -04:00
Pedro Pinto 19ee603413 Merged from master 2020-06-04 13:48:13 -04:00
Pedro Pinto 1a6b918853 Updated docker 2020-06-04 13:43:25 -04:00
Pedro Pinto bc22605a25 Added +x 2020-06-04 13:43:00 -04:00
Pedro Pinto f3d28add1c Added publishing of new routing info when orders are recorevered from disk 2020-06-04 13:41:34 -04:00
Eric Harding a28bfa1175 execution report handling tweaks 2020-06-04 10:05:44 -04:00
Eric Harding 4e4a48283d bool parse_report(string&, SecurityOracle&, ExecutionReport*); 2020-06-03 13:09:56 -04:00
Taha Afzal 63d260a6f8 Security formatting for ICE 2020-06-03 09:42:44 -04:00
Pedro Pinto 7a761d00ce Added security oracle to SessionStore so we can resolve exe reports. 2020-06-03 08:51:31 -04:00
Pedro Pinto 968be6a99a Added storage for sessions. Still missing parsing of exec reports. 2020-06-02 17:13:53 -04:00
Taha Afzal 9b4a63b4a8 Changes to make HNG/HIS/HEN/HHD to work 2020-06-02 11:15:47 -04:00
Pedro Pinto 03404eb3f1 Made some progress in GLBXiLink3ExecutionGateway 2020-06-02 09:16:02 -04:00
Pedro Pinto ff1a970982 Fixed build some more 2020-05-28 14:29:45 -04:00
Pedro Pinto ed890b4d84 Fixed broken tests for subscribe_exe_report change 2020-05-28 13:50:04 -04:00
Pedro Pinto e87003cc41 Merged with master 2020-05-28 12:21:51 -04:00
Eric Harding bc06037843 Fix the build 2020-05-28 12:20:30 -04:00
Pedro Pinto a502c365e5 Build tweaks 2020-05-28 12:15:16 -04:00
Pedro Pinto c4c7cebfc5 Updated externals 2020-05-28 12:12:46 -04:00
Pedro Pinto f18bcd2995 Build tweaks 2020-05-28 12:12:46 -04:00
Pedro Pinto a6a1b6ac53 Fixed clang build. 2020-05-28 12:12:46 -04:00
Pedro Pinto fdacd8b543 Added -f when removing simlinks in build setup. 2020-05-28 12:02:46 -04:00
John Colvin 3d1de9a0c7 nuget_restore.cmd uses externals package source (builds offline) 2020-05-28 12:02:31 -04:00
John Colvin b2b3fa5949 update jenkinsbuild.cmd to use externals nuget source (for windows) 2020-05-28 12:02:17 -04:00
Pedro Pinto 86ecf69820 Updated external subrepos 2020-05-28 11:53:51 -04:00
Eric Harding 8c3da4e43c Re-arrange some methods in ILinkGW.h 2020-05-27 16:51:36 -04:00
Eric Harding 06b955dceb Exchange seq number fix 2020-05-27 11:49:08 -04:00
Eric Harding e75d15146c cme cert test update 2020-05-26 23:55:27 -04:00
Eric Harding cb07384c9f Fix problem with party details 2020-05-26 23:55:13 -04:00
Eric Harding fc9e502539 cert refactor 2020-05-26 12:40:16 -04:00
Eric Harding fcbf3388c0 update ilinkbinaryxml templates 2020-05-26 12:40:04 -04:00
Eric Harding 899bea940f improve ilinkgw logging 2020-05-26 12:39:55 -04:00
Eric Harding 14b7509607 ensure local launch timezone 2020-05-26 12:39:41 -04:00
Pedro Pinto 8f537a8fda Merged in build_improvements (pull request #414)
Build improvements
2020-05-26 16:32:43 +00:00
Pedro Pinto 01b9ff6b47 Dropped celoxica 2020-05-26 12:28:35 -04:00
Pedro Pinto 2609663d3e Updated setup_builds to work even if its run outside the tree. 2020-05-26 12:06:08 -04:00
Eric Harding 25668e8df0 dont' build web client on wsl2 2020-05-26 11:54:19 -04:00
Pedro Pinto fd89241611 Updated externals pointer 2020-05-26 11:49:29 -04:00
John Colvin a69118c5d3 fix line endings in release_notes 2020-05-22 23:42:27 -05:00
John Colvin 5accd0e2b4 Merge branch 'master' into prod 2020-05-22 19:14:16 -05:00
John Colvin df5ad61cd2 release notes for synthetic gui integer tick sizes 2020-05-22 19:12:29 -05:00
John Colvin 4a7674eb29 synthetic gui supports integer tick sizes 2020-05-22 18:15:53 -05:00
Eric Harding 5a458287f4 update license search info in disable_onixs.py 2020-05-22 15:18:46 -04:00
John Colvin 5921f9f6b5 Merge branch 'master' into prod 2020-05-22 12:34:18 -05:00
John Colvin 4c73a63ae8 release notes for bug fix (unsorted custom state grid params in orderbook) 2020-05-22 12:30:53 -05:00
John Colvin 42b1c921a8 OrderBook custom state grid params are sorted alphabetically (again) 2020-05-22 12:24:42 -05:00
Pedro Pinto fab3334b1e Updated release notes 2020-05-22 11:23:03 -04:00
Pedro Pinto 7239dd3ade Merge branch 'master' into prod 2020-05-22 11:20:17 -04:00
John Colvin dd4c8eb649 Merged csharp-api-examples-sln into master 2020-05-22 10:19:13 -05:00
John Colvin 76a29bdc8a client ui supports all integer tick sizes (not just 1) 2020-05-21 15:26:50 -05:00
John Colvin 06d708f3ea new csharp api examples 2020-05-21 15:17:32 -05:00
John Colvin e2f70cbc19 minor config tweaks needed after upgrading VisualStudio 2020-05-21 13:04:00 -05:00
Pedro Pinto 9d54e47a03 Update CMakeDeps 2020-05-19 17:00:24 -04:00
Eric Harding 5345ba8ff8 securities for sending orders ilink3 test 2020-05-19 15:58:56 -05:00
John Colvin faccdf581e Merged in limit-algo-clean-history (pull request #413)
Limit algo clean history
2020-05-19 13:53:07 +00:00
Pedro Pinto 515ed5aabd Merged with master 2020-05-19 07:07:13 -04:00
John Colvin 1a64714a54 always log errors observed in LadderGridHost._volume_from_row (not just when it fails after max_num_tries) 2020-05-18 17:03:39 -05:00
John Colvin 3ba6792a85 wrap LadderGridHost._volume_from_row in try/catch (addresses Pure client crash) 2020-05-18 16:46:23 -05:00
Pedro Pinto c32a7f1d62 Made native orders calculate route when recovered from disk.
This is in response to the Pure debacle of May 17th. CME changed the
MSGW used for certain products. As we only route orders once, when
they are created, any orders that already existed never transitioned
to the new MSGW. This made it so that users could no longer control
these orders. With this change we recalculate routes when the orders
are first loaded from disk. Assuming we have up to date securities,
something that sometimes does not happen unfortunately, this should
result in the order being automatically relocated to its new MSGW. As
a bonus we also get the hability to change MSGW configuration even if
there are working for that MSGW.
2020-05-18 08:59:42 -04:00
Pedro Pinto 12e068a3d1 Refactor of Spartan 2020-05-17 11:16:28 -04:00
John Colvin 10e75f30e6 fix algo params grid enum template for GenericOrderVMs 2020-05-15 13:16:25 -05:00
John Colvin 20eac19c4f GenericOrderVM - normalize white space 2020-05-15 13:16:25 -05:00
John Colvin 8c0765a2c7 fix build 2020-05-15 10:34:59 -05:00
Pedro Pinto 8268599893 TAS does not support GTC orders. 2020-05-15 09:50:38 -04:00
Taha Afzal 7a1f88e813 Merge branch 'limit-algo-clean-history' of bitbucket.org:bluetradesys/spark into limit-algo-clean-history 2020-05-14 22:01:32 -04:00
Taha Afzal 3420f14c8a DeleteAndCover detached hedges by default: 2020-05-14 22:01:22 -04:00
Eric Harding 9bf05973bd Add in/out to logs 2020-05-14 20:51:15 -05:00
John Colvin 86277dfbfe config toggle for new 'specific' CustomOrderDefinition params dialog (disabled by default) 2020-05-14 20:14:51 -05:00
John Colvin 4839e464c6 added dialog to edit CustomOrderDefinition params of a specific algo node 2020-05-14 20:02:14 -05:00
John Colvin dc2ad071a9 GenericOrderHelper should use 'FirstOrDefault' (not 'First') 2020-05-14 19:59:06 -05:00
John Colvin 65e49992f9 LimitCoverAlgo.do_update - remove redundant conversion from DynamicOrderDefinition to LimitCoverDefinition 2020-05-14 17:08:01 -05:00
John Colvin afbb9ae92d LimitCover algo - 'Hedge Ticks' and 'Top Ticks Offset' params actually assigned to DeleteAndCover child 2020-05-14 12:29:29 -05:00
John Colvin ff088142d9 fix custom state output grid 2020-05-14 12:29:29 -05:00
Pedro Pinto 93b7cf346b Added an option for the Cover algo to detach hedges. 2020-05-14 10:20:46 -04:00
Eric Harding f0edeadd50 Make shared mem size configurable 2020-05-13 20:29:38 -05:00
Eric Harding cea4d05bc4 log every msg 2020-05-13 20:19:48 -05:00
Taha Afzal 8ee9b84488 Merge branch 'limit-algo-clean-history' of bitbucket.org:bluetradesys/spark into limit-algo-clean-history 2020-05-13 20:39:13 -04:00
Taha Afzal e3648f5373 Better Logging 2020-05-13 20:39:07 -04:00
John Colvin facd3a9d81 LimitCoverAlgo - remove unnecessary else block in 'do_before_launch' 2020-05-13 17:26:13 -05:00
John Colvin 84969cb481 LimitCoverAlgo - dont update me->child_qty in the child_changed callback, since its async 2020-05-13 17:21:32 -05:00
John Colvin 6d521e77db LimitCoverAlgo - don't override do_launch_attached (it's not supported) 2020-05-13 17:15:30 -05:00
John Colvin 82c49f8f49 remove redundant methods: tick_up/less, payup/less 2020-05-13 17:15:30 -05:00
John Colvin e074309da1 typo broke build (missed constructor in 'TickOffset' -> 'PriceOffset' refactor) 2020-05-13 17:15:30 -05:00
John Colvin 2d622a5f39 LimitCover algo - convert 'ticks_offset' param be in price terms 2020-05-13 16:55:01 -05:00
John Colvin d51d20e84c LimitCover algo - remove cancel_on_blah params, add hedge_ticks 2020-05-13 16:18:46 -05:00
John Colvin 2ccdef9dc5 fix clang build errors 2020-05-13 15:59:45 -05:00
John Colvin 42e62a30bf to_string(OrderError) uses generated protobuf enum Name method 2020-05-13 15:32:27 -05:00
Eric Harding 0b7208784b Can't take the double negatives anymore 2020-05-13 14:01:16 -05:00
John Colvin c233c607fa Formatter.h - pass strings/templated args by const ref instead of value 2020-05-13 13:40:07 -05:00
John Colvin 462cb930f7 dont redefine ChildTemplate 2020-05-13 13:20:55 -05:00
Eric Harding 059ccbdab6 Merge branch 'master' of bitbucket.org:bluetradesys/spark into ilink3_gateway 2020-05-13 11:05:31 -05:00
Pedro Pinto 2c0f920422 Merge branch 'master' of bitbucket.org:bluetradesys/spark 2020-05-13 08:54:14 -04:00
Pedro Pinto 5ee26065ca Updated .gitignore 2020-05-13 08:53:52 -04:00
John Colvin 550a4e8d50 add config toggle to enable/disable LimitCover algo 2020-05-12 19:11:16 -05:00
John Colvin 99b8221efc LimitCoverAlgo unit tests 2020-05-12 19:11:16 -05:00
John Colvin 19e74c30f8 AlgoTestDriverBase - AlgoState << operator 2020-05-12 19:03:53 -05:00
John Colvin 26693a4c98 AlgoTestDriverBase - after_child_changed callback, and find_child method 2020-05-12 19:03:53 -05:00
John Colvin d8bdb69a7c AlgoTestDriverBase - ChildTemplate impl, added OrderDefinition param to child_launching callback 2020-05-12 19:03:53 -05:00
John Colvin 6d357a74e1 AlgoTestDriverBase - expose cancel/cancel_child methods 2020-05-12 19:03:53 -05:00
John Colvin 73f4e4814c LimitCover algo for pure 2020-05-12 19:03:53 -05:00
John Colvin 312bc4be15 add Formatter.h (defines commonly needed << operators for algos, basic string formatting utils) 2020-05-12 18:55:37 -05:00
John Colvin a0c3ba449a add DynamicOrderAdapter (util to keep param proto conversion code out of the algo) 2020-05-12 18:55:37 -05:00
John Colvin d5a2a7f3f0 orderman_utils.h pragma once 2020-05-12 18:55:37 -05:00
John Colvin eda8c94def replicate_to_linux_vm.py - ignore some dirs generated by visual studio 2020-05-12 18:55:37 -05:00
John Colvin 9a8e80e149 add payup/less price calc utils (Security.h)' 2020-05-12 18:55:37 -05:00
John Colvin 6a7e3d739d fix typo 'epislon' -> 'epsilon' 2020-05-12 15:58:00 -05:00
Taha Afzal e6b8274813 DeletAndCoverOrderDefinition does not contain the nested enum anymore 2020-05-12 15:58:00 -05:00
Taha Afzal 9783520c62 DeleteAndCover completed 2020-05-12 15:58:00 -05:00
Taha Afzal 7e7f0bc37f Adding DeleteAndCover proto 2020-05-12 15:58:00 -05:00
Eric Harding 75eaf8c3d4 IL3ExecutionReportParser 2020-05-12 13:54:28 -05:00
John Colvin b9e2ecdffa Merged in transitive-security-compare (pull request #411)
Transitive security compare

Approved-by: Eric Harding
2020-05-11 19:42:50 +00:00
Eric Harding f1c021a474 Merged in security_preload (pull request #412)
Security preload
2020-05-11 19:41:00 +00:00
Eric Harding 6fda54ffa1 Merged master into security_preload 2020-05-11 15:44:50 +00:00
Taha Afzal bdb0adc16c TASCounter test fixed 2020-05-07 13:07:44 -04:00
Eric Harding 4b19b0ea14 update launch.json 2020-05-06 18:26:03 -05:00
Eric Harding fab1b4dd0f Add SecurityPreload key to pre-load securities from the security DB for sunday startup. 2020-05-06 18:25:29 -05:00
John Colvin f3ed3075cf fix Security comparison impl (its transitive now) 2020-05-06 17:35:46 -05:00
John Colvin 742af36b93 Security comparison unit test (addresses bug that caused Krandall OrderBook crash) 2020-05-06 17:35:46 -05:00
John Colvin c573b5fbb2 add ProtoBufCapture extension (writes TableUpdate state to file when subscription is disposed) 2020-05-06 17:30:00 -05:00
Eric Harding 2d6d4af594 add vscode spark local linux debugger settings 2020-05-06 12:27:11 -05:00
Eric Harding 1e8fcd794f Update ExecutionReport::exchange_order_id 2020-05-06 12:22:33 -05:00
John Colvin 2dcfad979c move FileStreamHelper.cs to spark_core 2020-05-06 12:11:03 -05:00
Eric Harding 726329c4bf Add ilink3 execution report parser and order test 2020-05-06 11:56:52 -05:00
Eric Harding 2d01f3f0f4 CME Certification requires very specific UUID generation 2020-05-06 11:56:01 -05:00
Eric Harding 2a595c0fd7 cme cert hard coding 2020-05-06 11:54:32 -05:00
Taha Afzal ba7e35649e Ignore Spread Pos Limits are defaulted to true 2020-05-06 10:36:40 -04:00
Eric Harding 5f9866c9e8 SecurityCache now hands out raw pointers. SecurityOracle now indexes exchange security key 2020-05-05 11:17:16 -05:00
Pedro Pinto 6365378947 Changed TAS order to be GTC rather than DAY (since we logout). 2020-05-05 06:52:11 -04:00
Pedro Pinto cda4a870b7 Merge branch 'master' of bitbucket.org:bluetradesys/spark 2020-05-05 06:14:30 -04:00
Pedro Pinto b3a8564365 Fixed int32 params in DynamicOrders to be int32 rathern than uint32. 2020-05-05 06:13:40 -04:00
Pedro Pinto 1e0114a4cf Treated disconnected orders as working. 2020-05-05 06:13:06 -04:00
Eric Harding 3a6e95ef05 Downgrade security scanner message to info 2020-05-04 16:16:55 -04:00
Eric Harding 78f1cf88e0 cmake needs love too 2020-05-04 11:16:21 -05:00
Eric Harding 4877436877 Ilink3 order unit test 2020-05-04 11:32:30 -04:00
Pedro Pinto 78d238fdfb Ran clang-format on ICEExecutionGateway.cpp 2020-05-04 09:33:40 -04:00
Eric Harding 1b43124756 Add ReentrancyGuard.h 2020-05-02 13:10:49 -04:00
Eric Harding 6875263743 Update 'update' instructions for spark_sdk 2020-05-01 14:17:07 -04:00
Taha Afzal eac828f323 Merge branch 'master' into TASCounter 2020-05-01 13:49:27 -04:00
Taha Afzal 1635d6f649 Added test for TASCounter 2020-05-01 13:48:50 -04:00
Eric Harding a1feb3fddf PrimaryGatewayConnectionEnforcement 2020-05-01 13:22:35 -04:00
Eric Harding 2da535e9ff Update onixs license 2020-05-01 12:51:31 -04:00
Eric Harding 024328bf8b Refactor empty session 2020-05-01 11:44:03 -04:00
Pedro Pinto d90fa1a1e8 Launched regular spark after TAS is concluded. 2020-05-01 07:41:23 -04:00
Taha Afzal a98be44a40 Merge branch 'master' into TASCounter 2020-04-30 13:59:49 -04:00
John Colvin 6210ac2ee6 OrderBook custom state grid only shows data if the selected rows are of the same root/branch 2020-04-29 16:21:17 -05:00
Pedro Pinto 3e817d4fb0 Refactor 2020-04-29 13:16:16 -04:00
Eric Harding 80d7e34bf1 Fixes for updated sbe codegen 2020-04-28 18:16:45 -04:00
Pedro Pinto cfebab0488 Merged in api_improvements (pull request #405)
Api improvements

Approved-by: John Colvin <john.colvin@bluetradesys.com>
2020-04-28 20:06:53 +00:00
Pedro Pinto eacd766359 Updated release notes. 2020-04-28 16:05:21 -04:00
Pedro Pinto 8fb8f8ff58 Merge branch 'master' into api_improvements 2020-04-28 15:58:43 -04:00
Taha Afzal f4b22816a2 Putting config to hide TASCounter 2020-04-27 23:39:41 -04:00
Eric Harding 8ab69c919b Improve cme provided error message 2020-04-27 16:56:32 -04:00
Eric Harding 99531bcfa0 Update ilink3 generated templates 2020-04-27 16:50:54 -04:00
Eric Harding 6bd516d4f2 cleanup 2020-04-27 11:26:42 -04:00
Taha Afzal 1029a464d7 Fixing the bts::timestamp tp protobuf timestamp function (unused, but useful) 2020-04-27 09:57:21 -04:00
Taha Afzal fd8b8e03ea cleanup, comments 2020-04-26 23:10:16 -04:00
Eric Harding 1a1d771e1b addition ilink3 tests 2020-04-25 13:18:58 -04:00
Eric Harding 050fcf7c6e Passing simple log in test 2020-04-24 12:31:30 -04:00
Pedro Pinto 41cf66a943 Added the hability to retrieve all securities in the API. 2020-04-24 08:00:13 -04:00
Pedro Pinto 1c57c9a012 Added position updates in the API. 2020-04-24 07:03:40 -04:00
Taha Afzal 8ccab66120 Merge branch 'add_custom_algo_state_reporting_to_api' into TASCounter 2020-04-23 18:14:28 -04:00
John Colvin e2b2f7ec9c better default widths for custom state grid columns 2020-04-23 16:11:35 -05:00
John Colvin b3c897bf0f custom state grid params are sorted alphabetically 2020-04-23 16:02:38 -05:00
John Colvin 87c9f54c8b custom state grid populates with first child row that has params (if selected row doesn't have any itself) 2020-04-23 15:59:49 -05:00
John Colvin df56b76ab6 OrderBookRowVM - remove dead property 'is_visible' 2020-04-23 15:54:30 -05:00
Taha Afzal 28ff13db11 Merge branch 'add_custom_algo_state_reporting_to_api' into TASCounter 2020-04-23 13:23:30 -04:00
Taha Afzal 2957075769 comments 2020-04-23 13:22:33 -04:00
John Colvin a6477824a8 OrderBookVM - clear the previous 'custom state' params before adding the new ones 2020-04-23 11:16:47 -05:00
Pedro Pinto aa6d453d5b Added spread support to TAS algo. 2020-04-23 07:18:00 -04:00
Pedro Pinto 112c78e50b Moved ouput messages to log. 2020-04-23 06:48:08 -04:00
Taha Afzal 17431f5ac0 Code complete, output is not showing in the UI which is making testing harder 2020-04-23 00:09:23 -04:00
Pedro Pinto 41ec7fb668 Updated linux 2020-04-22 14:13:01 -04:00
Pedro Pinto b19bf2fd26 Added channel handling to TAS. 2020-04-22 14:09:12 -04:00
Pedro Pinto c5f7477521 Fixed bug in admin reafactoring. 2020-04-22 14:05:51 -04:00
Taha Afzal 8708f02fe0 Merge branch 'add_custom_algo_state_reporting_to_api' into TASCounter 2020-04-21 17:44:58 -04:00
Taha Afzal 752fb2bc4a Merge branch 'master' into TASCounter 2020-04-21 17:10:32 -04:00
Taha Afzal 6efb78ecf9 Code complete 2020-04-21 14:26:32 -04:00
John Colvin 75c1970aef remove useless IObservable 'Select' op in 'SubscribeEach' extension 2020-04-20 10:39:31 -05:00
John Colvin c2583518d7 OrderBook was only updating custom state grid when selection changed 2020-04-20 10:37:12 -05:00
Pedro Pinto 14323e7964 Code complete on TAS. 2020-04-20 08:54:24 -04:00
Eric Harding aadeae3201 update cmake, avoid web build on wsl 2020-04-17 22:38:53 -04:00
Eric Harding b72e8aed02 ilink3 test code 2020-04-17 20:30:11 -05:00
Pedro Pinto 39db9b1bd7 Factored storage/retrieval of admin data out of service. 2020-04-17 18:37:05 -04:00
John Colvin 8792871387 add algo custom state grid to orderbook (right panel) 2020-04-17 16:36:05 -05:00
Eric Harding 68a593af7b Add more info to system test 2020-04-17 16:48:10 -04:00
Eric Harding 0820cc3e9a Fix a very subtle bug in serializer 2020-04-17 13:15:12 -05:00
Eric Harding b1ba9a1315 update ilink code gen readme 2020-04-16 14:03:53 -05:00
John Colvin 17c2321a82 Merged in SP-289-naudio-crash (pull request #407)
SP-289 naudio crash

Approved-by: Eric Harding <eric.harding@bluetradesys.com>
2020-04-16 18:11:18 +00:00
John Colvin 0affc8a942 SP-289 naudio crash 2020-04-16 12:07:44 -05:00
John Colvin ce36ea4109 move Delegates.cs to spark_core 2020-04-16 10:47:41 -05:00
Pedro Pinto 991a199d06 TAS utils refactor. 2020-04-14 11:46:53 -04:00
Eric Harding 39ce4323a1 Add CME cert command line tool 2020-04-13 16:18:59 -05:00
Pedro Pinto 7c29a3d1d8 Added custom state reporting to API. 2020-04-13 11:30:32 -04:00
Eric Harding d9fcd290d9 source files don't need to be executable 2020-04-13 09:53:28 -05:00
Taha Afzal 90bc20575a TimeStamps fixed 2020-04-13 08:56:49 -04:00
Pedro Pinto cb268f505a Added settlements to the new algo API. 2020-04-13 08:19:55 -04:00
Pedro Pinto dfd93b836b Updated externals 2020-04-13 07:44:52 -04:00
Pedro Pinto 9d045f65d2 Some progress on TAS. 2020-04-13 07:40:58 -04:00
Eric Harding 05939b02c5 save 2020-04-12 15:11:46 -05:00
Taha Afzal 28e9c66675 Added all the state, order execution remains 2020-04-10 12:54:57 -04:00
Eric Harding aa91638fe4 ilink3 receive buffer handler + tests 2020-04-10 10:55:53 -05:00
Taha Afzal c0520d6a31 Initial Check-in, skeleton code 2020-04-09 09:30:00 -04:00
Pedro Pinto 1c0cd176a1 Moved externals pointer 2020-04-09 08:35:10 -04:00
Pedro Pinto 1018ae387a Added preliminary tas utilities 2020-04-08 15:53:17 -04:00
Eric Harding 065fc54f73 IL3Reactor 2020-04-07 14:05:31 -05:00
Pedro Pinto 1ba6e3280c Updated CMakeDeps 2020-04-06 09:38:19 -04:00
Eric Harding 3a6f50dfea Merge branch 'prod' of bitbucket.org:bluetradesys/spark 2020-04-03 15:40:30 -04:00
Eric Harding d711f99548 fix externals pointer 2020-04-03 15:40:15 -04:00
pfisher 07ace80871 fixed keycode.conf 2020-04-03 13:40:56 -05:00
John Colvin 93c6277bfc Merged prod into master 2020-04-03 13:20:33 -05:00
Jake Norbut 7ac9d05ae2 Merged in manual_fills_permissions (pull request #403)
add permission filter to manual fills

Approved-by: John Colvin <john.colvin@bluetradesys.com>
2020-04-03 18:18:16 +00:00
Eric Harding 95fb13f58b Fix some build issues 2020-04-01 15:21:04 -05:00
Eric Harding 4eb2931cb8 Additional ilink3 refactoring 2020-03-28 21:08:47 -05:00
Eric Harding 5326015a48 Testcase for framer 2020-03-27 13:46:29 -05:00
Eric Harding fcbe319470 Split out functional pieces for easier testing 2020-03-27 09:14:30 -05:00
Eric Harding 5ad21c88b2 Add tests and refactor includes for faster build 2020-03-25 21:15:19 -05:00
Eric Harding 5a4b31ccc0 add cpp sample to service.md api page 2020-03-20 12:10:40 -04:00
John Colvin fb568aab39 SP-288 ladder crash (IndexOutOfRange ex accessing price array) 2020-03-19 15:28:27 -05:00
Eric Harding 64416de10d Fix the braces in my sample. 2020-03-16 20:41:23 -04:00
Eric Harding 46953cb639 add c# market data sample 2020-03-16 20:39:48 -04:00
Eric Harding 7e68a235ee Add securities sub to client_sdk_example 2020-03-16 15:18:39 -04:00
Eric Harding 3a9c1d557b Split Retransmit of old vs new session logic 2020-03-09 16:29:15 -05:00
Jake Norbut 85f2285ac0 add permission filter to manual fills 2020-03-09 09:28:23 -05:00
Eric Harding 70e0979836 override sim port for sdk image 2020-03-06 12:45:09 -05:00
Eric Harding 08bdd9c8c7 Update bad links on api doc site 2020-03-03 17:14:03 -05:00
Kevin Darby 1f80c3366e Merged in master (pull request #401)
Master
2020-03-03 19:16:43 +00:00
Jake Norbut 886b606093 moving endif for release mode 2020-03-02 14:02:55 -06:00
Jake Norbut b70510b614 Merged in SP-69-fix-stop-and-stop-limit-orders (pull request #400)
SP-69 fix stop and stop limit orders

Approved-by: John Colvin <john.colvin@bluetradesys.com>
2020-03-02 19:46:11 +00:00
John Colvin 6db9a227b1 Merged in SP-287-algo-params-piq-update (pull request #399)
SP-287 algo params piq update

Approved-by: Jake Norbut <jake.norbut@bluetradesys.com>
2020-03-02 19:36:24 +00:00
Jake Norbut a819eb921d PR edit; removing unused local variable 2020-03-02 13:07:01 -06:00
Eric Harding 6fb5b83249 Only send Negotiate if the session is new 2020-02-28 15:33:27 -06:00
Eric Harding 95830fafdf send_cancel 2020-02-27 14:48:56 -06:00
Jake Norbut af4317a7f9 Merge branch 'master' of bitbucket.org:bluetradesys/spark into SP-69-fix-stop-and-stop-limit-orders 2020-02-27 14:27:21 -06:00
John Colvin 5edd7d5467 OrderBookRowVM only resets prospective_qty when the real qty changes 2020-02-27 14:07:05 -06:00
John Colvin 60d2cb5bc1 SP-287 fix algo params piq update bug 2020-02-27 14:05:04 -06:00
John Colvin f26e3d27c4 refactor IEnumerable to IReadOnlyCollection in common_value_group_changed event 2020-02-27 14:01:22 -06:00
Eric Harding d68b03bb91 send_cancel_replace 2020-02-26 17:56:50 -06:00
Eric Harding e7062ce01e send_order call for link3 2020-02-26 17:36:18 -06:00
Jake Norbut 31dab6ca09 allow stop/stop limit price to occupy same level as price 2020-02-26 12:10:05 -06:00
Jake Norbut 1498bf17bb when modifying stop-limit stop_price, don't change the price price 2020-02-26 12:09:32 -06:00
Jake Norbut 1cafe23bd0 stop_price and stop_limit_price now reference Pedro's new StopPx field in NativeState 2020-02-25 15:42:33 -06:00
Jake Norbut 25290df798 remove stop* modification logic from badge vm 2020-02-25 15:41:27 -06:00
Jake Norbut 20ca48e365 modification logic of stop* orders is now done centrally in OrdersModel 2020-02-25 15:40:08 -06:00
Pedro Pinto 78dfb03b8e Reported stop px in order state 2020-02-25 14:30:26 -05:00
Kevin Darby 19e66a1c32 add a new stunnel path for Pete 2020-02-25 11:16:40 -05:00
Jake Norbut a1f71153c8 hook OB col filter up to UI price 2020-02-24 14:34:46 -06:00
Jake Norbut b1d260d98c OB RowVM to use ui_price to stop/limit shows expected value in Price column 2020-02-24 14:33:11 -06:00
Jake Norbut a81aafefe0 get_root_at_price to use ui_price so mini ob opens from Ladder 2020-02-24 14:31:43 -06:00
John Colvin 454330e360 fix typo in DiscretePropertyChangedDetector constructor (don't trim the whole array) 2020-02-21 18:51:37 -06:00
John Colvin 995159b365 pnl hyperlinks display hand cursor on hover 2020-02-21 18:49:25 -06:00
John Colvin fd1a33e9d2 PNLView - set Hyperlink/TextCell 'SnapToDevicePixels' to true 2020-02-21 17:39:48 -06:00
John Colvin e9615bc3aa PNLView - get rid of magic const row height 2020-02-21 17:39:35 -06:00
John Colvin b1b1597686 PNLView.xaml - factor out common TextCell props into base style 2020-02-21 17:24:01 -06:00
John Colvin bc2eb65c0a PNLView.xaml - factor out common HyperlinkCell props into base style 2020-02-21 17:22:46 -06:00
John Colvin 7baa7ca8a1 add OrderTicket.close_on_send config toggle 2020-02-21 16:56:30 -06:00
John Colvin 9bbc73b48c fix silent exception in SparkCommandVM.is_selectable 2020-02-21 16:56:30 -06:00
John Colvin b07a379ee1 orderbook LastMessage background always reverts to black on settings saved 2020-02-21 16:56:30 -06:00
John Colvin af2c6174e8 add 'AffectsRender' flag to Hyperlink/TextCell HorizontalContentAlignment dps 2020-02-21 16:56:30 -06:00
John Colvin 6e5444709d fix Hyperlink/TextCell padding (actually use it) 2020-02-21 16:56:30 -06:00
John Colvin 831aa43f0e tweak HyperlinkCell mouse-capture/mouse-over-click-area logic 2020-02-21 16:56:30 -06:00
John Colvin 50a8592e5e clean up DIYGrid TextColumn (mimic recent changes in HyperlinkColumn) 2020-02-21 15:57:25 -06:00
John Colvin cb7b6ef5cd fix TextCell alignment issues 2020-02-21 15:57:07 -06:00
John Colvin b7c72d1607 HighPerformanceRow does not depend on TColumn 2020-02-21 15:56:27 -06:00
John Colvin cb2747528b fix typo in ColumnGeometry (was assigning 'left' to 'unclicpped_left') 2020-02-21 15:50:58 -06:00
John Colvin 52ad4ad2c9 add 'HyperlinkClickMode' to HyperlinkCell to support cmd on click anywhere 2020-02-21 15:50:32 -06:00
John Colvin 93c81089f6 fix HyperlinkCell HorizontalAlignment binding 2020-02-21 15:42:36 -06:00
John Colvin d7d23a7a93 clip mview animations to scroll content presenter bounds 2020-02-21 15:41:14 -06:00
John Colvin 5525e35d1a OrderTypeItem template uses Rectangle instead of Badge (the latter has some unresolved rounding issues) 2020-02-21 15:39:27 -06:00
John Colvin cdd7856ba0 WPFHelper.measure_content() rounds to layout correctly 2020-02-21 14:14:05 -06:00
John Colvin 7a6de46b17 fix WPFHelper.measure_visual_content - 'left edge' calculation for right align; 'bottom edge' for bottom align 2020-02-21 14:13:08 -06:00
John Colvin 1fcccc674a fix HyperlinkCell Alignment issues 2020-02-21 14:11:09 -06:00
John Colvin c0e6b5556d DIYGrid CellRender.draw_text with layout rounding 2020-02-21 14:07:36 -06:00
John Colvin 8aa2a7e44e add spark menu dock/hide commands to pnl 2020-02-21 13:52:14 -06:00
John Colvin 0303d999ed Merged in algo-studio-style-tweaks (pull request #363)
RTM Algo studio style tweaks

Approved-by: Michael Harding <michael.harding@bluetradesys.com>
2020-02-21 19:44:03 +00:00
Pedro Pinto 914a817ddb Fixed crash in handling of stop limit orders 2020-02-21 14:39:18 -05:00
Pedro Pinto 4873e523a9 Re-merged server side stop/stop limit changes 2020-02-21 14:15:56 -05:00
John Colvin 672ef518e2 Merge branch 'SP-279-time-and-sales-column-width' 2020-02-20 12:29:33 -06:00
Pedro Pinto d22cb150f6 Merged 2020-02-20 12:59:51 -05:00
John Colvin 8605b4f11f Merged in SP-281-hidden-toolbar (pull request #393)
SP-281 hidden toolbar

Approved-by: Jake Norbut <jake.norbut@bluetradesys.com>
Approved-by: Kevin Darby <kevin.darby@bluetradesys.com>
2020-02-20 17:18:15 +00:00
John Colvin 20eb661fb0 Merged in SP-282-algo-favorite-params (pull request #396)
SP-282 option for algo favorites button to revert modifications after order entry

Approved-by: Jake Norbut <jake.norbut@bluetradesys.com>
2020-02-20 17:14:31 +00:00
John Colvin fad1ca2b6e Merged in SP-285-pnl-working-orders (pull request #395)
SP-285 pnl working qty should only include exchange orders

Approved-by: Kevin Darby <kevin.darby@bluetradesys.com>
2020-02-20 17:10:58 +00:00
John Colvin 747a687fe5 Merged in SP-278-smaller-ladder-columns (pull request #394)
SP-278 Smaller minimum size for Ladder columns

Approved-by: Jake Norbut <jake.norbut@bluetradesys.com>
Approved-by: Kevin Darby <kevin.darby@bluetradesys.com>
2020-02-20 17:10:18 +00:00
Jake Norbut e34c63382c merging master and fixing merge conflicts in 3 files by taking master 2020-02-20 08:41:02 -06:00
Pedro Pinto 4b5c744ba5 Updated externals, tools 2020-02-20 08:45:07 -05:00
Pedro Pinto 932738f98e Merge branch 'master' into ilink3_gateway 2020-02-20 08:39:47 -05:00
Pedro Pinto 1426b00e83 Added fake iLink3 gateway 2020-02-19 16:21:06 -05:00
Pedro Pinto e724409b58 Added jetfix support for string_view 2020-02-19 10:55:56 -05:00
Pedro Pinto 9cf828e9a4 Implemented iLink3 order 2020-02-18 15:37:06 -05:00
Eric Harding 41408fb609 ILink3ExecutionGateway placeholder 2020-02-14 16:07:44 -06:00
Eric Harding 4c21e32838 ILink3GW core gateway 2020-02-14 16:06:58 -06:00
Eric Harding 385f3ea402 add unix_nano_now() to datetime.h 2020-02-14 16:05:00 -06:00
Eric Harding 8d6d8cab18 Update SecureLogon for ilink3 2020-02-14 16:05:00 -06:00
Eric Harding 01615f824a Generated ilink3 messages 2020-02-14 16:05:00 -06:00
Pedro Pinto c6779ddc90 Reactore GLBX native order for iLink3. 2020-02-13 15:26:33 -05:00
Pedro Pinto 46eff65435 Changed IExecutionGateway to support non FIX gateways. 2020-02-12 10:11:53 -05:00
Eric Harding cb0dfa50b3 Fix dockerfile 2020-02-11 15:02:41 -05:00
Eric Harding 2429e6019c Merge branch 'master' of bitbucket.org:bluetradesys/spark into prod 2020-02-11 14:16:14 -05:00
Eric Harding e0bb48b0c7 Merged in client_sdk (pull request #397)
Client sdk
2020-02-11 18:31:09 +00:00
Eric Harding a38b0dbc79 Merge branch 'master' of bitbucket.org:bluetradesys/spark into client_sdk 2020-02-11 13:29:43 -05:00
Eric Harding 73065ab48a client sdk sample 2020-02-11 13:29:09 -05:00
Eric Harding bd07c96504 Merged in mdsource_crash (pull request #389)
Fix for assert when algo subs to security w/o MD
2020-02-11 17:11:07 +00:00
Eric Harding dc4033875a Fixes from code review feedback 2020-02-11 11:43:04 -05:00
Eric Harding 130794c538 Merge fixup 2020-02-11 11:22:02 -05:00
Eric Harding b1743f0b1c Uninitialized heap, ffs 2020-02-10 18:58:21 -05:00
Eric Harding 33492c9131 Fixes for _WIN32 2020-02-10 18:27:41 -05:00
Eric Harding d434778a82 MarketDataService 2020-02-10 17:06:13 -06:00
Eric Harding 4c6cc9b3e0 Merge branch 'client_sdk' of bitbucket.org:bluetradesys/spark into client_sdk 2020-02-10 12:32:18 -06:00
Eric Harding 6aaeddb7e9 update vscode for linux on linux development 2020-02-10 12:32:10 -06:00
Eric Harding 1685a13994 Add linux on linux build task (vscode) 2020-02-10 13:24:56 -05:00
Eric Harding 54633dd6db note correct config value for local sparkd 2020-02-10 13:21:03 -05:00
Eric Harding 510f163e5b Add to_string methods for Product for new md api 2020-02-10 12:50:05 -05:00
Eric Harding ee4779da73 MarketDataService 2020-02-09 22:39:01 -05:00
Eric Harding 28e98259f6 Add client sdk example 2020-02-07 22:20:42 -05:00
John Colvin 8e6a17cd0c fix sticky algo behavior in LadderVM 2020-02-07 14:18:10 -06:00
John Colvin 17b314ea3a Merge branch 'master' into algo-type-config 2020-02-07 13:35:50 -06:00
John Colvin cbde36e9e0 Merge branch 'master' into algo-studio-style-tweaks 2020-02-07 13:29:50 -06:00
John Colvin 6fc20924bd SP-282 option for algo favorites button to revert modifications after order entry 2020-02-07 13:01:42 -06:00
John Colvin 381b8064fc SP-285 pnl working qty should only include exchange orders 2020-02-07 12:54:32 -06:00
John Colvin fc1a3ff7dc SP-278 Smaller minimum size for Ladder columns 2020-02-06 13:37:31 -06:00
John Colvin 5fd3d13cfe add spark menu dock/hide commands to synthetic management 2020-02-06 12:27:58 -06:00
John Colvin 1b38822459 add spark menu dock/hide commands to orderbook 2020-02-06 12:27:26 -06:00
John Colvin 8b7ecc430b add spark menu dock/hide commands to fills 2020-02-06 12:26:01 -06:00
John Colvin d9d7a08fd6 add spark menu dock/hide commands to time and sales 2020-02-06 12:25:08 -06:00
John Colvin 2383c00bb9 add spark menu dock/hide commands to mview 2020-02-06 12:23:35 -06:00
John Colvin dcce738d53 SP-281 SparkWindow toolbar can be docked to any side of the window, or hidden 2020-02-06 12:22:37 -06:00
John Colvin 0daa3e0685 add 'is_select_changed' event to ISelectable 2020-02-06 10:17:05 -06:00
Eric Harding 82bc402216 Update client examples 2020-02-05 14:58:46 -05:00
Eric Harding ff70e9694b Set spark version from jenkins environment when available 2020-02-05 10:02:17 -05:00
John Colvin e06daa349c normalize white space in SparkMenuItem.cs 2020-02-04 13:11:06 -06:00
Jake Norbut 525d0eda30 fix typo in notes 2020-01-30 07:39:22 -06:00
Jake Norbut e9e85b44c9 updating release notes 2020-01-30 07:37:51 -06:00
John Colvin 13aa693da1 TimeAndSales status bar 2020-01-29 14:12:33 -06:00
John Colvin f8afa7fc57 SP-280 remove Date portion from Time and Sales time column 2020-01-29 14:00:40 -06:00
John Colvin 2f6a66a2ce DIYGrid DragRect/Selection adorners respond to selection highlight property changes 2020-01-29 13:51:42 -06:00
John Colvin b4674a9120 cache sorting criteria to avoid accessing ColumnBase.SortingDirection on another thread when settings are collected 2020-01-29 13:51:42 -06:00
John Colvin d76eb1153b actually assign TimeAndSalesWindow.thread_id 2020-01-29 13:51:42 -06:00
John Colvin 0934c0014d RowSelectionAdorner listens to ItemContainerGenerator changes (invalidates visual) 2020-01-29 13:51:42 -06:00
John Colvin 19da3e1390 added configurable 'pause updates' menu item to TimeAndSales (hidden by default) 2020-01-29 13:51:42 -06:00
John Colvin 2654b2e446 SP-283 Ladder does not display 6c spreads correctly 2020-01-29 12:43:01 -06:00
John Colvin 61d0ae5257 SP-279 Time and Sales not remembering column width 2020-01-29 10:21:16 -06:00
John Colvin ebea6a8f50 move TimeAndSales classes into their own files/namespace 2020-01-27 16:55:51 -06:00
John Colvin f0b3baaf3f remove unused [TimeAndSales] OrderType column enum 2020-01-27 15:29:48 -06:00
John Colvin 956837d3f3 add ShowOrderTicketAutoLookupTag/SparkCommand 2020-01-27 15:15:25 -06:00
Eric Harding be45938b51 Fix for assert when algo subs to security w/o MD 2020-01-22 14:08:26 -05:00
Eric Harding 663f9ecc52 Merge branch 'master' of bitbucket.org:bluetradesys/spark into client_sdk 2020-01-16 17:23:42 -05:00
Eric Harding a6edbbe7b5 Fix spark sdk build 2020-01-14 17:13:07 -05:00
Eric Harding 51276d161c Revert "Add diagnostic logs to SharedMemory open/close"
This reverts commit 3fa699b4c9 because of
log spam
2020-01-13 11:39:51 -05:00
Eric Harding 3fa699b4c9 Add diagnostic logs to SharedMemory open/close 2020-01-13 11:13:15 -05:00
Eric Harding c9396bd6af Stabilize spark_vm_shell.sh ssk keys 2020-01-13 11:13:00 -05:00
Kevin Darby b80f96fa5e Merged in ice_excel (pull request #388)
fix RTD crash for ice

Approved-by: Jake Norbut <jake.norbut@bluetradesys.com>
2020-01-10 22:39:27 +00:00
Kevin Darby b7dea6817c fix RTD crash for ice 2020-01-10 14:43:06 -05:00
Pedro Pinto f4dc550f1a Fixed slowness in FIX log parsing.
This slowness was actually causing us to take too long to complete the
FIX connection logon process, resulting in a timeout and failure to
establish the session. It took almost 1ms per log line, with
logs commonly having 20K lines. k
2020-01-10 08:35:33 -05:00
Pedro Pinto bc978ed065 Merge branch 'master' of bitbucket.org:bluetradesys/spark 2020-01-10 08:30:17 -05:00
Eric Harding 202c5faffd update devcontainer to allow 2g shm 2020-01-09 10:40:47 -05:00
Pedro Pinto 65d55a7618 Added a parser of historical MD to facilitate analysis. 2020-01-02 13:57:54 -05:00
Pedro Pinto 57c3ec34c2 Fixed clang build. 2020-01-02 13:55:49 -05:00
Eric Harding c6cd5fcf93 services.md 2019-12-15 22:09:20 -05:00
Eric Harding 177b96b453 manual updates 2019-12-13 17:46:22 -05:00
Eric Harding 292f66a774 Add package id for nuget 2019-12-13 17:46:03 -05:00
Eric Harding 8c837f9f64 Expound on service fundamentals / ServiceContext 2019-12-03 13:16:41 -05:00
Eric Harding 85f97ae552 Combine rpc/streams into services.md 2019-12-01 21:50:17 -05:00
Eric Harding 7ca0d10eb0 client/overview.md 2019-11-29 11:49:24 -05:00
Eric Harding ca8aed1f2b client pages outline 2019-11-22 18:49:58 -05:00
John Colvin a5f27d0d35 AlgoStudio - fix typos in name/badge header tooltip 2019-11-22 11:28:59 -06:00
John Colvin ce7ff0d14f MDDaemon - check that synthetic metadata.HasStrategy before adding to map 2019-11-22 11:25:38 -06:00
John Colvin d08571e862 Merge remote-tracking branch 'origin/master' into algo-studio-style-tweaks 2019-11-22 11:25:09 -06:00
Eric Harding b32d63fcda Update api site template 2019-11-20 12:39:59 -05:00
Eric Harding 54d9d5e2f3 Add google analytics 2019-11-19 16:38:30 -05:00
John Colvin e713210030 remove obsolete algo types from hardcoded defaults 2019-10-29 18:07:32 -05:00
John Colvin c057bf18f6 Merge remote-tracking branch 'origin/master' into algo-type-config 2019-10-29 18:07:01 -05:00
John Colvin 17a0bef824 Merge remote-tracking branch 'origin/master' into algo-type-config 2019-10-21 12:15:00 -05:00
John Colvin 9180c48b67 CompositeAlgoVM 'group' is AlgoDisplayGroup.Studio 2019-10-14 15:29:02 -05:00
John Colvin 01acbe08f5 remove dead code 2019-10-14 15:26:01 -05:00
John Colvin 8a47cd4821 exchange/security based algo type config 2019-10-14 15:19:36 -05:00
John Colvin 03050d9b07 refactor some Disposable.replace calls so that the prev hook is disposed before the new one is created 2019-10-14 13:25:21 -05:00
John Colvin 9178878880 AlgoStudio model does not really need to import AdminModel (just UserTuple) 2019-10-14 13:25:21 -05:00
John Colvin f38b1c7af9 ContractPickerModel.result getter performs dictionary lookup (was brute force enumeration) 2019-10-14 13:25:21 -05:00
John Colvin 45cd958b1e make security criteria clause immutable 2019-10-14 13:25:21 -05:00
John Colvin 4d49c8f030 add .rej to gitignore 2019-10-14 13:25:21 -05:00
John Colvin b2227ce37b DynamicOrderHelper stores dyn types in map 2019-10-14 13:25:21 -05:00
John Colvin a4694462ed flip combobox gradient back (there was a light/medium typo in resource keys) 2019-10-07 16:52:23 -05:00
John Colvin f404b0e936 center align ratio checkbox in QuantityMeasureControl 2019-10-07 16:10:47 -05:00
John Colvin 2df1e94fb3 algo studio pr feedback; clean up visual states 2019-10-07 16:05:18 -05:00
John Colvin acd0d7c343 remove 'Cannot change...while templates present' tooltip 2019-10-07 15:27:51 -05:00
John Colvin 1e8a7f09dd make generic algo template child order padding consistent 2019-10-07 14:21:24 -05:00
John Colvin b65d50a9c7 AlgoStudio uses Adorner to display name/abbrev. text prompts 2019-10-07 11:03:33 -05:00
John Colvin 909b4b6cfe AlgoStudio - put badge/name/abbrev uis on a single row 2019-10-07 11:03:33 -05:00
John Colvin 2fbc238ecc AlgoDefinitionVM - update 'is_dirty' when algo_root changes 2019-10-07 11:03:33 -05:00
John Colvin 7c73024919 ObservantAsyncCommand can_execute was not actually changing in response to parameter 2019-10-07 11:03:33 -05:00
John Colvin 0d85aa1644 AlgoStudio - remove old/erroneous 'algo templates' code 2019-10-07 11:03:33 -05:00
John Colvin df16acc4af AlgoStudio - better 'Clone' icon 2019-10-07 11:03:28 -05:00
John Colvin 7ad0c23704 AlgoStudioView - reduce save/revert button width to 90 2019-10-07 11:02:38 -05:00
John Colvin e85e0322e3 AlgoStudio uses consistent vertical padding between params; get rid of cartoonish circle in expander button 2019-10-07 11:02:38 -05:00
John Colvin 1a6a31c857 AlgoStudio - (Glbx)Iceberg/Splitter help button margin is consistent with other algos 2019-10-07 11:02:38 -05:00
John Colvin 65b09c6802 [non-functional] white space changes in AlgoContentTemplateSelector.xaml 2019-10-07 11:02:38 -05:00
John Colvin 148dae32d5 AlgoStudio - remove algo name from buttons, dock save/revert on bottom 2019-10-07 11:02:38 -05:00
John Colvin 9c116fa3d6 AlgoStudio - hide vertical scrollbar 2019-10-07 11:02:38 -05:00
Pedro Pinto 2eba014203 Implement server side of stop limit orders. 2019-07-26 17:36:07 -04:00
Pedro Pinto 37d022251e Fixed another bug in stop order handling. 2019-07-11 09:48:09 -04:00
Pedro Pinto 04cc1da4d9 Hopefully fixed stop order updates. 2019-07-10 17:10:35 -04:00
Jake Norbut 56bba90fdb ladder now determines badge price level based on new ui_price() 2019-07-10 13:11:57 -05:00
Jake Norbut a95841b0e9 OB price filter to hook up to new ui_price() rather than price() 2019-07-10 13:10:32 -05:00
Jake Norbut 9c6be9e87c adding new ui_price ext method that takes into account the status of and type of order (for stop and stop limits) 2019-07-10 13:09:45 -05:00
Pedro Pinto 7c830786ef Fixed issue in stop limit trigger detection 2019-07-10 11:05:00 -04:00
Jake Norbut 9eb9047249 shh...adding M4D secret key 2019-07-09 15:04:56 -05:00
Jake Norbut f7847b7767 adding new M4D cert ilink 2019-07-09 14:13:09 -05:00
Pedro Pinto ae720e4966 Merge branch 'master' into SP-69-fix-stop-and-stop-limit-orders 2019-07-09 12:52:49 -04:00
Pedro Pinto 3b77bc99b6 Fixed update of stop orders. 2019-06-27 13:31:05 -04:00
Jake Norbut b69a0c245e Revert "change price() to report stop/limit price when stop/limit has not yet been triggered"
This reverts commit 14bcef4c0e.
2019-06-26 14:49:26 -05:00
Jake Norbut 14bcef4c0e change price() to report stop/limit price when stop/limit has not yet been triggered 2019-06-26 14:45:27 -05:00
Pedro Pinto a23fe74cdc Re-enabled stop orders 2019-06-26 15:38:06 -04:00
Jake Norbut 7b48f71dec adding stop/limit order modification 2019-06-26 13:34:03 -05:00
Jake Norbut c334c1f636 making use of new has been triggered definition when determining where to draw badge 2019-06-26 13:34:03 -05:00
Jake Norbut 8572ff273f adding helper for determining if stop/limit has been triggered 2019-06-26 13:34:03 -05:00
Pedro Pinto e6ddc71c75 Merged with master 2019-06-26 10:43:29 -04:00
Pedro Pinto 81a0f9193d Support for server side stop orders is code complete. 2019-06-21 17:41:02 -04:00
3737 changed files with 843393 additions and 92680 deletions

No files matched your search

+9
View File
@@ -1 +1,10 @@
IndentWidth: 3
BinPackArguments: true
BinPackParameters: false
AlignAfterOpenBracket: AlwaysBreak
AlwaysBreakTemplateDeclarations: true
PenaltyReturnTypeOnItsOwnLine: 140
---
Language: Proto
IndentWidth: 2
AllowShortFunctionsOnASingleLine: None
+12
View File
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-format": {
"version": "5.1.225507",
"commands": [
"dotnet-format"
]
}
}
}
+251
View File
@@ -0,0 +1,251 @@
# Remove the line below if you want to inherit .editorconfig settings from higher directories
root = true
# C# files
[*.cs]
#### Core EditorConfig Options ####
# Indentation and spacing
indent_size = 3
indent_style = space
tab_width = 3
# New line preferences
end_of_line = crlf
insert_final_newline = true
#### .NET Coding Conventions ####
# Organize usings
dotnet_separate_import_directive_groups = true
dotnet_sort_system_directives_first = false
file_header_template = unset
# this. and Me. preferences
dotnet_style_qualification_for_event = false:silent
dotnet_style_qualification_for_field = false:silent
dotnet_style_qualification_for_method = false:silent
dotnet_style_qualification_for_property = false:silent
# Language keywords vs BCL types preferences
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
dotnet_style_predefined_type_for_member_access = true:silent
# Parentheses preferences
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
# Modifier preferences
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
# Expression-level preferences
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_object_initializer = true:suggestion
dotnet_style_operator_placement_when_wrapping = beginning_of_line
dotnet_style_prefer_auto_properties = true:silent
dotnet_style_prefer_compound_assignment = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
dotnet_style_prefer_conditional_expression_over_return = true:silent
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
dotnet_style_prefer_simplified_interpolation = true:suggestion
# Field preferences
dotnet_style_readonly_field = true:suggestion
# Parameter preferences
dotnet_code_quality_unused_parameters = all:suggestion
# Suppression preferences
dotnet_remove_unnecessary_suppression_exclusions = none
#### C# Coding Conventions ####
# var preferences
csharp_style_var_elsewhere = false:silent
csharp_style_var_for_built_in_types = false:silent
csharp_style_var_when_type_is_apparent = false:silent
# Expression-bodied members
csharp_style_expression_bodied_accessors = true:silent
csharp_style_expression_bodied_constructors = false:silent
csharp_style_expression_bodied_indexers = true:silent
csharp_style_expression_bodied_lambdas = true:silent
csharp_style_expression_bodied_local_functions = false:silent
csharp_style_expression_bodied_methods = false:silent
csharp_style_expression_bodied_operators = false:silent
csharp_style_expression_bodied_properties = true:silent
# Pattern matching preferences
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_prefer_not_pattern = true:suggestion
csharp_style_prefer_pattern_matching = true:silent
csharp_style_prefer_switch_expression = true:suggestion
# Null-checking preferences
csharp_style_conditional_delegate_call = true:suggestion
# Modifier preferences
csharp_prefer_static_local_function = true:suggestion
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:silent
# Code-block preferences
csharp_prefer_braces = true:silent
csharp_prefer_simple_using_statement = true:suggestion
# Expression-level preferences
csharp_prefer_simple_default_expression = true:suggestion
csharp_style_deconstructed_variable_declaration = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion
csharp_style_pattern_local_over_anonymous_function = true:suggestion
csharp_style_prefer_index_operator = true:suggestion
csharp_style_prefer_range_operator = true:suggestion
csharp_style_throw_expression = true:suggestion
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
csharp_style_unused_value_expression_statement_preference = discard_variable:silent
# 'using' directive preferences
csharp_using_directive_placement = inside_namespace:silent
#### C# Formatting Rules ####
# New line preferences
csharp_new_line_before_catch = false
csharp_new_line_before_else = false
csharp_new_line_before_finally = false
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_open_brace = none
csharp_new_line_between_query_expression_clauses = true
# Indentation preferences
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
csharp_indent_case_contents_when_block = true
csharp_indent_labels = one_less_than_current
csharp_indent_switch_labels = true
# Space preferences
csharp_space_after_cast = false
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_comma = true
csharp_space_after_dot = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_after_semicolon_in_for_statement = true
csharp_space_around_binary_operators = before_and_after
csharp_space_around_declaration_statements = false
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_before_comma = false
csharp_space_before_dot = false
csharp_space_before_open_square_brackets = false
csharp_space_before_semicolon_in_for_statement = false
csharp_space_between_empty_square_brackets = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_between_square_brackets = false
# Wrapping preferences
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = true
#### Naming styles ####
# Naming rules
dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
# Symbol specifications
dotnet_naming_symbols.interface.applicable_kinds = interface
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.interface.required_modifiers =
# user types
dotnet_naming_symbols.user_types.applicable_kinds = class, struct, interface, enum
dotnet_naming_symbols.user_types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.user_types.required_modifiers =
# non_field_members
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.non_field_members.required_modifiers =
# public symbols
dotnet_naming_symbols.public_symbols.applicable_kinds = property,method,field,event,delegate
dotnet_naming_symbols.public_symbols.applicable_accessibilities = public,internal
# parameters
dotnet_naming_symbols.parameters.applicable_kinds = parameter
dotnet_naming_symbols.parameters.applicable_accessibilities = public,internal,protected,private,protected_internal,private_internal
# private symbols
dotnet_naming_symbols.private_symbols.applicable_kinds = property,method,field,event,delegate
dotnet_naming_symbols.private_symbols.applicable_accessibilities = protected,private
# Naming styles
dotnet_naming_style.snake_case.required_prefix =
dotnet_naming_style.snake_case.required_suffix =
dotnet_naming_style.snake_case.word_separator = _
dotnet_naming_style.snake_case.capitalization = all_lower
dotnet_naming_style.private_snake_case.required_prefix = _
dotnet_naming_style.private_snake_case.required_suffix =
dotnet_naming_style.private_snake_case.word_separator = _
dotnet_naming_style.private_snake_case.capitalization = all_lower
dotnet_naming_style.user_types.required_prefix =
dotnet_naming_style.user_types.required_suffix =
dotnet_naming_style.user_types.word_separator =
dotnet_naming_style.user_types.capitalization = pascal_case
dotnet_naming_style.interface.required_prefix = I
dotnet_naming_style.interface.required_suffix =
dotnet_naming_style.interface.word_separator =
dotnet_naming_style.interface.capitalization = pascal_case
# rules
dotnet_naming_rule.user_types.symbols = user_types
dotnet_naming_rule.user_types.style = user_types
dotnet_naming_rule.user_types.severity = suggestion
dotnet_naming_rule.interfaces.symbols = interface
dotnet_naming_rule.interfaces.style = interface_style
dotnet_naming_rule.interfaces.severity = suggestion
dotnet_naming_rule.public_members_snake_case.symbols = public_symbols
dotnet_naming_rule.public_members_snake_case.style = snake_case
dotnet_naming_rule.public_members_snake_case.severity = suggestion
dotnet_naming_rule.private_members_snake_case.symbols = private_symbols
dotnet_naming_rule.private_members_snake_case.style = private_snake_case
dotnet_naming_rule.private_members_snake_case.severity = suggestion
dotnet_naming_rule.parameters.symbols = parameters
dotnet_naming_rule.parameters.style = snake_case
dotnet_naming_rule.parameters.severity = suggestion
+19 -2
View File
@@ -1,11 +1,13 @@
nohup.out
build/
.build_proxy/
cmake-build-debug/
.cache/
.ipynb_checkpoints/
.idea/
.dir-locals.el
*.pyc
.vscode/*
!.vscode/*.json
**.vscode
.vs
obj/
*.csproj.user
@@ -17,10 +19,13 @@ vcxproj.user
src/client/spark/Properties/launchSettings.json
compile_commands.json
.cquery_cached_index/
.cache/*
.clangd/*
src/client/sparkcmd/Properties/launchSettings.json
node_modules
paket-files
project.lock.json
src/.clang-format
src/server/sparkd/orderman/perf_analysis/data
src/server/sparkd/orderman/perf_analysis/logs/
src/server/sparkd/orderman/perf_analysis/trace_data/
@@ -34,3 +39,15 @@ trace_data/
/doc/user/public/*
.ionide/*
/.ignore
*.rej
/build
/build.*/*
.clangd/
*CMakeDeps.cmake
/sniper.ipynb
/src/.clang-format
/src/server/sparkd/cmds/spartan/analysis/.ipynb_checkpoints
/src/server/sparkd/cmds/spartan/analysis/data
*.tmp/*
/.venv*/*
.cache/
+3
View File
@@ -7,3 +7,6 @@
[submodule "docker/windows"]
path = docker/windows
url = git@bitbucket.org:bluetradesys/windows_docker.git
[submodule "src/deribit-crypto-connector-demo-application"]
path = src/deribit-crypto-connector-demo-application
url = git@gitlab.com:cryptoexchanges1/deribit-crypto-connector-demo-application.git
+68 -39
View File
@@ -1,65 +1,94 @@
cmake_minimum_required(VERSION 3.5)
project(spark)
if (WIN32)
set (platform "windows")
else ()
set (platform "linux")
endif ()
if(WIN32)
set(platform "windows")
else()
set(platform "linux")
endif()
set (EXTERNALS_ROOT "${CMAKE_SOURCE_DIR}/externals/${platform}")
set (SPARK_PYTHON "${EXTERNALS_ROOT}/python")
set (SPARK_BIN "${EXTERNALS_ROOT}/bin")
set (SPARK_INCLUDE "${EXTERNALS_ROOT}/include")
set (SPARK_LIB "${EXTERNALS_ROOT}/lib/${CMAKE_BUILD_TYPE}")
set(EXTERNALS_ROOT "${CMAKE_SOURCE_DIR}/externals/${platform}")
set(SPARK_PYTHON "${EXTERNALS_ROOT}/python")
set(SPARK_BIN "${EXTERNALS_ROOT}/bin")
set(SPARK_INCLUDE "${EXTERNALS_ROOT}/include")
set(SPARK_LIB "${EXTERNALS_ROOT}/lib/${CMAKE_BUILD_TYPE}")
set(BUILD_SDK OFF CACHE BOOL "Build the sdk")
include_directories (BEFORE SYSTEM ${SPARK_INCLUDE} ${EXTERNALS_ROOT}/include/zlib)
link_directories (${SPARK_LIB})
include_directories(BEFORE SYSTEM ${SPARK_INCLUDE} ${EXTERNALS_ROOT}/include/zlib)
link_directories(${SPARK_LIB})
if (WIN32)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
/MP \
/WX /wd4251 /wd4250 /wd4251 /wd4244 /wd4267 /wd4355 /wd4275 /wd4345 \
/DCURL_STATICLIB \
/D_WINSOCK_DEPRECATED_NO_WARNINGS \
/D__TBB_NO_IMPLICIT_LINKAGE \
/DBOOST_ALL_NO_LIB \
/D_SCL_SECURE_NO_WARNINGS /D_CRT_SECURE_NO_WARNINGS /D_WIN32_WINNT=0x0600")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_DEBUG} /MT")
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF /LTCG")
if(WIN32)
# flags
set(
CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} \
/MP \
/WX /wd4251 /wd4250 /wd4251 /wd4244 /wd4267 /wd4355 /wd4275 /wd4345 \
/bigobj \
/DCURL_STATICLIB \
/D_WINSOCK_DEPRECATED_NO_WARNINGS \
/D__TBB_NO_IMPLICIT_LINKAGE \
/DBOOST_ALL_NO_LIB \
/std:c++17 \
/D_SCL_SECURE_NO_WARNINGS /D_CRT_SECURE_NO_WARNINGS /D_WIN32_WINNT=0x0600")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_DEBUG} /MT")
set(
CMAKE_SHARED_LINKER_FLAGS_RELEASE
"${CMAKE_SHARED_LINKER_FLAGS_RELEASE} \
/DEBUG \
/OPT:REF \
/OPT:ICF \
/LTCG")
# subdirs
add_subdirectory(src/lib)
else ()
# so that sparkd looks for libspark.so in its directory
set (CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
set (CMAKE_INSTALL_RPATH ".")
else()
# make sparkd look for libspark.so in its directory
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
set(CMAKE_INSTALL_RPATH ".")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} \
-fPIC -Wall -pedantic -Wextra -Werror \
-Wno-missing-braces -Wno-ignored-qualifiers \
--std=c++17 -fdiagnostics-color")
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -DNDEBUG -O3")
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wno-undef")
# flags
set(
CMAKE_CXX_FLAGS_DEBUG
"${CMAKE_CXX_FLAGS_DEBUG} \
-fPIC \
-Wall \
-pedantic \
-Wextra \
-Werror \
-Wno-missing-braces \
-Wno-ignored-qualifiers \
--std=c++17 -fdiagnostics-color")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -DNDEBUG -O3")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wno-undef")
# subdirs
add_subdirectory(src/server/sparkd)
add_subdirectory(src/lib)
add_subdirectory(src/web)
add_subdirectory(doc/user)
add_subdirectory(src/sdk)
if(BUILD_SDK)
add_subdirectory(src/sdk)
endif()
add_subdirectory(src/data_files)
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/server
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/server
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/server
COMMAND ln ARGS -sf ${CMAKE_BINARY_DIR}/src/server/sparkd/sparkd ${CMAKE_BINARY_DIR}/server
COMMAND ln ARGS -sf ${CMAKE_BINARY_DIR}/web ${CMAKE_BINARY_DIR}/server
COMMAND ln ARGS -sf ${CMAKE_BINARY_DIR}/data_files ${CMAKE_BINARY_DIR}/server
COMMAND ln ARGS -sf ${CMAKE_BINARY_DIR}/src/lib/libspark.so ${CMAKE_BINARY_DIR}/server
COMMAND ln ARGS -sf ${EXTERNALS_ROOT}/lib/Release/libOnixS.IceImpactMulticastPriceFeedHandlerCpp.so.3.13.0.0 ${CMAKE_BINARY_DIR}/server
COMMAND
ln ARGS -sf
${EXTERNALS_ROOT}/lib/Release/libOnixS.IceImpactMulticastPriceFeedHandlerCpp.so.3.16.0.0
${CMAKE_BINARY_DIR}/server
COMMAND ln ARGS -sf ${EXTERNALS_ROOT}/lib/Release/libACE-5.7.5.so ${CMAKE_BINARY_DIR}/server
COMMAND mkdir ARGS -p ${CMAKE_BINARY_DIR}/server/plugins
COMMENT "Creating server runtime layout"
DEPENDS sparkd data_files_dir)
DEPENDS sparkd data_files_dir)
add_custom_target(server_layout ALL DEPENDS ${CMAKE_BINARY_DIR}/server)
endif()
+25
View File
@@ -0,0 +1,25 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.2.32630.192
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpreaderFrontEnd", "SpreaderFrontEnd\SpreaderFrontEnd.csproj", "{28EE9ABE-BBA6-4587-8BEB-3B0CD979ED22}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{28EE9ABE-BBA6-4587-8BEB-3B0CD979ED22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{28EE9ABE-BBA6-4587-8BEB-3B0CD979ED22}.Debug|Any CPU.Build.0 = Debug|Any CPU
{28EE9ABE-BBA6-4587-8BEB-3B0CD979ED22}.Release|Any CPU.ActiveCfg = Release|Any CPU
{28EE9ABE-BBA6-4587-8BEB-3B0CD979ED22}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3E2EF0DA-32BB-4A7A-9089-B132E1677AA7}
EndGlobalSection
EndGlobal
@@ -0,0 +1,36 @@
using System;
using System.Linq;
namespace SpreaderFrontEnd {
public class Book : IEquatable<Book> {
public Book(BookSide bids = null, BookSide asks = null) {
this.bids = bids ?? new BookSide();
this.asks = asks ?? new BookSide();
}
public BookSide bids { get; }
public BookSide asks { get; }
public Book Clone() {
return new Book(
new BookSide(bids.levels.ToList()),
new BookSide(asks.levels.ToList()));
}
public bool Equals(Book other) {
return other != null && other.bids.Equals(bids) && other.asks.Equals(asks);
}
public override bool Equals(object obj) {
return Equals(obj as Book);
}
public override int GetHashCode() {
return HashCodeHelper.combine(bids.GetHashCode(), asks.GetHashCode());
}
public override string ToString() {
return $"bid: {bids} | ask: {asks}";
}
}
}
@@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace SpreaderFrontEnd {
public class BookSide : IEquatable<BookSide> {
public BookSide() {
levels = new List<PriceLevel>();
}
public BookSide(IEnumerable<PriceLevel> levels) {
this.levels = levels?.ToList() ?? new List<PriceLevel>();
}
public IList<PriceLevel> levels { get; }
public BookSide Clone() {
return new BookSide(levels.ToList());
}
public bool Equals(BookSide other) {
return other != null && levels.SequenceEqual(other.levels);
}
public override bool Equals(object obj) {
return Equals(obj as BookSide);
}
public override int GetHashCode() {
return levels.Select(l => l.GetHashCode()).Skip(1).Aggregate(
levels[0].GetHashCode(), HashCodeHelper.combine);
}
public override string ToString() {
return string.Join("; ", levels);
}
}
}
@@ -0,0 +1,120 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
namespace SpreaderFrontEnd {
public class LegCursor {
public LegCursor(int leg_size, IList<PriceLevel> levels) {
this.leg_size = leg_size;
this.levels = levels;
}
/// <summary>
/// The [signed] quantity of this leg in the SpreaderContract to which it belongs
/// </summary>
public int leg_size { get; }
/// <summary>
/// The [unsigned] quantity of this leg in the SpreaderContract to which it belongs
/// </summary>
public int leg_size_abs {
get {
return Math.Abs(leg_size);
}
}
/// <summary>
/// The price levels of the underlying BookSide
/// </summary>
public IList<PriceLevel> levels { get; }
/// <summary>
/// The index of the current level. When <see cref="consume_unit_qty(uint, out List{PriceLevel})"/>
/// is called, quantity consumption begins at this level. Once this level's quantity is fully
/// consumed, <see cref="cursor"/> is incremented, and <see cref="curr_level_consumed_qty"/>
/// is reset to 0.
/// </summary>
public int cursor { get; private set; }
/// <summary>
/// The quantity that has been consumed at the current level (i.e., the level at index
/// <see cref="cursor"/>)
/// </summary>
public uint curr_level_consumed_qty { get; private set; }
/// <summary>
/// Consumes the specified quantity of units at the best available price(s)
/// </summary>
/// <param name="unit_qty">
/// The unit quantity to consume
/// </param>
/// <returns>True if the entire quantity is consumed, otherwise false.</returns>
public bool consume_unit_qty(uint unit_qty, out List<PriceLevel> consumed_levels) {
consumed_levels = new List<PriceLevel>();
uint marg_qty = (uint)(unit_qty * leg_size_abs);
var consumed_qty = _consume_raw_qty(marg_qty, ref consumed_levels);
Debug.Assert(consumed_qty % leg_size_abs == 0);
uint consumed_units = (uint)(consumed_qty / leg_size_abs);
return consumed_units == unit_qty;
}
/// <summary>
/// Gets the number of units (raw_quantity / leg_size_abs) available at the best price
/// </summary>
public PriceLevel curr_synth_level() {
if (cursor >= levels.Count) {
return PriceLevel.empty;
}
var curr_level = levels[cursor];
Debug.Assert(curr_level.qty >= curr_level_consumed_qty);
var curr_level_rem_qty = curr_level.qty - curr_level_consumed_qty;
if (curr_level_rem_qty >= leg_size_abs) {
return new PriceLevel(
price: curr_level.price * leg_size_abs,
qty: (uint)(curr_level_rem_qty / leg_size_abs));
}
double unit_cost = curr_level.price * curr_level_rem_qty;
var unit_rem = leg_size_abs - curr_level_rem_qty;
for (int i = cursor + 1; i < levels.Count; i++) {
curr_level = levels[i];
if (curr_level.qty >= unit_rem) {
unit_cost += curr_level.price * unit_rem;
return new PriceLevel(price: unit_cost, qty: 1);
}
unit_cost += curr_level.price * curr_level.qty;
unit_rem -= curr_level.qty;
}
return PriceLevel.empty;
}
/// <summary>
/// Consumes as much of the specified [raw] quantity as possible
/// </summary>
/// <returns>
/// The quantity that was actually consumed
/// </returns>
uint _consume_raw_qty(uint raw_qty, ref List<PriceLevel> dest) {
if (levels == null || cursor >= levels.Count) {
return 0;
}
var curr_level = levels[cursor];
// Cursor should be incremented when curr_level_consumed_qty == levels[cursor].qty
// (i.e., curr_level.qty should never be less than curr_level_consumed_qty)
Debug.Assert(curr_level.qty > curr_level_consumed_qty);
var curr_level_qty_rem = curr_level.qty - curr_level_consumed_qty;
if (curr_level_qty_rem > raw_qty) {
curr_level_consumed_qty += raw_qty;
dest.Add(new PriceLevel(price: curr_level.price, qty: raw_qty));
return raw_qty;
}
// The input qty is greater than the qty that remains at this level. Consume the rest on
// the next level.
cursor++;
curr_level_consumed_qty = 0;
dest.Add(new PriceLevel(price: curr_level.price, qty: curr_level_qty_rem));
return curr_level_qty_rem + _consume_raw_qty(raw_qty - curr_level_qty_rem, ref dest);
}
}
}
@@ -0,0 +1,44 @@
using System;
namespace SpreaderFrontEnd {
public struct PriceLevel : IEquatable<PriceLevel> {
public PriceLevel(double price, uint qty) {
this.price = price;
this.qty = qty;
}
public static PriceLevel empty {
get {
return new PriceLevel(double.NaN, 0);
}
}
public double price { get; }
public uint qty { get; }
public PriceLevel subtract_qty(uint value) {
System.Diagnostics.Debug.Assert(value <= qty);
return new PriceLevel(price, qty - value);
}
public PriceLevel add_qty(uint value) {
return new PriceLevel(price, qty + value);
}
public override string ToString() {
return $"{price} ({qty})";
}
public bool Equals(PriceLevel other) {
return qty == other.qty && price.Equals(other.price);
}
public override bool Equals(object obj) {
return obj is PriceLevel other && Equals(other);
}
public override int GetHashCode() {
return HashCodeHelper.combine(price.GetHashCode(), qty.GetHashCode());
}
}
}
@@ -0,0 +1,49 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Diagnostics;
namespace SpreaderFrontEnd {
public static class SpreaderBookCalculator {
public static Book compute_spreader_book(
SpreaderContract contract, IEnumerable<Book> leg_books) {
if (contract == null) {
throw new ArgumentNullException(nameof(contract));
}
if (leg_books == null) {
throw new ArgumentNullException(nameof(leg_books));
}
var leg_book_list = leg_books as IList<Book> ?? leg_books.ToList();
var synth_book = new SyntheticBook(contract, leg_book_list);
return synth_book.to_book();
}
public static BookSide compute_spreader_book_side(
SpreaderContract contract, IList<Book> leg_books, bool is_bid) {
Debug.Assert(contract.spread_legs.Count == leg_books.Count);
var leg_cursors = leg_books.Select((b, i) => new LegCursor(
contract.spread_legs[i].qty,
contract.spread_legs[i].qty < 0 == is_bid ? b.asks.levels : b.bids.levels)).ToList();
var level_qty = leg_cursors.Select(lc => lc.curr_synth_level().qty).Min();
var result = new BookSide();
while (level_qty > 0) {
double level_price = 0;
for (int i = 0; i < leg_cursors.Count; i++) {
var lc = leg_cursors[i];
bool did_consume = lc.consume_unit_qty(level_qty, out var consumed_levels);
Debug.Assert(did_consume);
var leg_cost = consumed_levels.Select(l => l.price * l.qty).Sum() / level_qty;
if (lc.leg_size < 0) {
level_price -= leg_cost;
} else {
level_price += leg_cost;
}
}
result.levels.Add(new PriceLevel(price: level_price, qty: level_qty));
level_qty = leg_cursors.Select(lc => lc.curr_synth_level().qty).Min();
}
return result;
}
}
}
@@ -0,0 +1,17 @@
using System.Collections.Generic;
namespace SpreaderFrontEnd {
class SyntheticBook {
public SyntheticBook(SpreaderContract contract, IList<Book> leg_books) {
bids = new SyntheticBookSide(contract, leg_books, true);
asks = new SyntheticBookSide(contract, leg_books, false);
}
public SyntheticBookSide bids { get; }
public SyntheticBookSide asks { get; }
public Book to_book() {
return new Book(bids: bids.to_book_side(), asks: asks.to_book_side());
}
}
}
@@ -0,0 +1,28 @@
using System.Collections;
using System.Collections.Generic;
namespace SpreaderFrontEnd {
class SyntheticBookSide : IEnumerable<PriceLevel> {
readonly SpreaderContract _contract;
readonly IList<Book> _leg_books;
readonly bool _is_bid;
public SyntheticBookSide(SpreaderContract contract, IList<Book> leg_books, bool is_bid) {
_contract = contract;
_leg_books = leg_books;
_is_bid = is_bid;
}
public BookSide to_book_side() {
return new BookSide(this);
}
public IEnumerator<PriceLevel> GetEnumerator() {
return new SyntheticBookSideEnumerator(_contract, _leg_books, _is_bid);
}
IEnumerator IEnumerable.GetEnumerator() {
return GetEnumerator();
}
}
}
@@ -0,0 +1,59 @@
using System.Collections.Generic;
using System.Linq;
using System.Diagnostics;
using System.Collections;
namespace SpreaderFrontEnd {
class SyntheticBookSideEnumerator : IEnumerator<PriceLevel> {
readonly List<LegCursor> _leg_cursors;
PriceLevel _current;
uint _level_qty;
public SyntheticBookSideEnumerator(
SpreaderContract contract, IList<Book> leg_books, bool is_bid) {
Debug.Assert(contract.spread_legs.Count == leg_books.Count);
_leg_cursors = new List<LegCursor>(leg_books.Count);
for (int i = 0; i < leg_books.Count; i++) {
_leg_cursors.Add(new LegCursor(
contract.spread_legs[i].qty,
contract.spread_legs[i].qty < 0 == is_bid ?
leg_books[i].asks.levels : leg_books[i].bids.levels));
}
}
public PriceLevel Current => _current;
object IEnumerator.Current => _current;
public void Dispose() { }
public bool MoveNext() {
_level_qty = _leg_cursors.Select(lc => lc.curr_synth_level().qty).Min();
if (_level_qty == 0) {
return false;
}
double level_price = 0;
for (int i = 0; i < _leg_cursors.Count; i++) {
var lc = _leg_cursors[i];
bool did_consume = lc.consume_unit_qty(_level_qty, out var consumed_levels);
Debug.Assert(did_consume);
var leg_cost = consumed_levels.Select(l => l.price * l.qty).Sum() / _level_qty;
if (lc.leg_size < 0) {
level_price -= leg_cost;
} else {
level_price += leg_cost;
}
}
_current = new PriceLevel(price: level_price, qty: _level_qty);
return true;
}
public void Reset() {
for (int i = 0; i < _leg_cursors.Count; i++) {
var lc = _leg_cursors[i];
_leg_cursors[i] = new LegCursor(lc.leg_size, lc.levels);
}
}
}
}
@@ -0,0 +1,8 @@
namespace SpreaderFrontEnd {
static class HashCodeHelper {
// Copied from https://referencesource.microsoft.com/#System.Numerics/System/Numerics/HashCodeHelper.cs
public static int combine(int h1, int h2) {
return (((h1 << 5) + h1) ^ h2);
}
}
}
+744
View File
@@ -0,0 +1,744 @@
using System.Windows.Forms;
namespace SpreaderFrontEnd
{
partial class LegControl
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this._combobox_security = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this._textbox_quote_qho_length = new System.Windows.Forms.TextBox();
this._textbox_quote_insidemarketdistance_towarddistance = new System.Windows.Forms.TextBox();
this._textbox_quote_conditional_ticks = new System.Windows.Forms.TextBox();
this._textbox_quote_throttle_outsideticks = new System.Windows.Forms.TextBox();
this._textbox_quote_throttle_insideticks = new System.Windows.Forms.TextBox();
this._textbox_quote_showqty_qty = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
this._checkbox_quote_insidemarketdistance = new System.Windows.Forms.CheckBox();
this.label10 = new System.Windows.Forms.Label();
this._checkbox_quote_conditional = new System.Windows.Forms.CheckBox();
this.label9 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this._checkbox_quote_throttle = new System.Windows.Forms.CheckBox();
this.label7 = new System.Windows.Forms.Label();
this._checkbox_quote_showqty = new System.Windows.Forms.CheckBox();
this.label6 = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this._textbox_prehedge_payless_paylessticks = new System.Windows.Forms.TextBox();
this._textbox_prehedge_payup_payupticks = new System.Windows.Forms.TextBox();
this._textbox_prehedge_payup_threshold = new System.Windows.Forms.TextBox();
this._textbox_prehedge_payless_threshold = new System.Windows.Forms.TextBox();
this.label13 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this._checkbox_prehedge_payup = new System.Windows.Forms.CheckBox();
this.label16 = new System.Windows.Forms.Label();
this._checkbox_prehedge_payless = new System.Windows.Forms.CheckBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this._textbox_posthedge_sizebasedcross_crossticks = new System.Windows.Forms.TextBox();
this._textbox_posthedge_sizebasedcross_threshold = new System.Windows.Forms.TextBox();
this._textbox_posthedge_timesbasedcross_crossticks = new System.Windows.Forms.TextBox();
this._textbox_posthedge_timesbasedcross_timems = new System.Windows.Forms.TextBox();
this._textbox_posthedge_ticksawaycross_crossticks = new System.Windows.Forms.TextBox();
this._textbox_posthedge_ticksawaycross_threshold = new System.Windows.Forms.TextBox();
this.label20 = new System.Windows.Forms.Label();
this.label21 = new System.Windows.Forms.Label();
this._checkbox_posthedge_sizebasedcross = new System.Windows.Forms.CheckBox();
this.label12 = new System.Windows.Forms.Label();
this.label17 = new System.Windows.Forms.Label();
this.label18 = new System.Windows.Forms.Label();
this._checkbox_posthedge_timebasedcross = new System.Windows.Forms.CheckBox();
this.label19 = new System.Windows.Forms.Label();
this._checkbox_posthedge_ticksawaycross = new System.Windows.Forms.CheckBox();
this._textbox_leg_qty = new System.Windows.Forms.TextBox();
this._checkbox_leg_enablequoting = new System.Windows.Forms.CheckBox();
this._textbox_leg_leanqtyfactor = new System.Windows.Forms.TextBox();
this._combobox_mdtype = new System.Windows.Forms.ComboBox();
this._textbox_leg_price_mult = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this._label_leanqty_factor = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
this.SuspendLayout();
//
// _combobox_security
//
this._combobox_security.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this._combobox_security.FormattingEnabled = true;
this._combobox_security.Location = new System.Drawing.Point(157, 15);
this._combobox_security.Name = "_combobox_security";
this._combobox_security.Size = new System.Drawing.Size(100, 23);
this._combobox_security.TabIndex = 0;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(16, 23);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(49, 15);
this.label1.TabIndex = 1;
this.label1.Text = "Security";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(16, 58);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(53, 15);
this.label2.TabIndex = 2;
this.label2.Text = "Quantity";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(16, 128);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(89, 15);
this.label3.TabIndex = 3;
this.label3.Text = "Enable Quoting";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(16, 198);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(98, 15);
this.label5.TabIndex = 5;
this.label5.Text = "Market Data Type";
//
// groupBox1
//
this.groupBox1.Controls.Add(this._textbox_quote_qho_length);
this.groupBox1.Controls.Add(this._textbox_quote_insidemarketdistance_towarddistance);
this.groupBox1.Controls.Add(this._textbox_quote_conditional_ticks);
this.groupBox1.Controls.Add(this._textbox_quote_throttle_outsideticks);
this.groupBox1.Controls.Add(this._textbox_quote_throttle_insideticks);
this.groupBox1.Controls.Add(this._textbox_quote_showqty_qty);
this.groupBox1.Controls.Add(this.label11);
this.groupBox1.Controls.Add(this._checkbox_quote_insidemarketdistance);
this.groupBox1.Controls.Add(this.label10);
this.groupBox1.Controls.Add(this._checkbox_quote_conditional);
this.groupBox1.Controls.Add(this.label9);
this.groupBox1.Controls.Add(this.label8);
this.groupBox1.Controls.Add(this._checkbox_quote_throttle);
this.groupBox1.Controls.Add(this.label7);
this.groupBox1.Controls.Add(this._checkbox_quote_showqty);
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.ForeColor = System.Drawing.Color.Black;
this.groupBox1.Location = new System.Drawing.Point(12, 238);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(265, 369);
this.groupBox1.TabIndex = 6;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Quote";
//
// _textbox_quote_qho_length
//
this._textbox_quote_qho_length.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this._textbox_quote_qho_length.Location = new System.Drawing.Point(145, 28);
this._textbox_quote_qho_length.Name = "_textbox_quote_qho_length";
this._textbox_quote_qho_length.Size = new System.Drawing.Size(100, 23);
this._textbox_quote_qho_length.TabIndex = 6;
//
// _textbox_quote_insidemarketdistance_towarddistance
//
this._textbox_quote_insidemarketdistance_towarddistance.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this._textbox_quote_insidemarketdistance_towarddistance.Location = new System.Drawing.Point(145, 314);
this._textbox_quote_insidemarketdistance_towarddistance.Name = "_textbox_quote_insidemarketdistance_towarddistance";
this._textbox_quote_insidemarketdistance_towarddistance.Size = new System.Drawing.Size(100, 23);
this._textbox_quote_insidemarketdistance_towarddistance.TabIndex = 15;
//
// _textbox_quote_conditional_ticks
//
this._textbox_quote_conditional_ticks.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this._textbox_quote_conditional_ticks.Location = new System.Drawing.Point(145, 250);
this._textbox_quote_conditional_ticks.Name = "_textbox_quote_conditional_ticks";
this._textbox_quote_conditional_ticks.Size = new System.Drawing.Size(100, 23);
this._textbox_quote_conditional_ticks.TabIndex = 13;
//
// _textbox_quote_throttle_outsideticks
//
this._textbox_quote_throttle_outsideticks.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this._textbox_quote_throttle_outsideticks.Location = new System.Drawing.Point(145, 186);
this._textbox_quote_throttle_outsideticks.Name = "_textbox_quote_throttle_outsideticks";
this._textbox_quote_throttle_outsideticks.Size = new System.Drawing.Size(100, 23);
this._textbox_quote_throttle_outsideticks.TabIndex = 11;
//
// _textbox_quote_throttle_insideticks
//
this._textbox_quote_throttle_insideticks.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this._textbox_quote_throttle_insideticks.Location = new System.Drawing.Point(145, 156);
this._textbox_quote_throttle_insideticks.Name = "_textbox_quote_throttle_insideticks";
this._textbox_quote_throttle_insideticks.Size = new System.Drawing.Size(100, 23);
this._textbox_quote_throttle_insideticks.TabIndex = 10;
//
// _textbox_quote_showqty_qty
//
this._textbox_quote_showqty_qty.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this._textbox_quote_showqty_qty.Location = new System.Drawing.Point(145, 92);
this._textbox_quote_showqty_qty.Name = "_textbox_quote_showqty_qty";
this._textbox_quote_showqty_qty.Size = new System.Drawing.Size(100, 23);
this._textbox_quote_showqty_qty.TabIndex = 8;
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(45, 322);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(93, 15);
this.label11.TabIndex = 16;
this.label11.Text = "Toward Distance";
//
// _checkbox_quote_insidemarketdistance
//
this._checkbox_quote_insidemarketdistance.AutoSize = true;
this._checkbox_quote_insidemarketdistance.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
this._checkbox_quote_insidemarketdistance.Location = new System.Drawing.Point(15, 288);
this._checkbox_quote_insidemarketdistance.Name = "_checkbox_quote_insidemarketdistance";
this._checkbox_quote_insidemarketdistance.Size = new System.Drawing.Size(131, 19);
this._checkbox_quote_insidemarketdistance.TabIndex = 14;
this._checkbox_quote_insidemarketdistance.Text = "Inside Market Dist.";
this._checkbox_quote_insidemarketdistance.UseVisualStyleBackColor = true;
this._checkbox_quote_insidemarketdistance.CheckedChanged += new System.EventHandler(this._checkbox_quote_insidemarketdistance_CheckedChanged);
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(47, 258);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(33, 15);
this.label10.TabIndex = 14;
this.label10.Text = "Ticks";
//
// _checkbox_quote_conditional
//
this._checkbox_quote_conditional.AutoSize = true;
this._checkbox_quote_conditional.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
this._checkbox_quote_conditional.Location = new System.Drawing.Point(15, 224);
this._checkbox_quote_conditional.Name = "_checkbox_quote_conditional";
this._checkbox_quote_conditional.Size = new System.Drawing.Size(88, 19);
this._checkbox_quote_conditional.TabIndex = 12;
this._checkbox_quote_conditional.Text = "Conditional";
this._checkbox_quote_conditional.UseVisualStyleBackColor = true;
this._checkbox_quote_conditional.CheckedChanged += new System.EventHandler(this._checkbox_quote_conditional_CheckedChanged);
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(45, 194);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(77, 15);
this.label9.TabIndex = 12;
this.label9.Text = "Outside Ticks";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(45, 164);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(67, 15);
this.label8.TabIndex = 11;
this.label8.Text = "Inside Ticks";
//
// _checkbox_quote_throttle
//
this._checkbox_quote_throttle.AutoSize = true;
this._checkbox_quote_throttle.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
this._checkbox_quote_throttle.Location = new System.Drawing.Point(15, 130);
this._checkbox_quote_throttle.Name = "_checkbox_quote_throttle";
this._checkbox_quote_throttle.Size = new System.Drawing.Size(72, 19);
this._checkbox_quote_throttle.TabIndex = 9;
this._checkbox_quote_throttle.Text = "Throttle";
this._checkbox_quote_throttle.UseVisualStyleBackColor = true;
this._checkbox_quote_throttle.CheckedChanged += new System.EventHandler(this._checkbox_quote_throttle_CheckedChanged);
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(45, 100);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(53, 15);
this.label7.TabIndex = 9;
this.label7.Text = "Quantity";
//
// _checkbox_quote_showqty
//
this._checkbox_quote_showqty.AutoSize = true;
this._checkbox_quote_showqty.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
this._checkbox_quote_showqty.Location = new System.Drawing.Point(15, 66);
this._checkbox_quote_showqty.Name = "_checkbox_quote_showqty";
this._checkbox_quote_showqty.Size = new System.Drawing.Size(108, 19);
this._checkbox_quote_showqty.TabIndex = 7;
this._checkbox_quote_showqty.Text = "Show Quantity";
this._checkbox_quote_showqty.UseVisualStyleBackColor = true;
this._checkbox_quote_showqty.CheckedChanged += new System.EventHandler(this._checkbox_quote_showqty_CheckedChanged);
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(15, 36);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(121, 15);
this.label6.TabIndex = 6;
this.label6.Text = "Queue Holder Length";
//
// groupBox2
//
this.groupBox2.Controls.Add(this._textbox_prehedge_payless_paylessticks);
this.groupBox2.Controls.Add(this._textbox_prehedge_payup_payupticks);
this.groupBox2.Controls.Add(this._textbox_prehedge_payup_threshold);
this.groupBox2.Controls.Add(this._textbox_prehedge_payless_threshold);
this.groupBox2.Controls.Add(this.label13);
this.groupBox2.Controls.Add(this.label14);
this.groupBox2.Controls.Add(this.label15);
this.groupBox2.Controls.Add(this._checkbox_prehedge_payup);
this.groupBox2.Controls.Add(this.label16);
this.groupBox2.Controls.Add(this._checkbox_prehedge_payless);
this.groupBox2.Location = new System.Drawing.Point(13, 626);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(264, 234);
this.groupBox2.TabIndex = 7;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Pre-Hedge";
//
// _textbox_prehedge_payless_paylessticks
//
this._textbox_prehedge_payless_paylessticks.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this._textbox_prehedge_payless_paylessticks.Location = new System.Drawing.Point(144, 90);
this._textbox_prehedge_payless_paylessticks.Name = "_textbox_prehedge_payless_paylessticks";
this._textbox_prehedge_payless_paylessticks.Size = new System.Drawing.Size(100, 23);
this._textbox_prehedge_payless_paylessticks.TabIndex = 18;
//
// _textbox_prehedge_payup_payupticks
//
this._textbox_prehedge_payup_payupticks.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this._textbox_prehedge_payup_payupticks.Location = new System.Drawing.Point(144, 187);
this._textbox_prehedge_payup_payupticks.Name = "_textbox_prehedge_payup_payupticks";
this._textbox_prehedge_payup_payupticks.Size = new System.Drawing.Size(100, 23);
this._textbox_prehedge_payup_payupticks.TabIndex = 21;
//
// _textbox_prehedge_payup_threshold
//
this._textbox_prehedge_payup_threshold.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this._textbox_prehedge_payup_threshold.Location = new System.Drawing.Point(144, 156);
this._textbox_prehedge_payup_threshold.Name = "_textbox_prehedge_payup_threshold";
this._textbox_prehedge_payup_threshold.Size = new System.Drawing.Size(100, 23);
this._textbox_prehedge_payup_threshold.TabIndex = 20;
//
// _textbox_prehedge_payless_threshold
//
this._textbox_prehedge_payless_threshold.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this._textbox_prehedge_payless_threshold.Location = new System.Drawing.Point(144, 59);
this._textbox_prehedge_payless_threshold.Name = "_textbox_prehedge_payless_threshold";
this._textbox_prehedge_payless_threshold.Size = new System.Drawing.Size(100, 23);
this._textbox_prehedge_payless_threshold.TabIndex = 17;
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(44, 98);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(74, 15);
this.label13.TabIndex = 14;
this.label13.Text = "Payless Ticks";
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(44, 195);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(69, 15);
this.label14.TabIndex = 12;
this.label14.Text = "Payup Ticks";
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(44, 164);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(59, 15);
this.label15.TabIndex = 11;
this.label15.Text = "Threshold";
//
// _checkbox_prehedge_payup
//
this._checkbox_prehedge_payup.AutoSize = true;
this._checkbox_prehedge_payup.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
this._checkbox_prehedge_payup.Location = new System.Drawing.Point(15, 129);
this._checkbox_prehedge_payup.Name = "_checkbox_prehedge_payup";
this._checkbox_prehedge_payup.Size = new System.Drawing.Size(64, 19);
this._checkbox_prehedge_payup.TabIndex = 19;
this._checkbox_prehedge_payup.Text = "Pay Up";
this._checkbox_prehedge_payup.UseVisualStyleBackColor = true;
this._checkbox_prehedge_payup.CheckedChanged += new System.EventHandler(this._checkbox_prehedge_payup_CheckedChanged);
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(44, 67);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(59, 15);
this.label16.TabIndex = 9;
this.label16.Text = "Threshold";
//
// _checkbox_prehedge_payless
//
this._checkbox_prehedge_payless.AutoSize = true;
this._checkbox_prehedge_payless.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
this._checkbox_prehedge_payless.Location = new System.Drawing.Point(15, 32);
this._checkbox_prehedge_payless.Name = "_checkbox_prehedge_payless";
this._checkbox_prehedge_payless.Size = new System.Drawing.Size(71, 19);
this._checkbox_prehedge_payless.TabIndex = 16;
this._checkbox_prehedge_payless.Text = "Pay Less";
this._checkbox_prehedge_payless.UseVisualStyleBackColor = true;
this._checkbox_prehedge_payless.CheckedChanged += new System.EventHandler(this._checkbox_prehedge_payless_CheckedChanged);
//
// groupBox3
//
this.groupBox3.Controls.Add(this._textbox_posthedge_sizebasedcross_crossticks);
this.groupBox3.Controls.Add(this._textbox_posthedge_sizebasedcross_threshold);
this.groupBox3.Controls.Add(this._textbox_posthedge_timesbasedcross_crossticks);
this.groupBox3.Controls.Add(this._textbox_posthedge_timesbasedcross_timems);
this.groupBox3.Controls.Add(this._textbox_posthedge_ticksawaycross_crossticks);
this.groupBox3.Controls.Add(this._textbox_posthedge_ticksawaycross_threshold);
this.groupBox3.Controls.Add(this.label20);
this.groupBox3.Controls.Add(this.label21);
this.groupBox3.Controls.Add(this._checkbox_posthedge_sizebasedcross);
this.groupBox3.Controls.Add(this.label12);
this.groupBox3.Controls.Add(this.label17);
this.groupBox3.Controls.Add(this.label18);
this.groupBox3.Controls.Add(this._checkbox_posthedge_timebasedcross);
this.groupBox3.Controls.Add(this.label19);
this.groupBox3.Controls.Add(this._checkbox_posthedge_ticksawaycross);
this.groupBox3.Location = new System.Drawing.Point(13, 882);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(264, 319);
this.groupBox3.TabIndex = 8;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "Post-Hedge";
//
// _textbox_posthedge_sizebasedcross_crossticks
//
this._textbox_posthedge_sizebasedcross_crossticks.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this._textbox_posthedge_sizebasedcross_crossticks.Location = new System.Drawing.Point(144, 276);
this._textbox_posthedge_sizebasedcross_crossticks.Name = "_textbox_posthedge_sizebasedcross_crossticks";
this._textbox_posthedge_sizebasedcross_crossticks.Size = new System.Drawing.Size(100, 23);
this._textbox_posthedge_sizebasedcross_crossticks.TabIndex = 30;
//
// _textbox_posthedge_sizebasedcross_threshold
//
this._textbox_posthedge_sizebasedcross_threshold.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this._textbox_posthedge_sizebasedcross_threshold.Location = new System.Drawing.Point(144, 246);
this._textbox_posthedge_sizebasedcross_threshold.Name = "_textbox_posthedge_sizebasedcross_threshold";
this._textbox_posthedge_sizebasedcross_threshold.Size = new System.Drawing.Size(100, 23);
this._textbox_posthedge_sizebasedcross_threshold.TabIndex = 29;
//
// _textbox_posthedge_timesbasedcross_crossticks
//
this._textbox_posthedge_timesbasedcross_crossticks.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this._textbox_posthedge_timesbasedcross_crossticks.Location = new System.Drawing.Point(144, 182);
this._textbox_posthedge_timesbasedcross_crossticks.Name = "_textbox_posthedge_timesbasedcross_crossticks";
this._textbox_posthedge_timesbasedcross_crossticks.Size = new System.Drawing.Size(100, 23);
this._textbox_posthedge_timesbasedcross_crossticks.TabIndex = 27;
//
// _textbox_posthedge_timesbasedcross_timems
//
this._textbox_posthedge_timesbasedcross_timems.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this._textbox_posthedge_timesbasedcross_timems.Location = new System.Drawing.Point(144, 152);
this._textbox_posthedge_timesbasedcross_timems.Name = "_textbox_posthedge_timesbasedcross_timems";
this._textbox_posthedge_timesbasedcross_timems.Size = new System.Drawing.Size(100, 23);
this._textbox_posthedge_timesbasedcross_timems.TabIndex = 26;
//
// _textbox_posthedge_ticksawaycross_crossticks
//
this._textbox_posthedge_ticksawaycross_crossticks.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this._textbox_posthedge_ticksawaycross_crossticks.Location = new System.Drawing.Point(144, 88);
this._textbox_posthedge_ticksawaycross_crossticks.Name = "_textbox_posthedge_ticksawaycross_crossticks";
this._textbox_posthedge_ticksawaycross_crossticks.Size = new System.Drawing.Size(100, 23);
this._textbox_posthedge_ticksawaycross_crossticks.TabIndex = 24;
//
// _textbox_posthedge_ticksawaycross_threshold
//
this._textbox_posthedge_ticksawaycross_threshold.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this._textbox_posthedge_ticksawaycross_threshold.Location = new System.Drawing.Point(144, 58);
this._textbox_posthedge_ticksawaycross_threshold.Name = "_textbox_posthedge_ticksawaycross_threshold";
this._textbox_posthedge_ticksawaycross_threshold.Size = new System.Drawing.Size(100, 23);
this._textbox_posthedge_ticksawaycross_threshold.TabIndex = 23;
//
// label20
//
this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(44, 284);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(65, 15);
this.label20.TabIndex = 17;
this.label20.Text = "Cross Ticks";
//
// label21
//
this.label21.AutoSize = true;
this.label21.Location = new System.Drawing.Point(44, 254);
this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(59, 15);
this.label21.TabIndex = 16;
this.label21.Text = "Threshold";
//
// _checkbox_posthedge_sizebasedcross
//
this._checkbox_posthedge_sizebasedcross.AutoSize = true;
this._checkbox_posthedge_sizebasedcross.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
this._checkbox_posthedge_sizebasedcross.Location = new System.Drawing.Point(15, 220);
this._checkbox_posthedge_sizebasedcross.Name = "_checkbox_posthedge_sizebasedcross";
this._checkbox_posthedge_sizebasedcross.Size = new System.Drawing.Size(117, 19);
this._checkbox_posthedge_sizebasedcross.TabIndex = 28;
this._checkbox_posthedge_sizebasedcross.Text = "Size Based Cross";
this._checkbox_posthedge_sizebasedcross.UseVisualStyleBackColor = true;
this._checkbox_posthedge_sizebasedcross.CheckedChanged += new System.EventHandler(this._checkbox_posthedge_sizebasedcross_CheckedChanged);
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(44, 96);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(65, 15);
this.label12.TabIndex = 14;
this.label12.Text = "Cross Ticks";
//
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(44, 190);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(65, 15);
this.label17.TabIndex = 12;
this.label17.Text = "Cross Ticks";
//
// label18
//
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(44, 160);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(57, 15);
this.label18.TabIndex = 11;
this.label18.Text = "Time(ms)";
//
// _checkbox_posthedge_timebasedcross
//
this._checkbox_posthedge_timebasedcross.AutoSize = true;
this._checkbox_posthedge_timebasedcross.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
this._checkbox_posthedge_timebasedcross.Location = new System.Drawing.Point(15, 126);
this._checkbox_posthedge_timebasedcross.Name = "_checkbox_posthedge_timebasedcross";
this._checkbox_posthedge_timebasedcross.Size = new System.Drawing.Size(122, 19);
this._checkbox_posthedge_timebasedcross.TabIndex = 25;
this._checkbox_posthedge_timebasedcross.Text = "Time Based Cross";
this._checkbox_posthedge_timebasedcross.UseVisualStyleBackColor = true;
this._checkbox_posthedge_timebasedcross.CheckedChanged += new System.EventHandler(this._checkbox_posthedge_timebasedcross_CheckedChanged);
//
// label19
//
this.label19.AutoSize = true;
this.label19.Location = new System.Drawing.Point(44, 66);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(59, 15);
this.label19.TabIndex = 9;
this.label19.Text = "Threshold";
//
// _checkbox_posthedge_ticksawaycross
//
this._checkbox_posthedge_ticksawaycross.AutoSize = true;
this._checkbox_posthedge_ticksawaycross.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
this._checkbox_posthedge_ticksawaycross.Location = new System.Drawing.Point(15, 32);
this._checkbox_posthedge_ticksawaycross.Name = "_checkbox_posthedge_ticksawaycross";
this._checkbox_posthedge_ticksawaycross.Size = new System.Drawing.Size(119, 19);
this._checkbox_posthedge_ticksawaycross.TabIndex = 22;
this._checkbox_posthedge_ticksawaycross.Text = "Ticks Away Cross";
this._checkbox_posthedge_ticksawaycross.UseVisualStyleBackColor = true;
this._checkbox_posthedge_ticksawaycross.CheckedChanged += new System.EventHandler(this._checkbox_posthedge_ticksawaycross_CheckedChanged);
//
// _textbox_leg_qty
//
this._textbox_leg_qty.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this._textbox_leg_qty.Location = new System.Drawing.Point(157, 50);
this._textbox_leg_qty.Name = "_textbox_leg_qty";
this._textbox_leg_qty.Size = new System.Drawing.Size(100, 23);
this._textbox_leg_qty.TabIndex = 1;
this._textbox_leg_qty.Tag = "Double";
//
// _checkbox_leg_enablequoting
//
this._checkbox_leg_enablequoting.AutoSize = true;
this._checkbox_leg_enablequoting.Location = new System.Drawing.Point(157, 129);
this._checkbox_leg_enablequoting.Name = "_checkbox_leg_enablequoting";
this._checkbox_leg_enablequoting.Size = new System.Drawing.Size(15, 14);
this._checkbox_leg_enablequoting.TabIndex = 3;
this._checkbox_leg_enablequoting.UseVisualStyleBackColor = true;
//
// _textbox_leg_leanqtyfactor
//
this._textbox_leg_leanqtyfactor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this._textbox_leg_leanqtyfactor.Location = new System.Drawing.Point(157, 155);
this._textbox_leg_leanqtyfactor.Name = "_textbox_leg_leanqtyfactor";
this._textbox_leg_leanqtyfactor.Size = new System.Drawing.Size(100, 23);
this._textbox_leg_leanqtyfactor.TabIndex = 4;
//
// _combobox_mdtype
//
this._combobox_mdtype.AutoCompleteCustomSource.AddRange(new string[] {
"Merged",
"Direct"});
this._combobox_mdtype.FormattingEnabled = true;
this._combobox_mdtype.Location = new System.Drawing.Point(157, 190);
this._combobox_mdtype.Name = "_combobox_mdtype";
this._combobox_mdtype.Size = new System.Drawing.Size(100, 23);
this._combobox_mdtype.TabIndex = 5;
//
// _textbox_leg_price_mult
//
this._textbox_leg_price_mult.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this._textbox_leg_price_mult.Location = new System.Drawing.Point(157, 85);
this._textbox_leg_price_mult.Name = "_textbox_leg_price_mult";
this._textbox_leg_price_mult.Size = new System.Drawing.Size(100, 23);
this._textbox_leg_price_mult.TabIndex = 2;
this._textbox_leg_price_mult.Tag = "Double";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(16, 93);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(87, 15);
this.label4.TabIndex = 10;
this.label4.Text = "Price Multiplier";
//
// _label_leanqty_factor
//
this._label_leanqty_factor.AutoSize = true;
this._label_leanqty_factor.Location = new System.Drawing.Point(16, 163);
this._label_leanqty_factor.Name = "_label_leanqty_factor";
this._label_leanqty_factor.Size = new System.Drawing.Size(90, 15);
this._label_leanqty_factor.TabIndex = 4;
this._label_leanqty_factor.Text = "Lean Qty Factor";
//
// LegControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.Controls.Add(this._textbox_leg_price_mult);
this.Controls.Add(this.label4);
this.Controls.Add(this._combobox_mdtype);
this.Controls.Add(this._textbox_leg_leanqtyfactor);
this.Controls.Add(this._checkbox_leg_enablequoting);
this.Controls.Add(this._textbox_leg_qty);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.label5);
this.Controls.Add(this._label_leanqty_factor);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this._combobox_security);
this.Name = "LegControl";
this.Size = new System.Drawing.Size(291, 1220);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private ComboBox _combobox_security;
private Label label1;
private Label label2;
private Label label3;
private Label label5;
private GroupBox groupBox1;
private Label label6;
private Label label11;
private CheckBox _checkbox_quote_insidemarketdistance;
private Label label10;
private CheckBox _checkbox_quote_conditional;
private Label label9;
private Label label8;
private CheckBox _checkbox_quote_throttle;
private Label label7;
private CheckBox _checkbox_quote_showqty;
private GroupBox groupBox2;
private Label label13;
private Label label14;
private Label label15;
private CheckBox _checkbox_prehedge_payup;
private Label label16;
private CheckBox _checkbox_prehedge_payless;
private GroupBox groupBox3;
private Label label20;
private Label label21;
private CheckBox _checkbox_posthedge_sizebasedcross;
private Label label12;
private Label label17;
private Label label18;
private CheckBox _checkbox_posthedge_timebasedcross;
private Label label19;
private CheckBox _checkbox_posthedge_ticksawaycross;
private TextBox _textbox_leg_qty;
private CheckBox _checkbox_leg_enablequoting;
private TextBox _textbox_leg_leanqtyfactor;
private ComboBox _combobox_mdtype;
private TextBox _textbox_quote_insidemarketdistance_towarddistance;
private TextBox _textbox_quote_conditional_ticks;
private TextBox _textbox_quote_throttle_outsideticks;
private TextBox _textbox_quote_throttle_insideticks;
private TextBox _textbox_quote_showqty_qty;
private TextBox _textbox_prehedge_payless_paylessticks;
private TextBox _textbox_prehedge_payup_payupticks;
private TextBox _textbox_prehedge_payup_threshold;
private TextBox _textbox_prehedge_payless_threshold;
private TextBox _textbox_posthedge_sizebasedcross_crossticks;
private TextBox _textbox_posthedge_sizebasedcross_threshold;
private TextBox _textbox_posthedge_timesbasedcross_crossticks;
private TextBox _textbox_posthedge_timesbasedcross_timems;
private TextBox _textbox_posthedge_ticksawaycross_crossticks;
private TextBox _textbox_posthedge_ticksawaycross_threshold;
private TextBox _textbox_quote_qho_length;
private TextBox _textbox_leg_price_mult;
private Label label4;
private Label _label_leanqty_factor;
}
}
@@ -0,0 +1,305 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Diagnostics;
using System.Reflection;
namespace SpreaderFrontEnd {
// UI control that represents a spreader leg. This is hidden within the MainSpreaderForm
public partial class LegControl : UserControl {
private SpreaderLegContract _leg_contract = new SpreaderLegContract();
private IEnumerable<string> _securities = new List<string>();
public LegControl() {
InitializeComponent();
}
public void initialize(IEnumerable<string> securities, SpreaderLegContract? leg_contract) {
_securities = securities;
_leg_contract = leg_contract ?? new SpreaderLegContract();
_populate_ui();
}
#region Data -> UI
private void _populate_ui() {
_populate_basic();
_populate_quote();
_populate_prehedge();
_populate_posthedge();
_initialize_enablement();
_assign_events();
}
void _assign_events() {
foreach (System.Reflection.FieldInfo fi in GetType().GetFields(BindingFlags.NonPublic
| BindingFlags.Public
| BindingFlags.Instance)) {
if (fi.FieldType == typeof(TextBox)) {
object? val = fi.GetValue(this);
if (val != null) {
TextBox? textbox = val as TextBox;
if (textbox != null) {
textbox.TextChanged += Textbox_TextChanged;
textbox.EnabledChanged += Textbox_EnabledChanged;
}
}
}
}
}
private void Textbox_EnabledChanged(object? sender, EventArgs e) {
}
private void Textbox_TextChanged(object? sender, EventArgs e) {
if (sender != null && sender is TextBox) {
TextBox? tb = sender as TextBox;
if (tb == null)
return;
if ("Double".Equals(tb.Tag)) {
double res;
bool parsed = Double.TryParse(tb.Text, out res);
tb.ForeColor = parsed ? Color.Black : Color.Red;
} else {
UInt32 res;
bool parsed = UInt32.TryParse(tb.Text, out res);
tb.ForeColor = parsed ? Color.Black : Color.Red;
}
}
}
void _populate_basic() {
// security
_combobox_security.Items.Clear();
List<string> securities_plus_empty = new List<string>(_securities);
securities_plus_empty.Add(String.Empty);
_combobox_security.Items.AddRange(securities_plus_empty.ToArray());
_combobox_security.Text = _leg_contract.security;
// qty etc
_textbox_leg_qty.Text = _leg_contract.qty.ToString();
_textbox_leg_price_mult.Text = _leg_contract.price_mult.ToString();
_checkbox_leg_enablequoting.Checked = _leg_contract.enable_quoting;
_textbox_leg_leanqtyfactor.Text = _leg_contract.lean_qty_factor.ToString();
_combobox_mdtype.Text = _leg_contract.md_type.ToString();
}
void _populate_quote() {
Debug.Assert(_leg_contract.quote_params != null);
var qp = _leg_contract.quote_params;
_textbox_quote_qho_length.Text = qp.qho_length.ToString();
// show qty
_checkbox_quote_showqty.Checked = qp.show_qty != null;
if (qp.show_qty != null) {
_checkbox_quote_showqty.Checked = true;
_textbox_quote_showqty_qty.Text = qp.show_qty.show_qty.ToString();
}
// throttle
_checkbox_quote_throttle.Checked = qp.throttle != null;
if (qp.throttle != null) {
_textbox_quote_throttle_insideticks.Text = qp.throttle.inside_ticks.ToString();
_textbox_quote_throttle_outsideticks.Text = qp.throttle.outside_ticks.ToString();
}
// conditional
_checkbox_quote_conditional.Checked = qp.conditional != null;
if (qp.conditional != null) {
_textbox_quote_conditional_ticks.Text = qp.conditional.ticks.ToString();
}
// inside market dist.
_checkbox_quote_insidemarketdistance.Checked = qp.inside_market_distance != null;
if (qp.inside_market_distance != null) {
_textbox_quote_insidemarketdistance_towarddistance.Text = qp.inside_market_distance.ToString();
}
}
void _populate_prehedge() {
var ph = _leg_contract.pre_hedge_params;
// payless
_checkbox_prehedge_payless.Checked = ph.payless != null;
if (ph.payless != null) {
_textbox_prehedge_payless_threshold.Text = ph.payless.threshold.ToString();
_textbox_prehedge_payless_paylessticks.Text = ph.payless.payless_ticks.ToString();
}
// payup
_checkbox_prehedge_payup.Checked = ph.payup != null;
if (ph.payup != null) {
_textbox_prehedge_payup_threshold.Text = ph.payup.threshold.ToString();
_textbox_prehedge_payup_payupticks.Text = ph.payup.payup_ticks.ToString();
}
}
void _populate_posthedge() {
var ph = _leg_contract.post_hedge_params;
_checkbox_posthedge_ticksawaycross.Checked = ph.ticks_away_cross != null;
// ticks away cross
if (ph.ticks_away_cross != null) {
_textbox_posthedge_ticksawaycross_threshold.Text = ph.ticks_away_cross.threshold.ToString();
_textbox_posthedge_ticksawaycross_crossticks.Text = ph.ticks_away_cross.cross_ticks.ToString();
}
//time based cross
_checkbox_posthedge_timebasedcross.Checked = ph.time_based_cross != null;
if (ph.time_based_cross != null) {
_textbox_posthedge_timesbasedcross_timems.Text = ph.time_based_cross.time_ms.ToString();
_textbox_posthedge_timesbasedcross_crossticks.Text = ph.time_based_cross.cross_ticks.ToString();
}
// size based cross
_checkbox_posthedge_sizebasedcross.Checked = ph.size_based_cross != null;
if (ph.size_based_cross != null) {
_textbox_posthedge_sizebasedcross_threshold.Text = ph.size_based_cross.threshold.ToString();
_textbox_posthedge_sizebasedcross_crossticks.Text = ph.size_based_cross.ToString();
}
}
// forces checkbox events so that the text boxes connected to it are enabled/disabled
private void _initialize_enablement() {
_checkbox_quote_showqty_CheckedChanged(_checkbox_quote_showqty, new EventArgs());
_checkbox_quote_throttle_CheckedChanged(_checkbox_quote_showqty, new EventArgs());
_checkbox_quote_conditional_CheckedChanged(_checkbox_quote_showqty, new EventArgs());
_checkbox_quote_insidemarketdistance_CheckedChanged(_checkbox_quote_showqty, new EventArgs());
_checkbox_prehedge_payless_CheckedChanged(_checkbox_quote_showqty, new EventArgs());
_checkbox_prehedge_payup_CheckedChanged(_checkbox_quote_showqty, new EventArgs());
_checkbox_posthedge_ticksawaycross_CheckedChanged(_checkbox_quote_showqty, new EventArgs());
_checkbox_posthedge_timebasedcross_CheckedChanged(_checkbox_quote_showqty, new EventArgs());
_checkbox_posthedge_sizebasedcross_CheckedChanged(_checkbox_quote_showqty, new EventArgs());
}
#endregion
#region UI -> Data
public ParsedUIData<SpreaderLegContract> get_data() {
SpreaderLegContract rv = new SpreaderLegContract();
try {
// top part
rv.security = _combobox_security.Text;
rv.qty = Int32.Parse(_textbox_leg_qty.Text);
rv.price_mult = Double.Parse(_textbox_leg_price_mult.Text);
rv.enable_quoting = _checkbox_leg_enablequoting.Checked;
rv.lean_qty_factor = Double.Parse(_textbox_leg_leanqtyfactor.Text);
rv.md_type = SpreaderLegContract.MDType.Merged;
// Quote
rv.quote_params = new SpreaderLegContract.QuoteParams();
rv.quote_params.qho_length = String.IsNullOrEmpty(_textbox_quote_qho_length.Text) ? 0 :
UInt32.Parse(_textbox_quote_qho_length.Text);
rv.quote_params.show_qty = null;
if (_checkbox_quote_showqty.Checked) {
rv.quote_params.show_qty = new SpreaderLegContract.QuoteParams.ShowQty();
rv.quote_params.show_qty.show_qty = UInt32.Parse(_textbox_quote_showqty_qty.Text);
}
rv.quote_params.throttle = null;
if (_checkbox_quote_throttle.Checked) {
rv.quote_params.throttle = new SpreaderLegContract.QuoteParams.Throttle();
rv.quote_params.throttle.inside_ticks = UInt32.Parse(_textbox_quote_throttle_insideticks.Text);
rv.quote_params.throttle.outside_ticks = UInt32.Parse(_textbox_quote_throttle_outsideticks.Text);
}
rv.quote_params.conditional = null;
if (_checkbox_quote_conditional.Checked) {
rv.quote_params.conditional = new SpreaderLegContract.QuoteParams.Conditional();
rv.quote_params.conditional.ticks = Int32.Parse(_textbox_quote_conditional_ticks.Text);
}
rv.quote_params.inside_market_distance = null;
if (_checkbox_quote_insidemarketdistance.Checked) {
rv.quote_params.inside_market_distance = new SpreaderLegContract.QuoteParams.InsideMarketDistance();
rv.quote_params.inside_market_distance.toward_distance =
UInt32.Parse(_textbox_quote_insidemarketdistance_towarddistance.Text);
}
//Pre-Hedge
rv.pre_hedge_params = new SpreaderLegContract.PreHedgeParams();
rv.pre_hedge_params.payless = null;
if (_checkbox_prehedge_payless.Checked) {
rv.pre_hedge_params.payless = new SpreaderLegContract.PreHedgeParams.PayLess();
rv.pre_hedge_params.payless.threshold = UInt32.Parse(_textbox_prehedge_payless_threshold.Text);
rv.pre_hedge_params.payless.payless_ticks =
UInt32.Parse(_textbox_prehedge_payless_paylessticks.Text);
}
rv.pre_hedge_params.payup = null;
if (_checkbox_prehedge_payup.Checked) {
rv.pre_hedge_params.payup = new SpreaderLegContract.PreHedgeParams.PayUp();
rv.pre_hedge_params.payup.threshold = UInt32.Parse(_textbox_prehedge_payup_threshold.Text);
rv.pre_hedge_params.payup.payup_ticks = UInt32.Parse(_textbox_prehedge_payup_payupticks.Text);
}
//Post-Hedge
rv.post_hedge_params = new SpreaderLegContract.PostHedgeParams();
rv.post_hedge_params.ticks_away_cross = null;
if (_checkbox_posthedge_ticksawaycross.Checked) {
rv.post_hedge_params.ticks_away_cross = new SpreaderLegContract.PostHedgeParams.TicksAwayCross();
rv.post_hedge_params.ticks_away_cross.threshold = UInt32.Parse(_textbox_posthedge_ticksawaycross_threshold.Text);
rv.post_hedge_params.ticks_away_cross.cross_ticks = UInt32.Parse(_textbox_posthedge_ticksawaycross_crossticks.Text);
}
rv.post_hedge_params.time_based_cross = null;
if (_checkbox_posthedge_timebasedcross.Checked) {
rv.post_hedge_params.time_based_cross = new SpreaderLegContract.PostHedgeParams.TimeBasedCross();
rv.post_hedge_params.time_based_cross.time_ms =
UInt32.Parse(_textbox_posthedge_timesbasedcross_timems.Text);
rv.post_hedge_params.time_based_cross.cross_ticks =
UInt32.Parse(_textbox_posthedge_timesbasedcross_crossticks.Text);
}
rv.post_hedge_params.size_based_cross = null;
if (_checkbox_posthedge_sizebasedcross.Checked) {
rv.post_hedge_params.size_based_cross = new SpreaderLegContract.PostHedgeParams.SizedBasedCross();
rv.post_hedge_params.size_based_cross.threshold = UInt32.Parse(_textbox_posthedge_sizebasedcross_threshold.Text);
rv.post_hedge_params.size_based_cross.cross_ticks = UInt32.Parse(_textbox_posthedge_sizebasedcross_crossticks.Text);
}
}
catch(Exception ex) {
return new ParsedUIData<SpreaderLegContract>(null, true, ex.Message);
}
return new ParsedUIData<SpreaderLegContract>(rv, false, String.Empty);
}
#endregion
public SpreaderLegContract get_contract() {
return null;
}
#region Checkbox Check Change Events
private void _checkbox_quote_showqty_CheckedChanged(object sender, EventArgs e) {
_textbox_quote_showqty_qty.Enabled = _checkbox_quote_showqty.Checked;
}
private void _checkbox_quote_throttle_CheckedChanged(object sender, EventArgs e) {
_textbox_quote_throttle_insideticks.Enabled = _checkbox_quote_throttle.Checked;
_textbox_quote_throttle_outsideticks.Enabled = _checkbox_quote_throttle.Checked;
}
private void _checkbox_quote_conditional_CheckedChanged(object sender, EventArgs e) {
_textbox_quote_conditional_ticks.Enabled = _checkbox_quote_conditional.Checked;
}
private void _checkbox_quote_insidemarketdistance_CheckedChanged(object sender, EventArgs e) {
_textbox_quote_insidemarketdistance_towarddistance.Enabled = _checkbox_quote_insidemarketdistance.Checked;
}
private void _checkbox_prehedge_payless_CheckedChanged(object sender, EventArgs e) {
_textbox_prehedge_payless_threshold.Enabled = _checkbox_prehedge_payless.Checked;
_textbox_prehedge_payless_paylessticks.Enabled = _checkbox_prehedge_payless.Checked;
}
private void _checkbox_prehedge_payup_CheckedChanged(object sender, EventArgs e) {
_textbox_prehedge_payup_threshold.Enabled = _checkbox_prehedge_payup.Checked;
_textbox_prehedge_payup_payupticks.Enabled = _checkbox_prehedge_payup.Checked;
}
private void _checkbox_posthedge_ticksawaycross_CheckedChanged(object sender, EventArgs e) {
_textbox_posthedge_ticksawaycross_threshold.Enabled = _checkbox_posthedge_ticksawaycross.Checked;
_textbox_posthedge_ticksawaycross_crossticks.Enabled = _checkbox_posthedge_ticksawaycross.Checked;
}
private void _checkbox_posthedge_timebasedcross_CheckedChanged(object sender, EventArgs e) {
_textbox_posthedge_timesbasedcross_timems.Enabled = _checkbox_posthedge_timebasedcross.Checked;
_textbox_posthedge_timesbasedcross_crossticks.Enabled = _checkbox_posthedge_timebasedcross.Checked;
}
private void _checkbox_posthedge_sizebasedcross_CheckedChanged(object sender, EventArgs e) {
_textbox_posthedge_sizebasedcross_threshold.Enabled = _checkbox_posthedge_sizebasedcross.Checked;
_textbox_posthedge_sizebasedcross_crossticks.Enabled = _checkbox_posthedge_sizebasedcross.Checked;
}
#endregion
}
}
@@ -0,0 +1,60 @@
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
@@ -0,0 +1,152 @@
using System.Windows.Forms;
namespace SpreaderFrontEnd
{
partial class MainSpreaderForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this._button_ok = new System.Windows.Forms.Button();
this._button_cancel = new System.Windows.Forms.Button();
this._label_spreader_name = new System.Windows.Forms.Label();
this._textbox_spreader_name = new System.Windows.Forms.TextBox();
this._legcontrol1 = new SpreaderFrontEnd.LegControl();
this._legcontrol2 = new SpreaderFrontEnd.LegControl();
this._legcontrol3 = new SpreaderFrontEnd.LegControl();
this._legcontrol4 = new SpreaderFrontEnd.LegControl();
this._legcontrol5 = new SpreaderFrontEnd.LegControl();
this.SuspendLayout();
//
// _button_ok
//
this._button_ok.Location = new System.Drawing.Point(1231, 1306);
this._button_ok.Name = "_button_ok";
this._button_ok.Size = new System.Drawing.Size(120, 33);
this._button_ok.TabIndex = 4;
this._button_ok.Text = "OK";
this._button_ok.UseVisualStyleBackColor = false;
this._button_ok.Click += new System.EventHandler(this._button_ok_Click);
//
// _button_cancel
//
this._button_cancel.Location = new System.Drawing.Point(1380, 1306);
this._button_cancel.Name = "_button_cancel";
this._button_cancel.Size = new System.Drawing.Size(121, 33);
this._button_cancel.TabIndex = 5;
this._button_cancel.Text = "Cancel";
this._button_cancel.UseVisualStyleBackColor = false;
this._button_cancel.Click += new System.EventHandler(this._button_cancel_Click);
//
// _label_spreader_name
//
this._label_spreader_name.AutoSize = true;
this._label_spreader_name.Location = new System.Drawing.Point(22, 28);
this._label_spreader_name.Name = "_label_spreader_name";
this._label_spreader_name.Size = new System.Drawing.Size(88, 15);
this._label_spreader_name.TabIndex = 6;
this._label_spreader_name.Text = "Spreader Name";
//
// _textbox_spreader_name
//
this._textbox_spreader_name.Location = new System.Drawing.Point(116, 25);
this._textbox_spreader_name.Name = "_textbox_spreader_name";
this._textbox_spreader_name.Size = new System.Drawing.Size(343, 23);
this._textbox_spreader_name.TabIndex = 0;
//
// _legcontrol1
//
this._legcontrol1.BackColor = System.Drawing.Color.White;
this._legcontrol1.Location = new System.Drawing.Point(22, 67);
this._legcontrol1.Name = "_legcontrol1";
this._legcontrol1.Size = new System.Drawing.Size(291, 1220);
this._legcontrol1.TabIndex = 1;
//
// _legcontrol2
//
this._legcontrol2.BackColor = System.Drawing.Color.White;
this._legcontrol2.Location = new System.Drawing.Point(319, 67);
this._legcontrol2.Name = "_legcontrol2";
this._legcontrol2.Size = new System.Drawing.Size(291, 1220);
this._legcontrol2.TabIndex = 2;
//
// _legcontrol3
//
this._legcontrol3.BackColor = System.Drawing.Color.White;
this._legcontrol3.Location = new System.Drawing.Point(616, 67);
this._legcontrol3.Name = "_legcontrol3";
this._legcontrol3.Size = new System.Drawing.Size(291, 1220);
this._legcontrol3.TabIndex = 3;
//
// _legcontrol4
//
this._legcontrol4.BackColor = System.Drawing.Color.White;
this._legcontrol4.Location = new System.Drawing.Point(913, 67);
this._legcontrol4.Name = "_legcontrol4";
this._legcontrol4.Size = new System.Drawing.Size(291, 1220);
this._legcontrol4.TabIndex = 4;
//
// _legcontrol5
//
this._legcontrol5.BackColor = System.Drawing.Color.White;
this._legcontrol5.Location = new System.Drawing.Point(1210, 67);
this._legcontrol5.Name = "_legcontrol5";
this._legcontrol5.Size = new System.Drawing.Size(291, 1220);
this._legcontrol5.TabIndex = 5;
//
// MainSpreaderForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1517, 1363);
this.Controls.Add(this._legcontrol5);
this.Controls.Add(this._legcontrol4);
this.Controls.Add(this._legcontrol3);
this.Controls.Add(this._legcontrol2);
this.Controls.Add(this._legcontrol1);
this.Controls.Add(this._textbox_spreader_name);
this.Controls.Add(this._label_spreader_name);
this.Controls.Add(this._button_cancel);
this.Controls.Add(this._button_ok);
this.Name = "MainSpreaderForm";
this.Text = "MainSpreaderForm";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private Button _button_ok;
private Button _button_cancel;
private Label _label_spreader_name;
private TextBox _textbox_spreader_name;
private LegControl _legcontrol1;
private LegControl _legcontrol2;
private LegControl _legcontrol3;
private LegControl _legcontrol4;
private LegControl _legcontrol5;
}
}
@@ -0,0 +1,81 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace SpreaderFrontEnd {
// This is the main UI widget. It is passed a list of securities and a SpreaderContract.
// The SpreaderContract can be empty (which will be the case when creating a new spreader).
// It has 3 public facing members (other than the constructor),
// 2 events that tell whether OK or Cancel was hit, respectively,
// and get_spreader_contract that returns a ParsedUIData<SpreaderContract>
public partial class MainSpreaderForm : Form {
private IEnumerable<LegControl> _leg_controls;
public Action on_OK = () => { };
public Action on_cancel = () => { };
private readonly IEnumerable<string> _securities;
private SpreaderContract _spreader_contract;
public MainSpreaderForm(IEnumerable<string> securities,
SpreaderContract spreader_contract)
: base() {
InitializeComponent();
_leg_controls = new LegControl[] { _legcontrol1, _legcontrol2, _legcontrol3, _legcontrol4, _legcontrol5 };
_securities = securities;
System.Diagnostics.Debug.Assert(spreader_contract != null);
// System.Diagnostics.Debug.Assert(spreader_contract.spread_legs.Count() == SpreaderContract.max_nlegs);
_spreader_contract = spreader_contract;
_textbox_spreader_name.Text = _spreader_contract.name;
for (var i = 0; i < _leg_controls.Count(); i++) {
SpreaderLegContract? lc = i < _spreader_contract.spread_legs.Count() ?
_spreader_contract.spread_legs.ElementAt(i) : null;
_leg_controls.ElementAt(i).initialize(securities, lc);
}
}
public ParsedUIData<SpreaderContract> get_spreader_contract() {
if (String.IsNullOrEmpty(_textbox_spreader_name.Text)) {
return new ParsedUIData<SpreaderContract>(null, true, "Spreader name is not set");
}
List<SpreaderLegContract> leg_contracts = new List<SpreaderLegContract>();
uint i = 0;
foreach (LegControl lc in _leg_controls) {
i++;
var leg_res = lc.get_data();
if (leg_res.is_error) {
return new ParsedUIData<SpreaderContract>(null, true, $"Leg: {i} is not set correctly");
}
leg_contracts.Add(leg_res.ui_data);
}
IEnumerable<SpreaderLegContract> leg_contracts_rv =
leg_contracts.Where(l => !String.IsNullOrEmpty(l.security));
if (leg_contracts_rv.Count() <= 1) {
return new ParsedUIData<SpreaderContract>(
null, true, "Spreader needs at least 2 legs");
}
// check the number of legs
return new ParsedUIData<SpreaderContract>(
new SpreaderContract(_textbox_spreader_name.Text, leg_contracts_rv), false, String.Empty);
}
private void _button_ok_Click(object sender, EventArgs e) {
ParsedUIData<SpreaderContract> ui_data = get_spreader_contract();
if (ui_data.is_error) {
string err_txt = $"The following error happened \n{ui_data.error_txt}";
System.Windows.Forms.MessageBox.Show(err_txt, "Spreader Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
on_OK();
}
private void _button_cancel_Click(object sender, EventArgs e) {
on_cancel();
}
}
}
@@ -0,0 +1,60 @@
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
@@ -0,0 +1,20 @@
namespace SpreaderFrontEnd {
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
public class ParsedUIData<T> {
public readonly T ui_data;
public readonly bool is_error;
public readonly string error_txt;
public ParsedUIData(T ui_data, bool is_error, string error_txt) {
this.ui_data = ui_data;
this.is_error = is_error;
this.error_txt = error_txt;
}
}
}
@@ -0,0 +1,18 @@
using System;
using System.Windows.Forms;
namespace SpreaderFrontEnd {
internal static class Program {
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main() {
SyntheticBookTest.run();
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize();
Application.Run(new TestForm());
}
}
}
@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SpreaderFrontEnd
{
[Serializable]
// Represents a spreader contract (anologous ot the protobuf on the C++ side)
// We could have generated managed wrappers from the protobuf, but we did not want
// to make your build process complicated hence opted for this class.
// It is quite simply a wrapper around an enumeration of SpreaderLegContract
public class SpreaderContract
{
public static uint max_nlegs = 5;
public string name = String.Empty;
public IList<SpreaderLegContract> spread_legs = new List<SpreaderLegContract>();
public SpreaderContract(string name, IEnumerable<SpreaderLegContract> spread_legs)
{
this.name = name;
this.spread_legs = spread_legs.ToList();
}
public static SpreaderContract empty
{
get
{
return new SpreaderContract("UNNAMED",
Enumerable.Repeat<SpreaderLegContract>(new SpreaderLegContract(), 5));
}
}
}
}
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<LanguageVersion>7</LanguageVersion>
</PropertyGroup>
</Project>
@@ -0,0 +1,90 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SpreaderFrontEnd
{
[Serializable]
// Represents a single leg of the spreader. It is made up of
// 1. a main section consisting of the security, qty, price mult etc
// 2. Quote parameters
// 3. Pre-Hedge parameters
// 4. Post-Hedge parameters
// It maps pretty directly to the UI (LegControl)
public class SpreaderLegContract
{
public enum MDType {
Direct = 0,
Merged = 1,
}
public string security = String.Empty;
public int qty = 1;
public double price_mult = 1;
public bool enable_quoting = false;
public double lean_qty_factor = 1;
public MDType md_type = MDType.Direct;
public QuoteParams quote_params = new QuoteParams();
public PreHedgeParams pre_hedge_params = new PreHedgeParams();
public PostHedgeParams post_hedge_params = new PostHedgeParams();
public class QuoteParams
{
public class ShowQty {
public UInt32 show_qty = 1;
}
public class Throttle {
public UInt32 inside_ticks = 0;
public UInt32 outside_ticks = 0;
}
public class Conditional {
public Int32 ticks = 0;
}
public class InsideMarketDistance {
public UInt32 toward_distance = 0;
}
public UInt32 qho_length = 0;
public ShowQty? show_qty = null;
public Throttle? throttle = null;
public Conditional? conditional = null;
public InsideMarketDistance? inside_market_distance = null;
}
public class PreHedgeParams
{
public class PayLess {
public UInt32 threshold = 0;
public UInt32 payless_ticks = 0;
}
public class PayUp
{
public UInt32 threshold = 0;
public UInt32 payup_ticks = 0;
}
public PayLess? payless = null;
public PayUp? payup = null;
}
public class PostHedgeParams
{
public class TicksAwayCross {
public UInt32 threshold = 0;
public UInt32 cross_ticks = 0;
}
public class TimeBasedCross {
public UInt32 time_ms = 0;
public UInt32 cross_ticks = 0;
}
public class SizedBasedCross {
public UInt32 threshold = 0;
public UInt32 cross_ticks = 0;
}
public TicksAwayCross? ticks_away_cross = null;
public TimeBasedCross? time_based_cross = null;
public SizedBasedCross? size_based_cross = null;
}
}
}
+79
View File
@@ -0,0 +1,79 @@
using System.Windows.Forms;
namespace SpreaderFrontEnd
{
partial class TestForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this._button_launch_new = new System.Windows.Forms.Button();
this._button_load_existing = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// _button_launch_new
//
this._button_launch_new.Location = new System.Drawing.Point(96, 46);
this._button_launch_new.Name = "_button_launch_new";
this._button_launch_new.Size = new System.Drawing.Size(169, 26);
this._button_launch_new.TabIndex = 0;
this._button_launch_new.Text = "Launch New";
this._button_launch_new.UseVisualStyleBackColor = true;
this._button_launch_new.Click += new System.EventHandler(this._button_launch_new_Click);
//
// _button_load_existing
//
this._button_load_existing.Location = new System.Drawing.Point(96, 114);
this._button_load_existing.Name = "_button_load_existing";
this._button_load_existing.Size = new System.Drawing.Size(169, 26);
this._button_load_existing.TabIndex = 1;
this._button_load_existing.Text = "Load Existing";
this._button_load_existing.UseVisualStyleBackColor = true;
this._button_load_existing.Click += new System.EventHandler(this._button_load_existing_Click);
//
// TestForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(371, 213);
this.Controls.Add(this._button_load_existing);
this.Controls.Add(this._button_launch_new);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "TestForm";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.Text = "Test Launcher";
this.ResumeLayout(false);
}
#endregion
private Button _button_launch_new;
private Button _button_load_existing;
}
}
@@ -0,0 +1,91 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace SpreaderFrontEnd {
// Test class that demostrates how to use the MainSpreaderForm.
// It has 2 buttons. "Launch New" launches a brand new spreader (empty UI)
// while "Launch Existing" loads the MainSpreaderForm with an existing
// spreader (hard coded arbitrary values)
public partial class TestForm : Form {
private IEnumerable<string> _securities = new string[] {
"ZCG23",
"ZCH23",
"ZCJ23",
"ZCL23",
"ZCM23"
};
public TestForm() {
InitializeComponent();
}
private void _button_launch_new_Click(object sender, EventArgs e) {
_show_form(SpreaderContract.empty);
}
private void _button_load_existing_Click(object sender, EventArgs e) {
var sc = _generate_test_contract();
_show_form(sc);
}
private void _show_form(SpreaderContract spreader_contract) {
MainSpreaderForm f = new MainSpreaderForm(_securities, spreader_contract);
f.on_OK = () => {
MessageBox.Show("Received OK", "OK", MessageBoxButtons.OK, MessageBoxIcon.Information);
f.Close();
};
f.on_cancel = () => {
MessageBox.Show("Received Cancel", "Cancel", MessageBoxButtons.OK, MessageBoxIcon.Warning);
f.Close();
};
f.ShowDialog();
}
private SpreaderContract _generate_test_contract() {
List<SpreaderLegContract> lcs = new List<SpreaderLegContract>();
for (uint i = 0; i < 3; i++) {
SpreaderLegContract lc = _generate_test_leg_contract(i);
lcs.Add(lc);
}
SpreaderContract sc = new SpreaderContract("TEST SPREADER", lcs);
return sc;
}
private SpreaderLegContract _generate_test_leg_contract(uint idx) {
SpreaderLegContract rv = new SpreaderLegContract();
rv.security = _securities.ElementAt(0);
rv.qty = 1;
rv.price_mult = 1;
rv.enable_quoting = true;
rv.lean_qty_factor = 2;
rv.md_type = SpreaderLegContract.MDType.Merged;
// quote
rv.quote_params = new SpreaderLegContract.QuoteParams();
rv.quote_params.qho_length = 0;
rv.quote_params.show_qty = new SpreaderLegContract.QuoteParams.ShowQty();
rv.quote_params.show_qty.show_qty = 10;
rv.quote_params.throttle = new SpreaderLegContract.QuoteParams.Throttle();
rv.quote_params.throttle.inside_ticks = 3;
rv.quote_params.throttle.outside_ticks = 2;
// pre hedge
rv.pre_hedge_params = new SpreaderLegContract.PreHedgeParams();
rv.pre_hedge_params.payless = new SpreaderLegContract.PreHedgeParams.PayLess();
rv.pre_hedge_params.payless.threshold = 1000;
rv.pre_hedge_params.payless.payless_ticks = 7;
rv.pre_hedge_params.payup = new SpreaderLegContract.PreHedgeParams.PayUp();
rv.pre_hedge_params.payup.threshold = 500;
rv.pre_hedge_params.payup.payup_ticks = 12;
// post hedge
rv.post_hedge_params = new SpreaderLegContract.PostHedgeParams();
rv.post_hedge_params.ticks_away_cross = new SpreaderLegContract.PostHedgeParams.TicksAwayCross();
rv.post_hedge_params.ticks_away_cross.threshold = 10;
rv.post_hedge_params.ticks_away_cross.cross_ticks = 3;
rv.post_hedge_params.time_based_cross = new SpreaderLegContract.PostHedgeParams.TimeBasedCross();
rv.post_hedge_params.time_based_cross.time_ms = 20;
rv.post_hedge_params.time_based_cross.cross_ticks = 5;
return rv;
}
}
};
@@ -0,0 +1,60 @@
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
@@ -0,0 +1,230 @@
using System;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
namespace SpreaderFrontEnd {
public static class SyntheticBookTest {
/// <summary>
/// Run synthetic book computation tests
/// </summary>
public static int run() {
// Seed the test with a standard butterfly spread. Leg size multipliers will be applied to
// each leg to generate more variations to test.
var legs = new List<SpreaderLegContract> {
new SpreaderLegContract() {
security = "Leg1Sec",
qty = 1
},
new SpreaderLegContract() {
security = "Leg2Sec",
qty = -2
},
new SpreaderLegContract() {
security = "Leg3Sec",
qty = 1
}
};
var leg_multipliers = new List<int> { 1, -1, 2, -2, 3, -3 };
var contract = new SpreaderContract("Test", legs);
// Define a book (seed) for each leg. Quantities will be added to each price level for each
// leg's book to generate more variations to test.
var leg1_book = new Book(
bids: new BookSide(levels: new List<PriceLevel> {
new PriceLevel(price: 3, qty: 10),
new PriceLevel(price: 2, qty: 4),
new PriceLevel(price: 1, qty: 6)
}),
asks: new BookSide(levels: new List<PriceLevel> {
new PriceLevel(price: 4, qty: 5),
new PriceLevel(price: 5, qty: 7),
new PriceLevel(price: 6, qty: 8)
}));
var leg2_book = new Book(
bids: new BookSide(levels: new List<PriceLevel> {
new PriceLevel(price: 3, qty: 1),
new PriceLevel(price: 2, qty: 7),
new PriceLevel(price: 1, qty: 2)
}),
asks: new BookSide(levels: new List<PriceLevel> {
new PriceLevel(price: 4, qty: 3),
new PriceLevel(price: 5, qty: 3),
new PriceLevel(price: 6, qty: 5)
}));
var leg3_book = new Book(
bids: new BookSide(levels: new List<PriceLevel> {
new PriceLevel(price: 3, qty: 2),
new PriceLevel(price: 2, qty: 1),
new PriceLevel(price: 1, qty: 8)
}),
asks: new BookSide(levels: new List<PriceLevel> {
new PriceLevel(price: 4, qty: 4),
new PriceLevel(price: 5, qty: 3),
new PriceLevel(price: 6, qty: 4)
}));
var level_qty_additions = new List<uint> { 1, 2, 3, 4 };
var leg_books = new List<Book> { leg1_book, leg2_book, leg3_book };
for (int i = 0; i < leg_multipliers.Count; i++) {
var leg_mult = leg_multipliers[i];
for (int j = 0; j < contract.spread_legs.Count; j++) {
// Apply leg mult
contract.spread_legs[j].qty *= leg_mult;
foreach (var lqa in level_qty_additions) {
foreach(var lb in leg_books) {
// Apply qty addition to bid-levels
for (int level_idx = 0; level_idx < lb.bids.levels.Count; level_idx++) {
var orig_level = lb.bids.levels[level_idx];
lb.bids.levels[level_idx] = orig_level.add_qty(lqa);
run(leg_books, contract);
// Subtract the qty that was just added so each qty addition is applied to
// the original level
lb.bids.levels[level_idx] = lb.bids.levels[level_idx].subtract_qty(lqa);
}
// Apply qty additions to ask-levels
for (int level_idx = 0; level_idx < lb.asks.levels.Count; level_idx++) {
var orig_level = lb.asks.levels[level_idx];
lb.asks.levels[level_idx] = orig_level.add_qty(lqa);
run(leg_books, contract);
// Subtract the qty that was just added so each qty addition is applied to
// the original level
lb.asks.levels[level_idx] = lb.asks.levels[level_idx].subtract_qty(lqa);
}
}
}
// Divide by leg_mult so the each mult is applied to the original leg
contract.spread_legs[j].qty /= leg_mult;
}
}
return 0;
}
public static void run(List<Book> leg_books, SpreaderContract contract) {
var synth_book = SpreaderBookCalculator.compute_spreader_book(contract, leg_books);
for (int i = 0; i < contract.spread_legs.Count; i++) {
Console.WriteLine($"Leg{i} (qty {contract.spread_legs[i].qty}): {leg_books[i]}");
}
Console.WriteLine($"Synthetic Book: {synth_book}");
var leg_book_tups = _to_leg_book_tuples(leg_books, contract);
var expected_book = _compute_synth_book(leg_book_tups);
Console.WriteLine($"Expected Book: {expected_book}");
Debug.Assert(expected_book.Equals(synth_book));
}
static List<Tuple<Book, int>> _to_leg_book_tuples(List<Book> leg_books, SpreaderContract contract) {
Debug.Assert(leg_books.Count == contract.spread_legs.Count);
var rv = new List<Tuple<Book, int>>();
for (int i = 0; i < leg_books.Count; i++) {
rv.Add(Tuple.Create(leg_books[i], contract.spread_legs[i].qty));
}
return rv;
}
static List<Tuple<BookSide, int>> _to_leg_book_side_tuples(List<Tuple<Book, int>> leg_books, bool is_bid) {
var leg_book_tups = new List<Tuple<BookSide, int>>();
for (int i = 0; i < leg_books.Count; i++) {
var leg_size = leg_books[i].Item2;
var leg_book = leg_books[i].Item1;
var is_buy_leg = leg_size > 0;
var leg_book_side = is_buy_leg == is_bid ? leg_book.bids : leg_book.asks;
leg_book_tups.Add(Tuple.Create(leg_book_side, leg_size));
}
return leg_book_tups;
}
static Book _compute_synth_book(List<Tuple<Book, int>> leg_books) {
var leg_bids = _to_leg_book_side_tuples(leg_books, true);
var leg_asks = _to_leg_book_side_tuples(leg_books, false);
var synth_bids = _compute_synth_book_side(leg_bids);
var synth_asks = _compute_synth_book_side(leg_asks);
return new Book(synth_bids, synth_asks);
}
// <summary>
// Computes the synthetic book in a simple/unoptimized way, to ensure correctness. Books
// generated by the 'optimized' routine, which will be used in practice, should match those
// generated by this one.
// </summary>
static BookSide _compute_synth_book_side(IEnumerable<Tuple<BookSide, int>> leg_books) {
// Clone the books so we can mutate them without changing the input 'leg_books'
var leg_books_list = leg_books.Select(lb => Tuple.Create(lb.Item1.Clone(), lb.Item2)).ToList();
var levels = new List<PriceLevel>();
var top_level = _get_top_level(leg_books_list);
while (top_level.qty > 0) {
levels.Add(top_level);
foreach (var lb in leg_books_list) {
_remove_qty_from_top(lb.Item1, (int)(top_level.qty * Math.Abs(lb.Item2)));
}
top_level = _get_top_level(leg_books_list);
}
return new BookSide(levels);
}
static PriceLevel _get_top_level(IEnumerable<Tuple<BookSide, int>> leg_books) {
var leg_sizes = leg_books.Select(lb => lb.Item2).ToList();
var top_levels = leg_books.Select(_get_top_level).ToList();
var qty = top_levels.Select(l => l.qty).Min();
if (qty == 0) {
return PriceLevel.empty;
}
double price = 0;
for (int i = 0; i < top_levels.Count; i++) {
var leg_price = top_levels[i].price;
var leg_size = leg_sizes[i];
if (leg_size < 0) {
price -= leg_price;
} else {
price += leg_price;
}
}
return new PriceLevel(price, qty);
}
static PriceLevel _get_top_level(Tuple<BookSide, int> leg_book) {
return _get_top_level(leg_book.Item1, leg_book.Item2);
}
static PriceLevel _get_top_level(BookSide book, int leg_size) {
if (book.levels.Count == 0) {
return PriceLevel.empty;
}
var first_level = book.levels.First();
var abs_leg_size = Math.Abs(leg_size);
if (first_level.qty >= abs_leg_size) {
return new PriceLevel(first_level.price * abs_leg_size, (uint)(first_level.qty / abs_leg_size));
}
double price = first_level.qty * first_level.price;
var qty_rem = abs_leg_size - first_level.qty;
for (int i = 1; i < book.levels.Count; i++) {
var level = book.levels[i];
if (level.qty >= qty_rem) {
price += qty_rem * level.price;
return new PriceLevel(price, 1);
}
price += level.qty * level.price;
qty_rem -= level.qty;
}
return PriceLevel.empty;
}
/// <summary>
/// Removes the specified quantity from the top of the book
/// </summary>
static void _remove_qty_from_top(BookSide book, int qty) {
var subtracted_qty = 0;
while (subtracted_qty < qty && book.levels.Count > 0) {
var first_level = book.levels[0];
var qty_to_subtract = qty - subtracted_qty;
if (first_level.qty > qty_to_subtract) {
first_level = first_level.subtract_qty((uint)qty_to_subtract);
book.levels[0] = first_level;
return;
}
book.levels.RemoveAt(0);
subtracted_qty += (int)first_level.qty;
}
}
}
}
@@ -0,0 +1,78 @@
using System;
using System.Reflection;
using System.Runtime.Serialization.Formatters.Binary;
using System.IO;
namespace SpreaderFrontEnd
{
public class Utils
{
public static void bin_serialize<T>(T t, Stream str)
{
#pragma warning disable SYSLIB0011
BinaryFormatter bf = new BinaryFormatter();
bf.Serialize(str, t);
#pragma warning restore SYSLIB0011
}
public static T bin_deserialize<T>(Stream str)
{
#pragma warning disable SYSLIB0011
BinaryFormatter bf = new BinaryFormatter();
T rv = (T)bf.Deserialize(str);
#pragma warning restore SYSLIB0011
return rv;
}
public static T? basic_deep_clone<T>(T t)
{
try
{
MemoryStream str = new MemoryStream();
bin_serialize(t, str);
str.Position = 0;
return bin_deserialize<T>(str);
}
catch
{
return default(T);
}
}
public static object? CloneObject(object objSource)
{
//step : 1 Get the type of source object and create a new instance of that type
Type typeSource = objSource.GetType();
object? objTarget = Activator.CreateInstance(typeSource);
//Step2 : Get all the properties of source object type
PropertyInfo[] propertyInfo = typeSource.GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
//Step : 3 Assign all source property to taget object 's properties
foreach (PropertyInfo property in propertyInfo)
{
//Check whether property can be written to
if (property.CanWrite)
{
//Step : 4 check whether property type is value type, enum or string type
if (property.PropertyType.IsValueType || property.PropertyType.IsEnum || property.PropertyType.Equals(typeof(System.String)))
{
property.SetValue(objTarget, property.GetValue(objSource, null), null);
}
//else property type is object/complex types, so need to recursively call this method until the end of the tree is reached
else
{
object? objPropertyValue = property.GetValue(objSource, null);
if (objPropertyValue == null)
{
property.SetValue(objTarget, null, null);
}
else
{
property.SetValue(objTarget, CloneObject(objPropertyValue), null);
}
}
}
}
return objTarget;
}
}
}
@@ -0,0 +1,23 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v6.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v6.0": {
"SpreaderFrontEnd/1.0.0": {
"runtime": {
"SpreaderFrontEnd.dll": {}
}
}
}
},
"libraries": {
"SpreaderFrontEnd/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}
@@ -0,0 +1,15 @@
{
"runtimeOptions": {
"tfm": "net6.0",
"frameworks": [
{
"name": "Microsoft.NETCore.App",
"version": "6.0.0"
},
{
"name": "Microsoft.WindowsDesktop.App",
"version": "6.0.0"
}
]
}
}
+54
View File
@@ -0,0 +1,54 @@
{
"FormattingOptions": {
"NewLine": "\n",
"UseTabs": false,
"TabSize": 3,
"IndentationSize": 3,
"SpacingAfterMethodDeclarationName": false,
"SpaceWithinMethodDeclarationParenthesis": false,
"SpaceBetweenEmptyMethodDeclarationParentheses": false,
"SpaceAfterMethodCallName": false,
"SpaceWithinMethodCallParentheses": false,
"SpaceBetweenEmptyMethodCallParentheses": false,
"SpaceAfterControlFlowStatementKeyword": true,
"SpaceWithinExpressionParentheses": false,
"SpaceWithinCastParentheses": false,
"SpaceWithinOtherParentheses": false,
"SpaceAfterCast": false,
"SpacesIgnoreAroundVariableDeclaration": false,
"SpaceBeforeOpenSquareBracket": false,
"SpaceBetweenEmptySquareBrackets": false,
"SpaceWithinSquareBrackets": false,
"SpaceAfterColonInBaseTypeDeclaration": true,
"SpaceAfterComma": true,
"SpaceAfterDot": false,
"SpaceAfterSemicolonsInForStatement": true,
"SpaceBeforeColonInBaseTypeDeclaration": true,
"SpaceBeforeComma": false,
"SpaceBeforeDot": false,
"SpaceBeforeSemicolonsInForStatement": false,
"SpacingAroundBinaryOperator": "single",
"IndentBraces": false,
"IndentBlock": true,
"IndentSwitchSection": true,
"IndentSwitchCaseSection": true,
"LabelPositioning": "oneLess",
"WrappingPreserveSingleLine": true,
"WrappingKeepStatementsOnSingleLine": true,
"NewLinesForBracesInTypes": false,
"NewLinesForBracesInMethods": false,
"NewLinesForBracesInProperties": false,
"NewLinesForBracesInAccessors": false,
"NewLinesForBracesInAnonymousMethods": false,
"NewLinesForBracesInControlBlocks": false,
"NewLinesForBracesInAnonymousTypes": false,
"NewLinesForBracesInObjectCollectionArrayInitializers": false,
"NewLinesForBracesInLambdaExpressionBody": false,
"NewLineForElse": false,
"NewLineForCatch": false,
"NewLineForFinally": false,
"NewLineForMembersInObjectInit": true,
"NewLineForMembersInAnonymousTypes": true,
"NewLineForClausesInQuery": true
}
}
+120
View File
@@ -0,0 +1,120 @@
FROM spark-crypto_18.04
RUN \
DEBIAN_FRONTEND=noninteractive apt-get update \
&& apt-get install -y \
htop \
locales \
source-highlight \
powerline \
fonts-powerline
# Hide these in the .docker directory to avoid conflicts with existing repos on
# this computer (in case a parent dir, such as $HOME, is mounted inside a
# container)
ARG repo_root="/home/john/Documents/repos/.docker"
# Create dirs for public/private repos
USER john
RUN \
mkdir -p $repo_root/public \
&& mkdir -p $repo_root/private
## Get latest fish (build from source)
# 1) get build deps
USER root
RUN \
DEBIAN_FRONTEND=noninteractive apt-get update \
&& apt-get install -y software-properties-common
RUN \
apt-add-repository ppa:fish-shell/release-3 \
&& sed -i "s/^# deb/deb/g" /etc/apt/sources.list
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get build-dep -y fish
# 2) Clone repo
USER john
RUN \
cd $repo_root/public \
&& git clone https://github.com/fish-shell/fish-shell.git
RUN \
cd $repo_root/public/fish-shell \
&& mkdir build \
&& cd build \
&& cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_DOCS=0 .. \
&& cmake --build .
# Switch to root, rather than running inline w/ sudo cmd, to avoid having to
# enter a password
USER root
RUN \
cd $repo_root/public/fish-shell/build \
&& make install
USER john
## Get oh-my-fish
RUN \
cd $repo_root/public \
&& git clone https://github.com/oh-my-fish/oh-my-fish.git
RUN \
cd $repo_root/public/oh-my-fish \
&& ./bin/install --noninteractive --yes
## Get my fish config
RUN \
cd $repo_root/private \
&& git clone https://github.com/johncolvin-og/myfishconfig
RUN \
cd $repo_root/private/myfishconfig \
&& cp src/config.fish /home/john/.config/fish/ \
&& cp src/aliases.fish /home/john/.config/fish/ \
&& cp -r src/functions /home/john/.config/fish/ \
&& cp -r src/themes/johncolvin /home/john/.local/share/omf/themes/ \
&& fish --command "omf theme johncolvin"
## Get my bash config (back up existing)
RUN \
cd $repo_root/private \
&& git clone https://github.com/johncolvin-og/mybashconfig \
&& cd mybashconfig \
&& cp src/* /home/john/
# Get vim files/tools
USER root
RUN \
DEBIAN_FRONTEND=noninteractive apt-get update \
&& apt-get install -y curl
USER john
RUN curl -fLo home/john/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
# Some fonts look sketchy if the language isn't set to english:
# * The powerline git glyphs in the fish prompt are all displayed as question
# marks.
#
# * The shell confuses the position of the cursor, so characters are left
# around when they should have been cleared, and the cursor's home position
# is pushed one or two places to the right.
#
# * Most likely, the bad cursor position is caused by some dependencies the
# interpretation of escape sequences have on the language setting. At this
# point I don't even care anymore (literally took 8 hours to figure this
# out). I just know this shit is needed to make the prompt work correctly.
USER root
RUN locale-gen "en_US.UTF-8"
USER john
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN fc-cache -vf
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/env fish
set this_dir (realpath (dirname (status -f)))
set image_working_dir (realpath "$this_dir/../..")
set image_name $argv[1]
if test (count $argv) -eq 0
set image_name_cmd "$this_dir/docker_image_name.fish"
set image_name (eval $image_name_cmd)
end
docker build \
-f "$this_dir/Dockerfile" \
-t "$image_name" \
"$image_working_dir"
+11
View File
@@ -0,0 +1,11 @@
#!/usr/bin/env fish
if test (count $argv) -gt 0
echo $argv
exit 0
end
set image_name_cmd (realpath (dirname (status -f)))"/docker_image_name.fish"
set image_name (eval $image_name_cmd)
echo $image_name
+4
View File
@@ -0,0 +1,4 @@
#!/usr/bin/env fish
echo "$USER""s_"(basename (git rev-parse --show-toplevel))"-dev"
+12
View File
@@ -0,0 +1,12 @@
#!/usr/bin/env fish
set inst_name $argv[1]
if test (count $argv) -eq 0
set script_dir (realpath (dirname (status -f)))
set inst_name (eval $script_dir"/docker_container_name.fish")
end
set working_dir (realpath (pwd))
echo $inst_name
docker exec -w $working_dir -it "$inst_name" bash
+146
View File
@@ -0,0 +1,146 @@
#!/usr/bin/env fish
function print_help_and_exit
echo "\
Usage: setup_builds.sh [OPTIONS] compiler build-type
Positionals:
gcc Compile with gcc
clang Compile with clang
debug Build debug
release Build release
Options:
--compiler <clang|gcc> Specify the compiler
--type <debug|release> Specify the type of build
-f,--force Overwrite existing build directories
-h,--help Print this help message and exit
"
exit $argv[1]
end
function assert_dir
if test ! -d "$argv[1]"
if test -n "$argv[2]"
echo "Invalid variable "$argv[2]": '"$argv[1]"' is not a directory"
else
echo "'"$argv[1]"' is not a directory"
end
exit 1
end
end
# common variables
set tools_path (realpath (dirname (status -f)))
set spartan_path_cmd $tools_path/spartan_path.fish
set repo_root (eval $spartan_path_cmd "repo-root")
set build_root "$repo_root"/"build"
mkdir -p "$build_root"
# Initialize the build directory. Expected arguments: <compiler>, <build_type>
# Note: this method assumes the variables 'repot_root' and 'build_root' have
# already been properly initialized
function setup_build
assert_dir $repo_root
assert_dir $build_root
set compiler "$argv[1]"
set build_type "$argv[2]"
if test \( -z "$build_type" \) -o \( \( "$build_type" != debug \) -a \( "$build_type" != release \) \)
print_help_and_exit 1
end
if test "$build_type" = debug
set build_type_arg Debug
if test "$compiler" = gcc
set compiler_arg "/usr/lib/ccache/g++"
else
# set compiler_arg "/usr/lib/ccache/clang++"
set compiler_arg "clang++"
end
else if test "$build_type" = release
set build_type_arg Release
if test "$compiler" = gcc
set compiler_arg "g++"
else
set compiler_arg "clang++"
end
end
if test \( -z "$compiler" \) -o \( \( "$compiler" != gcc \) -a \( "$compiler" != clang \) \)
print_help_and_exit 1
end
set build_dest $build_root"/"$compiler"/"$build_type
echo "Set up build: "$compiler" "$build_type
if test \( -z "$force" \) -a \( -d $build_dest \)
echo "The build directory '"$build_dest"' already exists (use -f to overwrite)"
return 1
end
rm -rf "$build_dest"
mkdir -p "$build_dest"
cd "$build_dest"
cmake -G Ninja -DCMAKE_BUILD_TYPE=$build_type_arg -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_CXX_COMPILER=$compiler_arg $repo_root
end
# The while loop below removes arguments (via shift) as it parses them.
# Additional information that needs to be extracted from the arguments must be
# done so before the loop is executed.
set i 1
while test $i -le (count $argv)
switch $argv[$i]
case --compiler
set i (math "$i + 1")
set compiler $argv[$i]
case clang
set compiler clang
case gcc
set compiler gcc
case --type
set i (math "$i + 1")
set build_type $argv[$i]
case release
set build_type release
case debug
set build_type debug
case -f
set force 1
case --force
set force 1
case -h
print_help_and_exit 0
case --help
print_help_and_exit 0
case '*'
print_help_and_exit 1
end
set i (math "$i + 1")
end
echo "compiler in "$compiler
echo "build type in "$build_type
if test -n "$compiler"
if test -n "$build_type"
setup_build $compiler $build_type
else
# all builds for the specified compiler
setup_build $compiler debug
setup_build $compiler release
end
else if test -n "$build_type"
# all builds for the specified build type
setup_build gcc $build_type
setup_build clang $build_type
else
# all builds
setup_build gcc debug
setup_build gcc release
setup_build clang debug
setup_build clang release
end
+153
View File
@@ -0,0 +1,153 @@
#!/usr/bin/env fish
function print_help_and_exit
echo "\
Usage: setup_builds.sh [OPTIONS] compiler build-type
Positionals:
gcc Compile with gcc
clang Compile with clang
debug Build debug
release Build release
Options:
--compiler <clang|gcc> Specify the compiler
--type <debug|release> Specify the type of build
-f,--force Overwrite existing build directories
-h,--help Print this help message and exit
"
exit $argv[1]
end
function assert_dir
if test ! -d "$argv[1]"
if test -n "$argv[2]"
echo "Invalid variable "$argv[2]": '"$argv[1]"' is not a directory"
else
echo "'"$argv[1]"' is not a directory"
end
exit 1
end
end
# common variables
#set tools_path (readlink -f (pwd))
#set tools_path (cd (dirname (status --current-filename)); and pwd)
set tools_path (realpath (dirname (status -f)))
set spartan_path_cmd $tools_path/spartan_path.fish
set repo_root (eval $spartan_path_cmd "repo-root")
# Don't call 'spartan_path_cmd "build"' bc it returns specific build path
# (i.e., for a particular compiler/build type), not the root build path
# set build_root (eval $spartan_path_cmd "build")
set build_root "$repo_root"/"build"
mkdir -p "$build_root"
# Initialize the build directory. Expected arguments: <compiler>, <build_type>
# Note: this method assumes the variables 'repot_root' and 'build_root' have
# already been properly initialized
function setup_build
assert_dir $repo_root
assert_dir $build_root
set compiler "$argv[1]"
set build_type "$argv[2]"
if test \( -z "$build_type" \) -o \( \( "$build_type" != "debug" \) -a \( "$build_type" != "release" \) \)
print_help_and_exit 1
end
if test "$build_type" = "debug"
set build_type_arg "Debug"
if test "$compiler" = "gcc"
set compiler_arg "/usr/lib/ccache/g++"
else
set compiler_arg "/usr/lib/ccache/clang++"
end
else if test "$build_type" = "release"
set build_type_arg "Release"
if test "$compiler" = "gcc"
set compiler_arg "g++"
else
set compiler_arg "clang++"
end
end
if test \( -z "$compiler" \) -o \( \( "$compiler" != "gcc" \) -a \( "$compiler" != "clang" \) \)
print_help_and_exit 1
end
set build_dest $build_root"/"$compiler"/"$build_type
set conan_dest $repo_root"/conan/"$compiler"_"$build_type
echo "Set up build: "$compiler" "$build_type
if test \( -z "$force" \) -a \( -d $build_dest \)
echo "The build directory '"$build_dest"' already exists (use -f to overwrite)"
return 1
end
rm -rf "$build_dest"
mkdir -p "$build_dest"
mkdir -p "$conan_dest"
cd "$build_dest"
conan install --build missing --profile $conan_dest $repo_root
cmake -G Ninja -DCMAKE_BUILD_TYPE=$build_type_arg -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_CXX_COMPILER=$compiler_arg $repo_root
end
# The while loop below removes arguments (via shift) as it parses them.
# Additional information that needs to be extracted from the arguments must be
# done so before the loop is executed.
set i 1
while test $i -le (count $argv)
switch $argv[$i]
case '--compiler'
set i (math "$i + 1")
set compiler $argv[$i]
case 'clang'
set compiler 'clang'
case 'gcc'
set compiler 'gcc'
case '--type'
set i (math "$i + 1")
set build_type $argv[$i]
case 'release'
set build_type 'release'
case 'debug'
set build_type 'debug'
case '-f'
set force 1
case '--force'
set force 1
case '-h'
print_help_and_exit 0
case '--help'
print_help_and_exit 0
case '*'
print_help_and_exit 1
end
set i (math "$i + 1")
end
echo "compiler in "$compiler
echo "build type in "$build_type
if test -n "$compiler"
if test -n "$build_type"
setup_build $compiler $build_type
else
# all builds for the specified compiler
setup_build $compiler "debug"
setup_build $compiler "release"
end
else if test -n "$build_type"
# all builds for the specified build type
setup_build "gcc" $build_type
setup_build "clang" $build_type
else
# all builds
setup_build "gcc" "debug"
setup_build "gcc" "release"
setup_build "clang" "debug"
setup_build "clang" "release"
end
+92
View File
@@ -0,0 +1,92 @@
#!/usr/bin/env fish
#basename (git rev-parse --show-toplevel)
function print_help_and_exit
echo "\
Print paths to core parts of the repository
Usage: sparkd_path.sh SUBCOMMAND
Subcommands:
build Print build path
repo-root Print repo root path
"
exit $argv[1]
end
function print_build_help_and_exit
echo "\
Print build path
Usage: sparkd_path.sh build [OPTIONS] compiler build-type
Positionals:
gcc Print gcc build path
clang Print clang build path
debug Print debug build path
release Print release build path
Options:
--compiler <clang|gcc> Specify the compiler
--type <debug|release> Specify the type of build
-h,--help Print this help message and exit
"
exit $argv[1]
end
function print_repo_root
git rev-parse --show-toplevel
end
function run_repo_root
print_repo_root
end
function run_build
set compiler "gcc"
set build_type "release"
set i 1
while test $i -lt (count $argv)
switch $argv[$i]
case '--compiler'
set i (math "$i + 1")
set compiler $argv[$i]
case 'clang'
set compiler 'clang'
case 'gcc'
set compiler 'gcc'
case '--type'
set i (math "$i + 1")
set build_type $argv[$i]
case 'release'
set build_type 'release'
case 'debug'
set build_type 'debug'
'-h'
print_build_help_and_exit 0
'--help'
print_build_help_and_exit 0
'*'
print_build_help_and_exit 1
end
set i (math "$i + 1")
end
if test \( $compiler = "clang" \) -o \( $compiler = "gcc" \)
set comp_path $compiler
else
print_build_help_and_exit 1
end
set src_root (print_repo_root)
set build_root (readlink -f "$src_root""/build")
set build_dest $build_root"/"$compiler"/"$build_type
echo $build_dest
end
if test "$argv[1]" = "repo-root"
print_repo_root $argv[2..-1]
else if test "$argv[1]" = "build"
run_build $argv[2..-1]
else
print_help_and_exit 1
end
+43
View File
@@ -0,0 +1,43 @@
#!/usr/bin/env fish
set image_name $argv[1]
set cont_name $argv[2]
if test (count $argv) -lt 2
if test (count $argv) -lt 1
set image_name_cmd (realpath (dirname (status -f)))"/docker_image_name.fish"
set image_name (eval $image_name_cmd)
end
set cont_name_cmd (realpath (dirname (status -f)))"/docker_container_name.fish "$image_name
set cont_name (eval $cont_name_cmd)
end
set working_dir (realpath (pwd))
set home_path /home/john
set repo_path (git rev-parse --show-toplevel)
set repo_path_out /home/john/Documents/repos/bts/(basename $repo_path)
set working_dir $repo_path_out
echo "starting docker instance '"$cont_name"' (image '"$image_name"')"
echo "working dir "$working_dir
docker run \
--rm \
--net host \
-h (hostname) \
-e "TZ=America/New_York" \
--cap-add=SYS_PTRACE \
--security-opt seccomp=unconfined \
--name $cont_name \
-v $repo_path:$repo_path_out \
-u (id -u $USER) \
-w $working_dir \
--shm-size=4024m \
-t \
-i \
-d \
-e DISPLAY="$DISPLAY" \
"$image_name" \
bash
@@ -5,7 +5,9 @@
"includePath": [
"/usr/include",
"/usr/local/include",
"${workspaceRoot}"
"${workspaceRoot}",
"${workspaceFolder}/src",
"${workspaceRoot}/externals/linux/include"
],
"defines": [],
"intelliSenseMode": "clang-x64",
@@ -13,13 +15,16 @@
"path": [
"/usr/include",
"/usr/local/include",
"${workspaceRoot}"
"${workspaceRoot}",
"${workspaceFolder}/src",
"${workspaceRoot}/externals/linux/include"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
},
"cStandard": "c11",
"cppStandard": "c++17"
"cppStandard": "c++17",
"compileCommands": "${workspaceFolder}/build/ninja_debug/compile_commands.json"
},
{
"name": "Windows",
+513
View File
@@ -0,0 +1,513 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Spark Local",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/build/gcc/debug/server/sparkd",
"args": [
"run",
"test",
"-a",
"OutrightVanillaOrder"
],
"stopAtEntry": false,
"cwd": "${workspaceRoot}/build/gcc/debug/server/",
"environment": [
{
"name": "TZ",
"value": "America/Chicago"
}
],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "SparkVM Launch",
"type": "cppdbg",
"request": "launch",
"program": "/home/bts/spark/build/gcc/debug/server/sparkd",
"args": [
"test",
"-a",
"[ilink3]"
],
"stopAtEntry": false,
"cwd": "/home/bts/spark/build/gcc/debug/server/",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"preLaunchTask": "",
"logging": {
"engineLogging": false
},
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "enable pretty-printer",
"ignoreFailures": true
},
{
"description": "Skip STL",
"text": "skip -gfi /usr/include/c++/7/bits/*.h",
"ignoreFailures": true
},
{
"description": "LD LIBRARY",
"text": "set env LD_LIBRARY_PATH=.",
"ignoreFailures": false
}
],
"pipeTransport": {
"pipeCwd": "${workspaceRoot}",
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
"pipeArgs": [
"bts@sparkvm"
],
"debuggerPath": "/usr/bin/gdb"
},
"sourceFileMap": {
"/home/bts/spark/": "${workspaceRoot}"
}
},
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/build/gcc/debug/server/sparkd/sparkd",
"args": [
"run"
],
"stopAtEntry": false,
"cwd": "${workspaceRoot}/build/gcc/debug/src/server/sparkd",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "Client Launch",
"type": "clr",
"request": "launch",
"program": "${workspaceRoot}/build/Debug/bin/net471/spark.exe",
"args": [],
"cwd": "${workspaceRoot}",
"stopAtEntry": false,
"externalConsole": true,
"requireExactSource": false
},
{
"name": "SDK Launch",
"type": "clr",
"request": "launch",
"program": "${workspaceRoot}/build/Debug/bin/net471/spark_sdk.exe",
"args": [
"md",
"GLBX",
"Future",
"CL",
"CLZ9",
"--user=bts",
"--pass="
],
"cwd": "${workspaceRoot}",
"stopAtEntry": false,
"externalConsole": true,
"requireExactSource": false
},
{
"name": "Excel Launch",
"type": "clr",
"request": "launch",
"program": "C:/Program Files/Microsoft Office/Office14/EXCEL.EXE",
"args": [
"${workspaceRoot}/build/Debug/bin/net471/spark_excel-addin64-packed.xll"
],
"cwd": "${workspaceRoot}",
"stopAtEntry": false,
"externalConsole": true,
"requireExactSource": false
},
{
"name": "Client Tests",
"type": "clr",
"request": "launch",
"program": "${workspaceRoot}/build/Debug/bin/net471/sparkcmd.exe",
"args": [
"test",
"ApiUpdateTests"
],
"cwd": "${workspaceRoot}",
"stopAtEntry": false,
"externalConsole": true,
"requireExactSource": false
},
{
"name": "Client Attach",
"type": "clr",
"request": "attach",
"processId": "${command:pickProcess}"
},
{
"name": "Spreader Tests",
"type": "cppdbg",
"request": "launch",
"program": "/home/bts/spark/build/gcc/debug/server/sparkd",
"args": [
"test",
"[spreader]"
],
"stopAtEntry": false,
"cwd": "/home/bts/spark/build/gcc/debug/server/",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"preLaunchTask": "",
"logging": {
"engineLogging": false
},
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "enable pretty-printer",
"ignoreFailures": true
}
],
"pipeTransport": {
"pipeCwd": "${workspaceRoot}",
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
"pipeArgs": [
"bts@sparkvm"
],
"debuggerPath": "/usr/bin/gdb"
},
"sourceFileMap": {
"/home/bts/spark/": "${workspaceRoot}"
}
},
{
"name": "MD Synthetic Tests",
"type": "cppdbg",
"request": "launch",
"program": "/home/bts/spark/build/gcc/debug/server/sparkd",
"args": [
"test",
"[md][synthetic]"
],
"stopAtEntry": false,
"cwd": "/home/bts/spark/build/gcc/debug/server/",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"preLaunchTask": "",
"logging": {
"engineLogging": false
},
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "enable pretty-printer",
"ignoreFailures": true
}
],
"pipeTransport": {
"pipeCwd": "${workspaceRoot}",
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
"pipeArgs": [
"bts@sparkvm"
],
"debuggerPath": "/usr/bin/gdb"
},
"sourceFileMap": {
"/home/bts/spark/": "${workspaceRoot}"
}
},
{
"name": "Spartan Tests",
"type": "cppdbg",
"request": "launch",
"program": "/home/bts/spark/build/gcc/debug/server/sparkd",
"args": [
"test",
"[spartan_md]"
],
"stopAtEntry": false,
"cwd": "/home/bts/spark/build/gcc/debug/server/",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"preLaunchTask": "",
"logging": {
"engineLogging": false
},
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "enable pretty-printer",
"ignoreFailures": true
}
],
"pipeTransport": {
"pipeCwd": "${workspaceRoot}",
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
"pipeArgs": [
"bts@sparkvm"
],
"debuggerPath": "/usr/bin/gdb"
},
"sourceFileMap": {
"/home/bts/spark/": "${workspaceRoot}"
}
},
{
"name": "Matcher Tests",
"type": "cppdbg",
"request": "launch",
"program": "/home/bts/spark/build/gcc/debug/server/sparkd",
"args": [
"test",
"[matcher]"
],
"stopAtEntry": false,
"cwd": "/home/bts/spark/build/gcc/debug/server/",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"preLaunchTask": "",
"logging": {
"engineLogging": false
},
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "enable pretty-printer",
"ignoreFailures": true
}
],
"pipeTransport": {
"pipeCwd": "${workspaceRoot}",
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
"pipeArgs": [
"bts@sparkvm"
],
"debuggerPath": "/usr/bin/gdb"
},
"sourceFileMap": {
"/home/bts/spark/": "${workspaceRoot}"
}
},
{
"name": "Admin Service Tests",
"type": "cppdbg",
"request": "launch",
"program": "/home/bts/spark/build/gcc/debug/src/server/sparkd/sparkd",
"args": [
"test",
"[admin_service]"
],
"stopAtEntry": false,
"cwd": "/home/bts/spark/build/gcc/debug/src/server/sparkd/",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"preLaunchTask": "",
"logging": {
"engineLogging": false
},
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "enable pretty-printer",
"ignoreFailures": true
}
],
"pipeTransport": {
"pipeCwd": "${workspaceRoot}",
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
"pipeArgs": [
"bts@sparkvm"
],
"debuggerPath": "/usr/bin/gdb"
},
"sourceFileMap": {
"/home/bts/spark/": "${workspaceRoot}"
}
},
{
"name": "Limiter Tests",
"type": "cppdbg",
"request": "launch",
"program": "/home/bts/spark/build/gcc/debug/src/server/sparkd/sparkd",
"args": [
"test",
"[limiter]"
],
"stopAtEntry": false,
"cwd": "/home/bts/spark/build/gcc/debug/src/server/sparkd/",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"preLaunchTask": "",
"logging": {
"engineLogging": false
},
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "enable pretty-printer",
"ignoreFailures": true
}
],
"pipeTransport": {
"pipeCwd": "${workspaceRoot}",
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
"pipeArgs": [
"bts@sparkvm"
],
"debuggerPath": "/usr/bin/gdb"
},
"sourceFileMap": {
"/home/bts/spark/": "${workspaceRoot}"
}
},
{
"name": "MD Tests",
"type": "cppdbg",
"request": "launch",
"program": "/home/bts/spark/build/gcc/debug/server/sparkd",
"args": [
"test",
"[algo]"
],
"stopAtEntry": false,
"cwd": "/home/bts/spark/build/gcc/debug/server/",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"preLaunchTask": "",
"logging": {
"engineLogging": false
},
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Skip STL",
"text": "skip -gfi /usr/include/c++/7/bits/*.h",
"ignoreFailures": true
}
],
"pipeTransport": {
"pipeCwd": "${workspaceRoot}",
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
"pipeArgs": [
"bts@sparkvm"
],
"debuggerPath": "/usr/bin/gdb"
},
"sourceFileMap": {
"/home/bts/spark/": "${workspaceRoot}"
}
},
{
"name": "SparkVM attach",
"type": "cppdbg",
"request": "attach",
"program": "/home/bts/spark/build/gcc/debug/src/server/sparkd/sparkd",
"processId": "${command:pickRemoteProcess}",
"MIMode": "gdb",
"pipeTransport": {
"pipeCwd": "${workspaceRoot}",
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
"pipeArgs": [
"bts@sparkvm"
],
"debuggerPath": "/usr/bin/gdb"
},
"sourceFileMap": {
"/home/bts/spark/": "${workspaceRoot}"
}
},
{
"name": "Python",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"python": "${command:python.interpreterPath}",
"program": "${file}",
"cwd": "${workspaceRoot}",
"env": {},
"envFile": "${workspaceRoot}/.env",
"args": [
"DEBUG"
],
"debugOptions": [
"WaitOnAbnormalExit",
"WaitOnNormalExit",
"RedirectOutput"
]
},
{
"name": ".NET Core Remote Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickRemoteProcess}",
"pipeTransport": {
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
"pipeArgs": [
"bts@sparkvm"
],
"debuggerPath": "/home/bts/vsdbg/vsdbg",
"pipeCwd": "${workspaceRoot}",
"quoteArgs": true
},
"sourceFileMap": {
"/home/bts/spark/": "${workspaceRoot}"
},
"justMyCode": true
},
{
"name": ".NET Core Remote Launch",
"type": "coreclr",
"request": "launch",
"program": "/usr/bin/dotnet",
"args": [
"sparkcmd.dll",
"test",
"test_join_create_and_takeout_market"
],
"stopAtEntry": false,
"cwd": "/home/bts/spark/build/gcc/debug/server",
"pipeTransport": {
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
"pipeArgs": [
"bts@sparkvm"
],
"debuggerPath": "/home/bts/vsdbg/vsdbg",
"pipeCwd": "${workspaceRoot}",
"quoteArgs": true
},
"sourceFileMap": {
"/home/bts/spark/": "${workspaceRoot}"
},
"justMyCode": false
},
]
}
+16
View File
@@ -0,0 +1,16 @@
{
"files.associations": {
"utility": "cpp",
"initializer_list": "cpp",
"list": "cpp",
"type_traits": "cpp",
"vector": "cpp",
"xhash": "cpp",
"xstring": "cpp",
"system_error": "cpp",
"array": "cpp",
"string_view": "cpp",
"xutility": "cpp",
"*.ipp": "cpp"
}
}
+41
View File
@@ -0,0 +1,41 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Touch CMakeLists.txt",
"type": "process",
"promptOnClose": false,
"isBackground": true,
"command": "touch",
"args": ["${workspaceRoot}/CMakeLists.txt"],
"problemMatcher": [],
"presentation": {
"echo": false,
"revealProblems": "onProblem",
"reveal": "silent",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true
}
}
],
"inputs": [
{
"id": "build_configuration",
"type": "pickString",
"default": "debug",
"description": "Configuration:",
"options": ["debug", "release"]
},
{
"id": "compiler",
"type": "pickString",
"default": "gcc",
"description": "Compiler",
"options": ["clang", "gcc"]
}
]
}
+107
View File
@@ -0,0 +1,107 @@
{
"configurations": [
{
"name": "Linux",
"includePath": [
"/usr/include",
"/usr/local/include",
"${workspaceRoot}",
"${workspaceFolder}/src",
"${workspaceRoot}/externals/linux/include"
],
"defines": [],
"intelliSenseMode": "clang-x64",
"browse": {
"path": [
"/usr/include",
"/usr/local/include",
"${workspaceRoot}",
"${workspaceFolder}/src",
"${workspaceRoot}/externals/linux/include"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
},
"cStandard": "c11",
"cppStandard": "c++17",
"compileCommands": "${workspaceFolder}/build/ninja_debug/compile_commands.json"
},
{
"name": "Windows",
"intelliSenseMode": "clang-x64",
"includePath": [
"${workspaceRoot}/src",
"${workspaceRoot}/build/src",
"${workspaceRoot}/build/ninja_debug/src",
"${workspaceRoot}/externals/windows/include",
"${workspaceRoot}/externals/linux/include",
"${workspaceRoot}/externals/windows/vscode/usr/include/c++/6",
"${workspaceRoot}/externals/windows/vscode/usr/include/x86_64-linux-gnu/c++/6",
"${workspaceRoot}/externals/windows/vscode/usr/include/c++/6/backward",
"${workspaceRoot}/externals/windows/vscode/usr/lib/gcc/x86_64-linux-gnu/6/include",
"${workspaceRoot}/externals/windows/vscode/usr/local/include",
"${workspaceRoot}/externals/windows/vscode/usr/lib/gcc/x86_64-linux-gnu/6/include-fixed",
"${workspaceRoot}/externals/windows/vscode/usr/include/x86_64-linux-gnu",
"${workspaceRoot}/externals/windows/vscode/usr/include"
],
"defines": [
"__linux__",
"__x86_64__"
],
"browse": {
"path": [
"${workspaceRoot}/src",
"${workspaceRoot}/build/src",
"${workspaceRoot}/build/ninja_debug/src",
"${workspaceRoot}/externals/windows/include",
"${workspaceRoot}/externals/linux/include",
"${workspaceRoot}/externals/windows/vscode/usr/include/c++/6",
"${workspaceRoot}/externals/windows/vscode/usr/include/x86_64-linux-gnu/c++/6",
"${workspaceRoot}/externals/windows/vscode/usr/include/c++/6/backward",
"${workspaceRoot}/externals/windows/vscode/usr/lib/gcc/x86_64-linux-gnu/6/include",
"${workspaceRoot}/externals/windows/vscode/usr/local/include",
"${workspaceRoot}/externals/windows/vscode/usr/lib/gcc/x86_64-linux-gnu/6/include-fixed",
"${workspaceRoot}/externals/windows/vscode/usr/include/x86_64-linux-gnu",
"${workspaceRoot}/externals/windows/vscode/usr/include/*"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
},
"cStandard": "c11",
"cppStandard": "c++17"
},
{
"name": "WindowsQuick",
"intelliSenseMode": "clang-x64",
"includePath": [
"${workspaceRoot}/src",
"${workspaceRoot}/build/src",
"${workspaceRoot}/build/ninja_debug/src",
"${workspaceRoot}/externals/windows/include",
"${workspaceRoot}/externals/linux/include",
"${workspaceRoot}/externals/windows/vscode/usr/include/c++/6",
"${workspaceRoot}/externals/windows/vscode/usr/include/x86_64-linux-gnu/c++/6",
"${workspaceRoot}/externals/windows/vscode/usr/include/c++/6/backward",
"${workspaceRoot}/externals/windows/vscode/usr/lib/gcc/x86_64-linux-gnu/6/include",
"${workspaceRoot}/externals/windows/vscode/usr/local/include",
"${workspaceRoot}/externals/windows/vscode/usr/lib/gcc/x86_64-linux-gnu/6/include-fixed",
"${workspaceRoot}/externals/windows/vscode/usr/include/x86_64-linux-gnu",
"${workspaceRoot}/externals/windows/vscode/usr/include"
],
"defines": [
"__linux__",
"__x86_64__"
],
"browse": {
"path": [
"${workspaceRoot}/src"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": "${workspaceRoot}/.vscode/browse.vc.db"
},
"cStandard": "c11",
"cppStandard": "c++17"
}
],
"version": 4
}
@@ -1,371 +1,402 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "SparkVM Launch",
"type": "cppdbg",
"request": "launch",
"program": "/home/bts/spark/build/ninja_debug/server/sparkd",
"args": [
"run"
],
"stopAtEntry": false,
"cwd": "/home/bts/spark/build/ninja_debug/server/",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"preLaunchTask": "",
"logging": {
"engineLogging": false
},
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "enable pretty-printer",
"ignoreFailures": true
},
{
"description": "Skip STL",
"text": "skip -gfi /usr/include/c++/7/bits/*.h",
"ignoreFailures": true
},
{
"description": "LD LIBRARY",
"text": "set env LD_LIBRARY_PATH=.",
"ignoreFailures": false
}
],
"pipeTransport": {
"pipeCwd": "${workspaceRoot}",
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
"pipeArgs": [
"bts@sparkvm"
],
"debuggerPath": "/usr/bin/gdb"
},
"sourceFileMap": {
"/home/bts/spark/": "${workspaceRoot}"
}
},
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/build/ninja_debug/server/sparkd/sparkd",
"args": [
"run"
],
"stopAtEntry": false,
"cwd": "${workspaceRoot}/build/ninja_debug/src/server/sparkd",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "Client Launch",
"type": "clr",
"request": "launch",
"program": "${workspaceRoot}/build/Debug/bin/net471/spark.exe",
"args": [],
"cwd": "${workspaceRoot}",
"stopAtEntry": false,
"externalConsole": true,
"requireExactSource": false
},
{
"name": "SDK Launch",
"type": "clr",
"request": "launch",
"program": "${workspaceRoot}/build/Debug/bin/net471/spark_sdk.exe",
"args": [
"md",
"GLBX",
"Future",
"CL",
"CLZ9",
"--user=bts",
"--pass="
],
"cwd": "${workspaceRoot}",
"stopAtEntry": false,
"externalConsole": true,
"requireExactSource": false
},
{
"name": "Excel Launch",
"type": "clr",
"request": "launch",
"program": "C:/Program Files/Microsoft Office/Office14/EXCEL.EXE",
"args": [
"${workspaceRoot}/build/Debug/bin/net471/spark_excel-addin64-packed.xll"
],
"cwd": "${workspaceRoot}",
"stopAtEntry": false,
"externalConsole": true,
"requireExactSource": false
},
{
"name": "Client Tests",
"type": "clr",
"request": "launch",
"program": "${workspaceRoot}/build/Debug/bin/net471/sparkcmd.exe",
"args": [
"test",
"ApiUpdateTests"
],
"cwd": "${workspaceRoot}",
"stopAtEntry": false,
"externalConsole": true,
"requireExactSource": false
},
{
"name": "Client Attach",
"type": "clr",
"request": "attach",
"processId": "${command:pickProcess}"
},
{
"name": "Spreader Tests",
"type": "cppdbg",
"request": "launch",
"program": "/home/bts/spark/build/ninja_debug/server/sparkd",
"args": [
"test",
"[spreader]"
],
"stopAtEntry": false,
"cwd": "/home/bts/spark/build/ninja_debug/server/",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"preLaunchTask": "",
"logging": {
"engineLogging": false
},
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "enable pretty-printer",
"ignoreFailures": true
}
],
"pipeTransport": {
"pipeCwd": "${workspaceRoot}",
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
"pipeArgs": [
"bts@sparkvm"
],
"debuggerPath": "/usr/bin/gdb"
},
"sourceFileMap": {
"/home/bts/spark/": "${workspaceRoot}"
}
},
{
"name": "Admin Service Tests",
"type": "cppdbg",
"request": "launch",
"program": "/home/bts/spark/build/ninja_debug/src/server/sparkd/sparkd",
"args": [
"test",
"[admin_service]"
],
"stopAtEntry": false,
"cwd": "/home/bts/spark/build/ninja_debug/src/server/sparkd/",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"preLaunchTask": "",
"logging": {
"engineLogging": false
},
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "enable pretty-printer",
"ignoreFailures": true
}
],
"pipeTransport": {
"pipeCwd": "${workspaceRoot}",
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
"pipeArgs": [
"bts@sparkvm"
],
"debuggerPath": "/usr/bin/gdb"
},
"sourceFileMap": {
"/home/bts/spark/": "${workspaceRoot}"
}
},
{
"name": "Limiter Tests",
"type": "cppdbg",
"request": "launch",
"program": "/home/bts/spark/build/ninja_debug/src/server/sparkd/sparkd",
"args": [
"test",
"[limiter]"
],
"stopAtEntry": false,
"cwd": "/home/bts/spark/build/ninja_debug/src/server/sparkd/",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"preLaunchTask": "",
"logging": {
"engineLogging": false
},
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "enable pretty-printer",
"ignoreFailures": true
}
],
"pipeTransport": {
"pipeCwd": "${workspaceRoot}",
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
"pipeArgs": [
"bts@sparkvm"
],
"debuggerPath": "/usr/bin/gdb"
},
"sourceFileMap": {
"/home/bts/spark/": "${workspaceRoot}"
}
},
{
"name": "MD Tests",
"type": "cppdbg",
"request": "launch",
"program": "/home/bts/spark/build/ninja_debug/server/sparkd",
"args": [
"test",
"[algo]"
],
"stopAtEntry": false,
"cwd": "/home/bts/spark/build/ninja_debug/server/",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"preLaunchTask": "",
"logging": {
"engineLogging": false
},
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Skip STL",
"text": "skip -gfi /usr/include/c++/7/bits/*.h",
"ignoreFailures": true
}
],
"pipeTransport": {
"pipeCwd": "${workspaceRoot}",
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
"pipeArgs": [
"bts@sparkvm"
],
"debuggerPath": "/usr/bin/gdb"
},
"sourceFileMap": {
"/home/bts/spark/": "${workspaceRoot}"
}
},
{
"name": "SparkVM attach",
"type": "cppdbg",
"request": "attach",
"program": "/home/bts/spark/build/ninja_debug/src/server/sparkd/sparkd",
"processId": "${command:pickRemoteProcess}",
"MIMode": "gdb",
"pipeTransport": {
"pipeCwd": "${workspaceRoot}",
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
"pipeArgs": [
"bts@sparkvm"
],
"debuggerPath": "/usr/bin/gdb"
},
"sourceFileMap": {
"/home/bts/spark/": "${workspaceRoot}"
}
},
{
"name": "Python",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"pythonPath": "${config:python.pythonPath}",
"program": "${file}",
"cwd": "${workspaceRoot}",
"env": {},
"envFile": "${workspaceRoot}/.env",
"args": [
"DEBUG"
],
"debugOptions": [
"WaitOnAbnormalExit",
"WaitOnNormalExit",
"RedirectOutput"
]
},
{
"name": ".NET Core Remote Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickRemoteProcess}",
"pipeTransport": {
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
"pipeArgs": [
"bts@sparkvm"
],
"debuggerPath": "/home/bts/vsdbg/vsdbg",
"pipeCwd": "${workspaceRoot}",
"quoteArgs": true
},
"sourceFileMap": {
"/home/bts/spark/": "${workspaceRoot}"
},
"justMyCode": true
},
{
"name": ".NET Core Remote Launch",
"type": "coreclr",
"request": "launch",
"program": "/usr/bin/dotnet",
"args": [
"sparkcmd.dll",
"test",
"test_join_create_and_takeout_market"
],
"stopAtEntry": false,
"cwd": "/home/bts/spark/build/ninja_debug/server",
"pipeTransport": {
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
"pipeArgs": [
"bts@sparkvm"
],
"debuggerPath": "/home/bts/vsdbg/vsdbg",
"pipeCwd": "${workspaceRoot}",
"quoteArgs": true
},
"sourceFileMap": {
"/home/bts/spark/": "${workspaceRoot}"
},
"justMyCode": false
},
]
{
"version": "0.2.0",
"configurations": [
{
"name": "Spark Local",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/build/gcc/debug/server/sparkd",
"args": [
"run",
"test",
"-a",
"OutrightVanillaOrder"
],
"stopAtEntry": false,
"cwd": "${workspaceRoot}/build/gcc/debug/server/",
"environment": [
{
"name": "TZ",
"value": "America/Chicago"
}
],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "SparkVM Launch",
"type": "cppdbg",
"request": "launch",
"program": "/home/bts/spark/build/gcc/debug/server/sparkd",
"args": [
"test",
"-a",
"[ilink3]"
],
"stopAtEntry": false,
"cwd": "/home/bts/spark/build/gcc/debug/server/",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"preLaunchTask": "",
"logging": {
"engineLogging": false
},
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "enable pretty-printer",
"ignoreFailures": true
},
{
"description": "Skip STL",
"text": "skip -gfi /usr/include/c++/7/bits/*.h",
"ignoreFailures": true
},
{
"description": "LD LIBRARY",
"text": "set env LD_LIBRARY_PATH=.",
"ignoreFailures": false
}
],
"pipeTransport": {
"pipeCwd": "${workspaceRoot}",
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
"pipeArgs": [
"bts@sparkvm"
],
"debuggerPath": "/usr/bin/gdb"
},
"sourceFileMap": {
"/home/bts/spark/": "${workspaceRoot}"
}
},
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/build/gcc/debug/server/sparkd/sparkd",
"args": [
"run"
],
"stopAtEntry": false,
"cwd": "${workspaceRoot}/build/ninja_debug/src/server/sparkd",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "Client Launch",
"type": "clr",
"request": "launch",
"program": "${workspaceRoot}/build/Debug/bin/net471/spark.exe",
"args": [],
"cwd": "${workspaceRoot}",
"stopAtEntry": false,
"externalConsole": true,
"requireExactSource": false
},
{
"name": "SDK Launch",
"type": "clr",
"request": "launch",
"program": "${workspaceRoot}/build/Debug/bin/net471/spark_sdk.exe",
"args": [
"md",
"GLBX",
"Future",
"CL",
"CLZ9",
"--user=bts",
"--pass="
],
"cwd": "${workspaceRoot}",
"stopAtEntry": false,
"externalConsole": true,
"requireExactSource": false
},
{
"name": "Excel Launch",
"type": "clr",
"request": "launch",
"program": "C:/Program Files/Microsoft Office/Office14/EXCEL.EXE",
"args": [
"${workspaceRoot}/build/Debug/bin/net471/spark_excel-addin64-packed.xll"
],
"cwd": "${workspaceRoot}",
"stopAtEntry": false,
"externalConsole": true,
"requireExactSource": false
},
{
"name": "Client Tests",
"type": "clr",
"request": "launch",
"program": "${workspaceRoot}/build/Debug/bin/net471/sparkcmd.exe",
"args": [
"test",
"ApiUpdateTests"
],
"cwd": "${workspaceRoot}",
"stopAtEntry": false,
"externalConsole": true,
"requireExactSource": false
},
{
"name": "Client Attach",
"type": "clr",
"request": "attach",
"processId": "${command:pickProcess}"
},
{
"name": "Spreader Tests",
"type": "cppdbg",
"request": "launch",
"program": "/home/bts/spark/build/gcc/debug/server/sparkd",
"args": [
"test",
"[spreader]"
],
"stopAtEntry": false,
"cwd": "/home/bts/spark/build/gcc/debug/server/",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"preLaunchTask": "",
"logging": {
"engineLogging": false
},
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "enable pretty-printer",
"ignoreFailures": true
}
],
"pipeTransport": {
"pipeCwd": "${workspaceRoot}",
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
"pipeArgs": [
"bts@sparkvm"
],
"debuggerPath": "/usr/bin/gdb"
},
"sourceFileMap": {
"/home/bts/spark/": "${workspaceRoot}"
}
},
{
"name": "Admin Service Tests",
"type": "cppdbg",
"request": "launch",
"program": "/home/bts/spark/build/ninja_debug/src/server/sparkd/sparkd",
"args": [
"test",
"[admin_service]"
],
"stopAtEntry": false,
"cwd": "/home/bts/spark/build/ninja_debug/src/server/sparkd/",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"preLaunchTask": "",
"logging": {
"engineLogging": false
},
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "enable pretty-printer",
"ignoreFailures": true
}
],
"pipeTransport": {
"pipeCwd": "${workspaceRoot}",
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
"pipeArgs": [
"bts@sparkvm"
],
"debuggerPath": "/usr/bin/gdb"
},
"sourceFileMap": {
"/home/bts/spark/": "${workspaceRoot}"
}
},
{
"name": "Limiter Tests",
"type": "cppdbg",
"request": "launch",
"program": "/home/bts/spark/build/ninja_debug/src/server/sparkd/sparkd",
"args": [
"test",
"[limiter]"
],
"stopAtEntry": false,
"cwd": "/home/bts/spark/build/ninja_debug/src/server/sparkd/",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"preLaunchTask": "",
"logging": {
"engineLogging": false
},
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "enable pretty-printer",
"ignoreFailures": true
}
],
"pipeTransport": {
"pipeCwd": "${workspaceRoot}",
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
"pipeArgs": [
"bts@sparkvm"
],
"debuggerPath": "/usr/bin/gdb"
},
"sourceFileMap": {
"/home/bts/spark/": "${workspaceRoot}"
}
},
{
"name": "MD Tests",
"type": "cppdbg",
"request": "launch",
"program": "/home/bts/spark/build/gcc/debug/server/sparkd",
"args": [
"test",
"[algo]"
],
"stopAtEntry": false,
"cwd": "/home/bts/spark/build/gcc/debug/server/",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"preLaunchTask": "",
"logging": {
"engineLogging": false
},
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Skip STL",
"text": "skip -gfi /usr/include/c++/7/bits/*.h",
"ignoreFailures": true
}
],
"pipeTransport": {
"pipeCwd": "${workspaceRoot}",
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
"pipeArgs": [
"bts@sparkvm"
],
"debuggerPath": "/usr/bin/gdb"
},
"sourceFileMap": {
"/home/bts/spark/": "${workspaceRoot}"
}
},
{
"name": "SparkVM attach",
"type": "cppdbg",
"request": "attach",
"program": "/home/bts/spark/build/ninja_debug/src/server/sparkd/sparkd",
"processId": "${command:pickRemoteProcess}",
"MIMode": "gdb",
"pipeTransport": {
"pipeCwd": "${workspaceRoot}",
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
"pipeArgs": [
"bts@sparkvm"
],
"debuggerPath": "/usr/bin/gdb"
},
"sourceFileMap": {
"/home/bts/spark/": "${workspaceRoot}"
}
},
{
"name": "Python",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"pythonPath": "${config:python.pythonPath}",
"program": "${file}",
"cwd": "${workspaceRoot}",
"env": {},
"envFile": "${workspaceRoot}/.env",
"args": [
"DEBUG"
],
"debugOptions": [
"WaitOnAbnormalExit",
"WaitOnNormalExit",
"RedirectOutput"
]
},
{
"name": ".NET Core Remote Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickRemoteProcess}",
"pipeTransport": {
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
"pipeArgs": [
"bts@sparkvm"
],
"debuggerPath": "/home/bts/vsdbg/vsdbg",
"pipeCwd": "${workspaceRoot}",
"quoteArgs": true
},
"sourceFileMap": {
"/home/bts/spark/": "${workspaceRoot}"
},
"justMyCode": true
},
{
"name": ".NET Core Remote Launch",
"type": "coreclr",
"request": "launch",
"program": "/usr/bin/dotnet",
"args": [
"sparkcmd.dll",
"test",
"test_join_create_and_takeout_market"
],
"stopAtEntry": false,
"cwd": "/home/bts/spark/build/gcc/debug/server",
"pipeTransport": {
"pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe",
"pipeArgs": [
"bts@sparkvm"
],
"debuggerPath": "/home/bts/vsdbg/vsdbg",
"pipeCwd": "${workspaceRoot}",
"quoteArgs": true
},
"sourceFileMap": {
"/home/bts/spark/": "${workspaceRoot}"
},
"justMyCode": false
}
]
}
@@ -7,9 +7,9 @@
"vector": "cpp",
"xhash": "cpp",
"xstring": "cpp",
"system_error": "cpp",
"array": "cpp",
"string_view": "cpp"
"system_error": "cpp",
"array": "cpp",
"string_view": "cpp"
"xutility": "cpp",
"*.ipp": "cpp"
}
@@ -14,24 +14,21 @@
"focus": false,
"panel": "shared"
},
"group": {
"kind": "build",
"isDefault": true
}
"group": "build"
},
{
"label": "server_build",
"label": "server_build",
"type": "shell",
"command": ".\\tools\\buildsparkd.cmd",
"problemMatcher": {
"base": "$gcc",
"problemMatcher": {
"base": "$gcc",
"owner": "cpp",
"fileLocation": [
"relative",
"${workspaceFolder}"
"${workspaceFolder}"
],
"pattern": {
"regexp": "(.?)(home)(.?)(bts)(.?)(spark)(.?)(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)",
"regexp": "(.?)(home)(.?)(bts)(.?)(spark)(.?)(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)",
"file": 8,
"line": 9,
"column": 10,
@@ -49,6 +46,18 @@
"kind": "build",
"isDefault": true
}
}
},
{
"label": "linux build (Debug)",
"type": "shell",
"command": "cd build/ninja_debug; time ninja",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [
"$gcc"
]
}
]
}
+1 -1
View File
@@ -1,6 +1,6 @@
+++
title="Client API"
template="client.html"
redirect_to = "client/getting-started/overview/"
sort_by="weight"
+++
@@ -1,6 +1,5 @@
+++
title="Getting Started"
template="client.html"
sort_by="weight"
weight = 1
+++
@@ -1,9 +1,25 @@
+++
title = "Install Prerequisites"
template="client.html"
weight = 1
weight = 10
+++
## Coming Soon
# C#/.NET
We target [.NET Standard 2.0](https://docs.microsoft.com/en-us/dotnet/standard/net-standard) so you can use .NET Framework 4.6.1+ or .NET Core 2.0+. Simply add a reference to the [Spark Nuget package](https://www.nuget.org/packages/spark_sdk/) to get started.
```
dotnet new console -lang c#
dotnet add package spark_sdk
dotnet build
```
# C++
The easiest way to get started with C++ is to use the Spark Server SDK to develop your application. Follow the instructions to [download and install the Spark Server SDK](/server/getting-started/install) and open the client_sdk sample project. If you want to run your C++ Client SDK application on Windows [contact us](mailto://api@bluetradesys.com) to get the required headers and binaries.
# JavaScript
We use JavaScript internally with the Spark Client API over a websocket connection but the documentation and packaging isn't ready yet. If this is something you're interested in get in touch with us at [api@bluetradesys.com](mailto:api@bluetradesys.com).
* Install .net core
@@ -0,0 +1,31 @@
+++
title = "Overview"
weight = 1
+++
The Spark Client SDK is a high level command and control API which can be used to build scripts or integrate Spark into your existing ecosystem. The API is divided into several independent **"services"** responsible for different aspects of the system. A Service can define both [remote procedure call (RPC)](/client/getting-started/services#rpc) and incremental [streaming](/client/getting-started/services#streams) data.
The [Spark Desktop](https://www.bluetradingsystems.com/bts-spark/) is built on top of this API so you can be assured that it is complete and well tested.
Spark uses [Google Protocol Buffers](https://developers.google.com/protocol-buffers/) as an interface definition language similar to [GRPC](https://grpc.io) but backed by our custom high-performance TCP protocol. We currently support C#/.NET and C++ <!--and Javascript--> but the architecture is designed for easy extension so contact us about your specific business needs.
## Orders
Use the [OrderService](/client/services/orderservice) to send and manage orders including native exchange orders, spreader orders, and custom Algo orders created using the [Spark Server SDK](https://api.bluetradesys.com/server/).
## Spreader
Use the [SyntheticSecurityService](/client/services/syntheticsecurityservice) to create and manage synthetic spreads. Once created these spreads show up in the security and market data feeds just like exchange listed spreads.
## Position
Use the [PositionService](/client/services/positionservice) to get your position and P&L reports or add fills manually to keep the Spark system up to date with an external system.
## Administration
Use the [AdminService](/client/services/adminservice) to manage users and control limits.
## Market Data
For .NET subscribe to market data though the high level MarketDataClient interface. From C++ or JavaScript use the MarketDataRelay service directly.
@@ -0,0 +1,140 @@
+++
title = "Services"
weight = 20
+++
The Spark Client SDK uses [Google Protocol Buffers](https://developers.google.com/protocol-buffers/) to define the interface for each service in a language independent manner. Services have both functions which return a single result and streams of data which return values continuously while subscribed. This page describes the mapping from the Protocol Buffer definition to the concrete definition in each supported language.
# ServiceContext
To connect your client to the Spark Server you need to get or create a `ServiceContext` instance. A `ServiceContext` represents a connection to the Spark Server and a background thread for handling messages on that connection. Generally there should be a single `ServiceContext` per process. All of the methods on the `ServiceContext` are safe thread safe.
Construct a ServiceContext by calling the default constructor. The ServiceContext will find the Spark Server by loading the server configuration over an HTTP connection. To determine the URL it will search the following locations and use the first one that is present.
* A command line argument `-configserver <url>`
* An environment variable `BTSCONFIG`
* `%APPDATA%/bts/conf/spark.conf` (Windows)
* /sparkdata/conf/spark.conf (Linux)
* $HOME/sparkdata/conf/spark.conf (Linux)
If your application is running on a system with the BTS Client installed this will probably work without any further configuration. If you plan to run your client application on a separate machine we recommend setting the `BTSCONFIG` environment variable.
<div class="info">
<i class="fa fa-lightbulb-o fa-fw" aria-hidden="true"></i>
If you are using the Spark Server SDK to run a local copy of the Spark server set <p><strong>BTSCONFIG = http://localhost:9000/config/</strong></p>
</div>
To get a proxy for a given service call ServiceContext.locate&lt;T>("qualifier") where T is the type of the service and "qualifier" is an optional qualifier used to disambiguate between 2 instances of the same service. The locate call cannot fail but it may return a disconnected proxy. When you make a call on the proxy you should check the call result to see if the method call succeeded.
# RPC
Here is the OrderService reduced to a single method definition. A RPC method always takes exactly 1 argument and returns 1 value. In this example the `create_order` call takes a `Create` instance and returns a `Response`.
```C
service OrderService {
rpc create_order(Create) returns (Response);
...
}
```
The `Create` and `Response` types are also defined as protocol buffer messages. Each field can either be a primitive type another message or a list or map.
```C
message Create {
OrderDefinition new_order = 1;
double price = 2;
uint32 quantity = 3;
}
message Response {
uint32 order_key = 1;
OrderError error_code = 2;
string msg = 3;
}
```
Each RPC call generates both synchronous (blocking) and asynchronous variants. In C# the asynchronous calls have the `_async` suffix and return a `Task`. In C++ the call is overloaded to either return a value synchronously or accept a callback function to be called on the ServiceContext thread when the call completes. <!-- In Javascript only async methods returning a Promise are generated because it never makes sense to make a blocking call in the browser. -->
To call the resulting service locate a proxy using the [ServiceContext](#servicecontext) and then call `cancel_order` or `cancel_order_async`. If you are calling the Spark API from a GUI application you should always prefer the `_async` version of the calls.
### C# example
```c#
var ctx = new ServiceContext();
var orders = ctx.locate<OrderService>();
var response =
await orders.create_order_async(
new Create { price = 2.25, quantity = 42 });
if (response.success) {
Console.WriteLine($"success: {response.value}");
}
else {
Console.WriteLine($"Error: {response.error_message}");
}
```
### C++ example
```cpp
auto ctx = ServiceContext{};
auto orders = ctx.locate<OrderService>();
Create c;
c.set_price(2.25);
c.set_quantity(42);
// Instead of providing an _async method C++ uses overloading.
// To make a syncronous call simply omit the callback
orders.create_order(c, [=](const Result<Response>& response) {
if(response.success()) {
std::cout << "success.";
}
else {
std::cout << "error: " << response.error_message();
}
});
```
# Streams
Streams allow you to subscribe to live updating data. Each stream represents a changing collection of protocol buffer objects. Similar to a database row each item has an `id` which uniquely identifies it within the collection. Updates from the Spark server can add, remove or replace entries in the collection. Since only the changed items are sent over the wire the stream can remain responsive even when it represents a large collection.
Streams are implemented using the language bindings for [ReativeX](http://reactivex.io/) which provide utility functions to drill down to the specific data your application needs. In C# we provide both mutable and immutable versions of the generated data types (C++ users can rely on `const`).
When defined in a proto file streams use the `stream` keyword on the result type.
```C
service OrderService {
...
rpc fills (FillsSub) returns (stream Fill);
}
```
### C# example
```c#
var sc = new ServiceContext();
var orders = sc.locate<OrderService>();
var fills_observable = orders.subscribei_fills();
var unsub = fills_observable.Subscribe(update => {
Console.WriteLine(
"Added {0} items, Removed {1} items, Updated {2} items. Total items {3}",
update.added.Count(),
update.removed.Count(),
update.changes.Count(),
update.all.Count());
});
Thread.Sleep(TimeSpan.FromMinutes(5));
unsub.Dispose();
```
### C++ Example
```cpp
#include "lib/api/public/ServiceContext.h"
#include "lib/api/services/OrderService.client.pb.h"
using namespace bts::api;
ServiceContext ctx;
auto orders = ctx.locate<orderman::OrderService>();
auto unsub = orders.subscribe_fills().subscribe([](const auto& update) {
std::cout
<< "Added " << update.added().size() << " items, "
<< "Removed " << update.removed().size() << " items, "
<< "Updated " << update.updated().size() << " items, "
<< "Total items " << update.all().size() << std::endl;
});
std::this_thread::sleep_for(std::chrono::minutes(5));
```
+6
View File
@@ -0,0 +1,6 @@
+++
title="Samples"
sort_by="weight"
weight = 30
+++
@@ -0,0 +1,3 @@
+++
title = "AdminService"
+++
@@ -0,0 +1,3 @@
+++
title = "OrderService"
+++
@@ -0,0 +1,3 @@
+++
title = "PositionService"
+++
@@ -0,0 +1,3 @@
+++
title = "SyntheticService"
+++
@@ -0,0 +1,6 @@
+++
title="Services"
#sort_by="weight"
weight = 10
+++
@@ -0,0 +1,51 @@
+++
title = "Market Data"
+++
Use the MarketDataService to subscribe enumerate all available securities.
```cs
using System;
using System.Threading;
using bts.api;
using bts.api.core;
namespace sample {
class Program {
static void Main(string[] args) {
using var context = new ServiceContext();
var md = context.locate<MarketDataService>();
using var sub = md.subscribe_securities().Subscribe(update => {
foreach (var security in update.added) {
Console.WriteLine($"Added security {security.Id}: {security.Symbol}");
}
});
Thread.Sleep(TimeSpan.FromMinutes(5));
}
}
}
```
```cpp
#include "lib/api/public/ServiceContext.h"
#include "spark/lib/domain_model/Security.h"
#include "lib/api/services/MarketDataService.client.pb.h"
#include <thread>
using namespace bts::api;
int main(int argc, char** argv) {
ServiceContext ctx;
auto md_service = ctx.locate<bts::api::MarketDataService>();
auto sub = md_service.subscribe_securities().subscribe([](const auto& update) {
for (const auto& s : update.added()) {
std::cout << "Added security: " << s->id() << ": " << s->symbol() << std::endl;
}
});
std::this_thread::sleep_for(std::chrono::minutes(5));
return 0;
}
```
-1
View File
@@ -1,6 +1,5 @@
+++
title="Algo API"
template="documentation.html"
redirect_to = "server/getting-started/overview/"
sort_by="weight"
+++
@@ -1,6 +1,5 @@
+++
title="Getting Started"
template="documentation.html"
sort_by="weight"
weight = 1
+++
@@ -71,12 +71,12 @@ The first step is to start the spark_sdk Docker container with the examples dire
Windows Command Prompt:
{% clipable() %}
docker run --rm -it -v %CD%:/examples -u bts -w /examples --shm-size 1024m --name spark_sdk -h spark_sdk --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -p 9000:9000 -p 9001:9001 spark_sdk bash
docker run --rm -it -v %CD%:/examples -u bts -w /examples --shm-size 2048m --name spark_sdk -h spark_sdk --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -p 9000:9000 -p 9001:9001 spark_sdk bash
{% end %}
**Powershell** / Linux / Mac:
{% clipable() %}
docker run --rm -it -v ${PWD}:/examples -u bts -w /examples --shm-size 1024m --name spark_sdk -h spark_sdk --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -p 9000:9000 -p 9001:9001 spark_sdk bash
docker run --rm -it -v ${PWD}:/examples -u bts -w /examples --shm-size 2048m --name spark_sdk -h spark_sdk --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -p 9000:9000 -p 9001:9001 spark_sdk bash
{% end %}
### Attach
@@ -5,7 +5,7 @@ weight = 2
## Request Access 🔑
To start using the Server SDK you will need to request access though our sales department. Please email <a href="mailto:info@bluetradesys.com">info@bluetradesys.com</a> or call <a href="tel:919-913-0850">(919) 913-0850</a> and we will provide download credentials.
To start using the Server SDK you will need to request access though our sales department. Please email <a href="mailto:api@bluetradesys.com">api@bluetradesys.com</a> or call <a href="tel:919-913-0850">(919) 913-0850</a> and we will provide download credentials.
## Download
@@ -68,12 +68,21 @@ To update your Spark SDK simply download an unzip a new [spark_sdk.zip](https://
To preserve the old image so you can go back to it later run `docker tag spark_sdk spark_sdk:your_custom_tag` before loading the new SDK image.
<!--
Then stop, remove and restart spark_sdk.
### Re-build the Dev Container
If you are using Visual Studio Code you also need to rebuild the dev-container so it picks up the new image.
#### Inside VSCode
To re-build from inside Visual Studio Code. Click the 'Remote Explorer' icon on the left hand side.
You should see your spark_sdk project listed under the Containers section. Right click on it and select **rebuild-container**.
#### Command Line
To re-build from the command line run `docker ps -a` and find the row with the spark_sdk image.
```
c:\bts> docker stop spark_sdk
c:\bts> docker rm spark_sdk
c:\bts> docker run -d -v %cd%:/sdk --name spark_sdk bluetradingsytems/spark_sdk
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
54d96cfa3888 spark_sdk "/bin/sh -c 'echo Co…" About a minute ago Up About a minute 127.0.0.1:9000-9001->9000-9001/tcp quizzical_lichterman
```
Then run `docker rm 54d96cfa3888` (use your container id instead of 54d96cfa3888) or `docker rm quizzical_lichterman` (use your container name).
``` -->
-1
View File
@@ -1,6 +1,5 @@
+++
title="Reference"
template="documentation.html"
sort_by="weight"
weight = 2
+++
+6
View File
@@ -6,3 +6,9 @@ weight = 40
## I need to make a call that might take a few seconds. What is the best way to do this?
Create a background thread in [do_before_launch](/server/ref/initialization#before-launch) or [do_launch](/server/ref/initialization#launch-launch-attached) to do the work. Use [on_timer](/server/ref/subscriptions#timer) to poll until the result is available.
## I don't see the header files in the .zip file. Where are they?
The SDK headers are baked into the docker image along with the build tools. Once you've loaded the image with `docker load < spark_sdk.img` you can run this command to copy them out to your local file system `docker run --rm -it -v $PWD:/out spark_sdk /bin/tar -cvf /out/headers.tar /sdk/include` This will copy the headers to the current directory in headers.tar. We still recommend doing the actual build inside the docker environment but having a copy of the headers can be useful for setting up your development environment.
File renamed without changes.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

-1
View File
@@ -1,6 +1,5 @@
+++
title="Samples"
template="documentation.html"
sort_by="weight"
weight = 3
+++
-31
View File
@@ -1,31 +0,0 @@
{% extends "index.html" %}
{% block extra_nav_class %}{% endblock extra_nav_class %}
{% block extra_content_class %}content--reversed{% endblock extra_content_class %}
{% block content %}
{% set section = get_section(path="client/_index.md") %}
<div class="documentation">
<aside class="documentation__sidebar">
<ul>
{% for p in section.subsections %}
{% set subsection = get_section(path=p) %}
<li>
<span class="documentation__sidebar__title">{{ subsection.title }}</span>
<ul>
{% for page in subsection.pages %}
<li class="{% if current_path == page.path %}active{% endif %}">
<a href="{{page.permalink}}">{{page.title}}</a>
</li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
</aside>
<div class="documentation__content">
{% block doc_content %}
{% endblock doc_content %}
</div>
</div>
{% endblock content %}
-36
View File
@@ -1,36 +0,0 @@
{% extends "index.html" %}
{% block extra_nav_class %}{% endblock extra_nav_class %}
{% block extra_content_class %}content--reversed{% endblock extra_content_class %}
{% block content %}
{%if page.extra.section %}
{% set section = get_section(path="{{page.extra.section}}/_index.md") %}
{% else %}
{% set section = get_section(path="server/_index.md") %}
{% endif %}
<div class="documentation">
<aside class="documentation__sidebar">
<ul>
{% for p in section.subsections %}
{% set subsection = get_section(path=p) %}
<li>
<span class="documentation__sidebar__title">{{ subsection.title }}</span>
<ul>
{% for page in subsection.pages %}
<li class="{% if current_path == page.path %}active{% endif %}">
<a href="{{page.permalink}}">{{page.title}}</a>
</li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
</aside>
<div class="documentation__content">
{% block doc_content %}
{% endblock doc_content %}
{% block next_link %} {% endblock next_link %}
</div>
</div>
{% endblock content %}
+15 -15
View File
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en-gb">
<html lang="en-us">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
@@ -14,6 +14,7 @@
<link rel="stylesheet" href="{{ get_url(path="site.css") }}"/>
<link rel="icon" href="{{ get_url(path="favicon.ico") }}">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<script> dataLayer = [{ 'visitorType': 'geek' }]; </script>
</head>
<body>
@@ -36,13 +37,13 @@
</nav>
</header>
<div class="content {% block extra_content_class %}{% endblock extra_content_class %}">
<div class="content content--reversed">
{% block content %}
<div class="hero">
<h1>Spark SDK</h1>
<p class="hero__tagline">
Spark consists of a client UI
(<a class="white" href="https://www.bluetradingsystems.com/bts-spark#ladder-algo-screen">Spark Client</a>),
(<a href="https://www.bluetradingsystems.com/bts-spark#ladder-algo-screen">Spark Client</a>),
a high-performance professional futures front end, connected via our proprietary protocol over TCP to our Spark Server, which in turn connects to execution venues via their native protocols.
Use the Spark SDK to extend Spark Server with your custom Algos, then use the Client SDK to launch and control them.
</p>
@@ -64,7 +65,7 @@
<a href="{{ get_url(path="@/server/_index.md") }}" class="button">Get started</a>
</div>
<div class="selling-point disabled">
<div class="selling-point">
<h2>
Client SDK
<i class="fa fa-gamepad" aria-hidden="true"></i>
@@ -72,19 +73,9 @@
<p>
The Spark client SDK allows you to integrate spark with your existing ecosystem. The Spark Client is built entirely on this simple, powerful API.
</p>
<a href="" class="button" disabled>Get started</a>
<a href="{{ get_url(path="@/client/_index.md") }}" class="button">Get started</a>
</div>
<!-- <div class="selling-point disabled">
<h2>
Microsoft Excel
<i class="fa fa-table" aria-hidden="true"></i>
</h2>
<p>
More of your business is built on excel than probably should be. Continue this worrying trend with the Spark Excel API.
</p>
<a href="" class="button" disabled>Get started</a>
</div> -->
</div>
</div>
@@ -94,6 +85,15 @@
© Blue Trading Systems
</footer>
<script>
if (location.hostname == "api.bluetradesys.com") {
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-56FHG8R');
}
</script>
<script type="text/javascript" src="{{ get_url(path="elasticlunr.min.js") }}"></script>
<script type="text/javascript" src="{{ get_url(path="search_index.en.js") }}"></script>
<script type="text/javascript" src="{{ get_url(path="search.js") }}"></script>
+36 -8
View File
@@ -1,13 +1,39 @@
{% extends "documentation.html" %}
{% extends "index.html" %}
{# this has access to the "page" variable but documentation.html does not #}
{% block title %}{{ page.title }} | {{ super() }} {% endblock title %}
{% block doc_content %}
<h1>{{page.title}}</h1>
{{page.content | safe}}
{% endblock doc_content %}
{% block next_link %}
<p>
{% endblock next_link %}
{% block content %}
{% set section = get_section(path=page.ancestors[1]) %}
{#
{#<div>{{ section.title }} </div>#}
<div class="documentation">
<aside class="documentation__sidebar">
<ul>
{% for p in section.subsections %}
{% set subsection = get_section(path=p) %}
<li>
<span class="documentation__sidebar__title">{{ subsection.title }}</span>
<ul>
{% for page in subsection.pages %}
<li class="{% if current_path == page.path %}active{% endif %}">
<a href="{{page.permalink}}">{{page.title}}</a>
</li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
</aside>
<div class="documentation__content">
<h1>{{page.title}}</h1>
{{page.content | safe}}
{# next/pre links #}
<p>
{% if page.lighter %}
<a href="{{ page.lighter.permalink }}">
<i class="fa fa-chevron-left fa-fw" aria-hidden="true"></i>
@@ -21,5 +47,7 @@
<i class="fa fa-chevron-right fa-fw" aria-hidden="true"></i>
</a>
{% endif %}
</p>
{% endblock next_link %}
</p>
</div>
</div>
{% endblock content %}
+1 -1
View File
@@ -1 +1 @@
set(sources /home/ppinto/Dropbox/bts/spark/doc/user/build.sh;content/_index.md;content/bts_spark/Glossary/_index.md;content/bts_spark/Help/_index.md;content/bts_spark/Help/about_spark.png;content/bts_spark/Help/image39.png;content/bts_spark/Help/image58.png;content/bts_spark/Launcher/_index.md;content/bts_spark/Launcher/image38.png;content/bts_spark/Launcher/image68.png;content/bts_spark/Logging-In-to-the-System/_index.md;content/bts_spark/Logging-In-to-the-System/image3.png;content/bts_spark/Logging-In-to-the-System/image64.png;content/bts_spark/Market/_index.md;content/bts_spark/Market/change_securities.png;content/bts_spark/Market/image11.png;content/bts_spark/Market/image14.png;content/bts_spark/Market/image20.png;content/bts_spark/Market/image21.png;content/bts_spark/Market/image23.png;content/bts_spark/Market/image24.png;content/bts_spark/Market/image34.png;content/bts_spark/Market/image49.png;content/bts_spark/Market/image53.png;content/bts_spark/Market/image66.png;content/bts_spark/Market/image69.png;content/bts_spark/Market/market_view.png;content/bts_spark/Market/settings_icon.png;content/bts_spark/Market/time_and_sales.png;content/bts_spark/My-Windows/_index.md;content/bts_spark/My-Windows/image15.png;content/bts_spark/My-Windows/image16.png;content/bts_spark/My-Windows/image37.png;content/bts_spark/Settings/_index.md;content/bts_spark/Settings/image51.png;content/bts_spark/Settings/image9.png;content/bts_spark/Spreader/_index.md;content/bts_spark/Spreader/image10.png;content/bts_spark/Spreader/image13.png;content/bts_spark/Spreader/image18.png;content/bts_spark/Spreader/image19.png;content/bts_spark/Spreader/image28.png;content/bts_spark/Spreader/image29.png;content/bts_spark/Spreader/image31.png;content/bts_spark/Spreader/image35.png;content/bts_spark/Spreader/image40.png;content/bts_spark/Spreader/image43.png;content/bts_spark/Spreader/image54.png;content/bts_spark/Spreader/image55.png;content/bts_spark/Spreader/image56.png;content/bts_spark/Spreader/image6.png;content/bts_spark/Spreader/image7.png;content/bts_spark/Spreader/image70.png;content/bts_spark/Spreader/image72.png;content/bts_spark/Spreader/image8.png;content/bts_spark/Trading/OrderTypes/index.md;content/bts_spark/Trading/_index.md;content/bts_spark/Trading/algo_studio.png;content/bts_spark/Trading/collapse_all_icon.png;content/bts_spark/Trading/cover_algo_control.png;content/bts_spark/Trading/expand_all_icon.png;content/bts_spark/Trading/image1.png;content/bts_spark/Trading/image17.png;content/bts_spark/Trading/image2.png;content/bts_spark/Trading/image25.png;content/bts_spark/Trading/image27.png;content/bts_spark/Trading/image33.png;content/bts_spark/Trading/image42.png;content/bts_spark/Trading/image44.png;content/bts_spark/Trading/image47.png;content/bts_spark/Trading/image48.png;content/bts_spark/Trading/image5.png;content/bts_spark/Trading/image50.png;content/bts_spark/Trading/image52.png;content/bts_spark/Trading/image57.png;content/bts_spark/Trading/image59.png;content/bts_spark/Trading/image60.png;content/bts_spark/Trading/image61.png;content/bts_spark/Trading/image62.png;content/bts_spark/Trading/image73.png;content/bts_spark/Trading/image74.png;content/bts_spark/Trading/join_algo_control.png;content/bts_spark/Trading/ladder.png;content/bts_spark/Trading/ladder_badges.png;content/bts_spark/Trading/ladder_main_part.png;content/bts_spark/Trading/lean_algo_control.png;content/bts_spark/Trading/mini_orderbook.png;content/bts_spark/Trading/oco_algo_control.png;content/bts_spark/Trading/offset_algo_control.png;content/bts_spark/Trading/pnl_calculation.png;content/bts_spark/Trading/pnl_window.png;content/bts_spark/Trading/recreate_icon.png;content/bts_spark/Trading/settings_icon.png;content/bts_spark/Trading/spark_menu_order_book.png;content/bts_spark/Trading/top_algo_control.png;content/bts_spark/Trading/trigger_algo_control.png;content/bts_spark/_index.md;content/release_notes/_index.md;content/system_requirements/_index.md;static/book.js;static/favicon.ico;static/image.js;templates/index.html;templates/page.html;templates/section.html;templates/shortcodes/back_button.html)
set(sources /home/taha/spark/doc/user/build.sh;content/_index.md;content/bts_spark/Glossary/_index.md;content/bts_spark/Help/_index.md;content/bts_spark/Help/about_spark.png;content/bts_spark/Help/image39.png;content/bts_spark/Help/image58.png;content/bts_spark/Launcher/_index.md;content/bts_spark/Launcher/image38.png;content/bts_spark/Launcher/image68.png;content/bts_spark/Logging-In-to-the-System/_index.md;content/bts_spark/Logging-In-to-the-System/image3.png;content/bts_spark/Logging-In-to-the-System/image64.png;content/bts_spark/Market/_index.md;content/bts_spark/Market/change_securities.png;content/bts_spark/Market/image11.png;content/bts_spark/Market/image14.png;content/bts_spark/Market/image20.png;content/bts_spark/Market/image21.png;content/bts_spark/Market/image23.png;content/bts_spark/Market/image24.png;content/bts_spark/Market/image34.png;content/bts_spark/Market/image49.png;content/bts_spark/Market/image53.png;content/bts_spark/Market/image66.png;content/bts_spark/Market/image69.png;content/bts_spark/Market/market_view.png;content/bts_spark/Market/settings_icon.png;content/bts_spark/Market/time_and_sales.png;content/bts_spark/My-Windows/_index.md;content/bts_spark/My-Windows/image15.png;content/bts_spark/My-Windows/image16.png;content/bts_spark/My-Windows/image37.png;content/bts_spark/Settings/_index.md;content/bts_spark/Settings/image51.png;content/bts_spark/Settings/image9.png;content/bts_spark/Spreader/_index.md;content/bts_spark/Spreader/image10.png;content/bts_spark/Spreader/image13.png;content/bts_spark/Spreader/image18.png;content/bts_spark/Spreader/image19.png;content/bts_spark/Spreader/image28.png;content/bts_spark/Spreader/image29.png;content/bts_spark/Spreader/image31.png;content/bts_spark/Spreader/image35.png;content/bts_spark/Spreader/image40.png;content/bts_spark/Spreader/image43.png;content/bts_spark/Spreader/image54.png;content/bts_spark/Spreader/image55.png;content/bts_spark/Spreader/image56.png;content/bts_spark/Spreader/image6.png;content/bts_spark/Spreader/image7.png;content/bts_spark/Spreader/image70.png;content/bts_spark/Spreader/image72.png;content/bts_spark/Spreader/image8.png;content/bts_spark/Trading/OrderTypes/index.md;content/bts_spark/Trading/_index.md;content/bts_spark/Trading/algo_studio.png;content/bts_spark/Trading/collapse_all_icon.png;content/bts_spark/Trading/cover_algo_control.png;content/bts_spark/Trading/expand_all_icon.png;content/bts_spark/Trading/image1.png;content/bts_spark/Trading/image17.png;content/bts_spark/Trading/image2.png;content/bts_spark/Trading/image25.png;content/bts_spark/Trading/image27.png;content/bts_spark/Trading/image33.png;content/bts_spark/Trading/image42.png;content/bts_spark/Trading/image44.png;content/bts_spark/Trading/image47.png;content/bts_spark/Trading/image48.png;content/bts_spark/Trading/image5.png;content/bts_spark/Trading/image50.png;content/bts_spark/Trading/image52.png;content/bts_spark/Trading/image57.png;content/bts_spark/Trading/image59.png;content/bts_spark/Trading/image60.png;content/bts_spark/Trading/image61.png;content/bts_spark/Trading/image62.png;content/bts_spark/Trading/image73.png;content/bts_spark/Trading/image74.png;content/bts_spark/Trading/join_algo_control.png;content/bts_spark/Trading/ladder.png;content/bts_spark/Trading/ladder_badges.png;content/bts_spark/Trading/ladder_main_part.png;content/bts_spark/Trading/lean_algo_control.png;content/bts_spark/Trading/mini_orderbook.png;content/bts_spark/Trading/oco_algo_control.png;content/bts_spark/Trading/offset_algo_control.png;content/bts_spark/Trading/pnl_calculation.png;content/bts_spark/Trading/pnl_window.png;content/bts_spark/Trading/recreate_icon.png;content/bts_spark/Trading/settings_icon.png;content/bts_spark/Trading/spark_menu_order_book.png;content/bts_spark/Trading/top_algo_control.png;content/bts_spark/Trading/trigger_algo_control.png;content/bts_spark/_index.md;content/release_notes/_index.md;content/system_requirements/_index.md;static/book.js;static/favicon.ico;static/image.js;templates/index.html;templates/page.html;templates/section.html;templates/shortcodes/back_button.html)
+31 -1
View File
@@ -1,9 +1,38 @@
+++
+++
title = "Release notes"
weight = 3
sort_by = "weight"
insert_anchor_links = "right"
+++
## 2.16.2
### User Visible Change
- Synthetic creation dialog has a "fractional" checkbox next to the tick settings. Users may uncheck this box to enter integer tick sizes, so the synthetic security's prices will be displayed without decimals, or fractional units.
## 2.16.1
### Bug Fixes
- OrderBook's algo state parameters (in the panel on the right side) are sorted alphabetically
## 2.16.0
### Bug Fixes
- Solved an issue that could result in incorrect ladder levels
- Solved an issue that could lead to incorrect routing of orders in the event of certain MSGW changes
### API Changes
- Add C# client side API samples for order entry, position monitoring and market data observation
## 2.15.10
### Bug Fixes
- Solved an issue that could cause the user interface to fail when playing some alert sounds
### API Changes
- Added settlement and position information to the API
- Added the ability for user algos to report custom state to the user interface
- Added the ability for algos to discover all active securities
## 2.15.3
### Bug Fixes
- Fixed a bug where some CME currency spreads exhibited incorrect tick values
## 2.15.2
### User Visible Changes
- Excel RTD plugin can now receive ICE market data
## 2.15.1
### Bug Fixes
- Fixed a FIX log parsing issue that resulted in exchange gateway logon problems
## 2.15.0
### User Visible Changes
- Added ability to hide Ladder status messages via Ladder Settings -> Left Panel tab -> Show/Hide groupbox -> Status Message
@@ -699,3 +728,4 @@ insert_anchor_links = "right"
- Start, Day and Total PnL columns are painted with a red or green background color based on if the pnl value is negative or positive respectively
- Corrected cash per point values, used in pnl calculations, for a number of products
- PnL report will now remember any customizations you make to filtering and/or sorting criteria
+6
View File
@@ -0,0 +1,6 @@
{
"sdk": {
"version": "2.1.508",
"rollForward": "latestMajor"
}
}
+20
View File
@@ -0,0 +1,20 @@
{
"FormattingOptions": {
"NewLineForCatch": false,
"NewLineForClausesInQuery": true,
"NewLineForElse": false,
"NewLineForFinally": false,
"NewLineForMembersInAnonymousTypes": true,
"NewLineForMembersInObjectInit": true,
"NewLinesForBracesInAccessors": false,
"NewLinesForBracesInAnonymousMethods": false,
"NewLinesForBracesInAnonymousTypes": false,
"NewLinesForBracesInControlBlocks": false,
"NewLinesForBracesInLambdaExpressionBody": false,
"NewLinesForBracesInMethods": false,
"NewLinesForBracesInObjectCollectionArrayInitializers": false,
"NewLinesForBracesInProperties": false,
"NewLinesForBracesInTypes": false,
"TabSize": 3
}
}
+17
View File
@@ -0,0 +1,17 @@
astroid==2.7.3
autopep8==1.5.7
cffi==1.14.6
colorama==0.4.4
isort==5.9.3
lazy-object-proxy==1.6.0
mccabe==0.6.1
platformdirs==2.3.0
protobuf==3.19.1
pybars3==0.9.7
pycodestyle==2.7.0
pycparser==2.20
pylint==2.10.2
PyMeta3==0.5.1
toml==0.10.2
wrapt==1.12.1
yapf==0.31.0
@@ -1,41 +1,41 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.10
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sparkd", "src\server\sparkd\sparkd.vcxproj", "{BBBAFD38-312D-4A8D-9AF0-F2BDEE72CE6F}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libspark", "build\src\lib\libspark.vcxproj", "{502FD050-679A-3B50-B438-098500700919}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
MinSizeRel|x64 = MinSizeRel|x64
Release|x64 = Release|x64
RelWithDebInfo|x64 = RelWithDebInfo|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BBBAFD38-312D-4A8D-9AF0-F2BDEE72CE6F}.Debug|x64.ActiveCfg = Debug|x64
{BBBAFD38-312D-4A8D-9AF0-F2BDEE72CE6F}.Debug|x64.Build.0 = Debug|x64
{BBBAFD38-312D-4A8D-9AF0-F2BDEE72CE6F}.MinSizeRel|x64.ActiveCfg = Release|x64
{BBBAFD38-312D-4A8D-9AF0-F2BDEE72CE6F}.MinSizeRel|x64.Build.0 = Release|x64
{BBBAFD38-312D-4A8D-9AF0-F2BDEE72CE6F}.Release|x64.ActiveCfg = Release|x64
{BBBAFD38-312D-4A8D-9AF0-F2BDEE72CE6F}.Release|x64.Build.0 = Release|x64
{BBBAFD38-312D-4A8D-9AF0-F2BDEE72CE6F}.RelWithDebInfo|x64.ActiveCfg = Release|x64
{BBBAFD38-312D-4A8D-9AF0-F2BDEE72CE6F}.RelWithDebInfo|x64.Build.0 = Release|x64
{502FD050-679A-3B50-B438-098500700919}.Debug|x64.ActiveCfg = Debug|x64
{502FD050-679A-3B50-B438-098500700919}.Debug|x64.Build.0 = Debug|x64
{502FD050-679A-3B50-B438-098500700919}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
{502FD050-679A-3B50-B438-098500700919}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
{502FD050-679A-3B50-B438-098500700919}.Release|x64.ActiveCfg = Release|x64
{502FD050-679A-3B50-B438-098500700919}.Release|x64.Build.0 = Release|x64
{502FD050-679A-3B50-B438-098500700919}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
{502FD050-679A-3B50-B438-098500700919}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6A7249D7-B40C-4656-9347-60072D0B8FDB}
EndGlobalSection
EndGlobal
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.10
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sparkd", "src\server\sparkd\sparkd.vcxproj", "{BBBAFD38-312D-4A8D-9AF0-F2BDEE72CE6F}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libspark", "build\src\lib\libspark.vcxproj", "{502FD050-679A-3B50-B438-098500700919}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
MinSizeRel|x64 = MinSizeRel|x64
Release|x64 = Release|x64
RelWithDebInfo|x64 = RelWithDebInfo|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BBBAFD38-312D-4A8D-9AF0-F2BDEE72CE6F}.Debug|x64.ActiveCfg = Debug|x64
{BBBAFD38-312D-4A8D-9AF0-F2BDEE72CE6F}.Debug|x64.Build.0 = Debug|x64
{BBBAFD38-312D-4A8D-9AF0-F2BDEE72CE6F}.MinSizeRel|x64.ActiveCfg = Release|x64
{BBBAFD38-312D-4A8D-9AF0-F2BDEE72CE6F}.MinSizeRel|x64.Build.0 = Release|x64
{BBBAFD38-312D-4A8D-9AF0-F2BDEE72CE6F}.Release|x64.ActiveCfg = Release|x64
{BBBAFD38-312D-4A8D-9AF0-F2BDEE72CE6F}.Release|x64.Build.0 = Release|x64
{BBBAFD38-312D-4A8D-9AF0-F2BDEE72CE6F}.RelWithDebInfo|x64.ActiveCfg = Release|x64
{BBBAFD38-312D-4A8D-9AF0-F2BDEE72CE6F}.RelWithDebInfo|x64.Build.0 = Release|x64
{502FD050-679A-3B50-B438-098500700919}.Debug|x64.ActiveCfg = Debug|x64
{502FD050-679A-3B50-B438-098500700919}.Debug|x64.Build.0 = Debug|x64
{502FD050-679A-3B50-B438-098500700919}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
{502FD050-679A-3B50-B438-098500700919}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
{502FD050-679A-3B50-B438-098500700919}.Release|x64.ActiveCfg = Release|x64
{502FD050-679A-3B50-B438-098500700919}.Release|x64.Build.0 = Release|x64
{502FD050-679A-3B50-B438-098500700919}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
{502FD050-679A-3B50-B438-098500700919}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6A7249D7-B40C-4656-9347-60072D0B8FDB}
EndGlobalSection
EndGlobal
+37 -163
View File
@@ -1,10 +1,10 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2024
# Visual Studio Version 16
VisualStudioVersion = 16.0.30114.105
MinimumVisualStudioVersion = 15.0.26124.0
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "spark_api", "src\client\spark_api\spark_api.csproj", "{DC9A8975-8211-4FC9-A9BA-C8B9D26AD481}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libspark", "build\src\lib\libspark.vcxproj", "{3335AAF0-489D-359D-8305-9B7A44E2C760}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libspark", "build\src\lib\libspark.vcxproj", "{9FA60215-26AF-3EB7-AB89-D4F4B126EF40}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Spark", "src\client\spark\Spark.csproj", "{9A4D4D07-1AB6-4B2B-B111-A4F34D6C267E}"
EndProject
@@ -12,213 +12,87 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "sparkcmd", "src\client\spar
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "spark_core", "src\client\spark_core\spark_core.csproj", "{6E449EB6-20AC-4FA6-B8D9-10F4BB7E1FEE}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZERO_CHECK", "build\ZERO_CHECK.vcxproj", "{2256015B-E7D5-3614-8F39-814CA68A4444}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZERO_CHECK", "build\ZERO_CHECK.vcxproj", "{A1B7276B-8F81-3D58-A22E-870AF28DF9B9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "spark_sdk", "src\client\spark_sdk\spark_sdk.csproj", "{6963C314-83C4-4667-B0D0-C2F7AE208C29}"
ProjectSection(ProjectDependencies) = postProject
{3335AAF0-489D-359D-8305-9B7A44E2C760} = {3335AAF0-489D-359D-8305-9B7A44E2C760}
{9FA60215-26AF-3EB7-AB89-D4F4B126EF40} = {9FA60215-26AF-3EB7-AB89-D4F4B126EF40}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "spark_test", "src\client\spark_test\spark_test.csproj", "{ECD78CC5-138F-4809-A764-2358C2AC2E82}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "spark_excel", "src\client\spark_excel\spark_excel.csproj", "{BE9F27C3-B583-47DF-95FA-1F8BBC89DCCB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
MinSizeRel|Any CPU = MinSizeRel|Any CPU
MinSizeRel|x64 = MinSizeRel|x64
MinSizeRel|x86 = MinSizeRel|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
RelWithDebInfo|Any CPU = RelWithDebInfo|Any CPU
RelWithDebInfo|x64 = RelWithDebInfo|x64
RelWithDebInfo|x86 = RelWithDebInfo|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DC9A8975-8211-4FC9-A9BA-C8B9D26AD481}.Debug|Any CPU.ActiveCfg = Debug|x64
{DC9A8975-8211-4FC9-A9BA-C8B9D26AD481}.Debug|x64.ActiveCfg = Debug|x64
{DC9A8975-8211-4FC9-A9BA-C8B9D26AD481}.Debug|x64.Build.0 = Debug|x64
{DC9A8975-8211-4FC9-A9BA-C8B9D26AD481}.Debug|x86.ActiveCfg = Debug|x64
{DC9A8975-8211-4FC9-A9BA-C8B9D26AD481}.MinSizeRel|Any CPU.ActiveCfg = Release|x64
{DC9A8975-8211-4FC9-A9BA-C8B9D26AD481}.MinSizeRel|Any CPU.Build.0 = Release|x64
{DC9A8975-8211-4FC9-A9BA-C8B9D26AD481}.MinSizeRel|x64.ActiveCfg = Release|x64
{DC9A8975-8211-4FC9-A9BA-C8B9D26AD481}.MinSizeRel|x64.Build.0 = Release|x64
{DC9A8975-8211-4FC9-A9BA-C8B9D26AD481}.MinSizeRel|x86.ActiveCfg = Release|x64
{DC9A8975-8211-4FC9-A9BA-C8B9D26AD481}.MinSizeRel|x86.Build.0 = Release|x64
{DC9A8975-8211-4FC9-A9BA-C8B9D26AD481}.Release|Any CPU.ActiveCfg = Release|x64
{DC9A8975-8211-4FC9-A9BA-C8B9D26AD481}.Release|x64.ActiveCfg = Release|x64
{DC9A8975-8211-4FC9-A9BA-C8B9D26AD481}.Release|x64.Build.0 = Release|x64
{DC9A8975-8211-4FC9-A9BA-C8B9D26AD481}.Release|x86.ActiveCfg = Release|x64
{DC9A8975-8211-4FC9-A9BA-C8B9D26AD481}.RelWithDebInfo|Any CPU.ActiveCfg = Release|x64
{DC9A8975-8211-4FC9-A9BA-C8B9D26AD481}.RelWithDebInfo|Any CPU.Build.0 = Release|x64
{DC9A8975-8211-4FC9-A9BA-C8B9D26AD481}.RelWithDebInfo|x64.ActiveCfg = Release|x64
{DC9A8975-8211-4FC9-A9BA-C8B9D26AD481}.RelWithDebInfo|x64.Build.0 = Release|x64
{DC9A8975-8211-4FC9-A9BA-C8B9D26AD481}.RelWithDebInfo|x86.ActiveCfg = Release|x64
{DC9A8975-8211-4FC9-A9BA-C8B9D26AD481}.RelWithDebInfo|x86.Build.0 = Release|x64
{3335AAF0-489D-359D-8305-9B7A44E2C760}.Debug|Any CPU.ActiveCfg = Debug|x64
{3335AAF0-489D-359D-8305-9B7A44E2C760}.Debug|x64.ActiveCfg = Debug|x64
{3335AAF0-489D-359D-8305-9B7A44E2C760}.Debug|x64.Build.0 = Debug|x64
{3335AAF0-489D-359D-8305-9B7A44E2C760}.Debug|x86.ActiveCfg = Debug|x64
{3335AAF0-489D-359D-8305-9B7A44E2C760}.MinSizeRel|Any CPU.ActiveCfg = MinSizeRel|x64
{3335AAF0-489D-359D-8305-9B7A44E2C760}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
{3335AAF0-489D-359D-8305-9B7A44E2C760}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
{3335AAF0-489D-359D-8305-9B7A44E2C760}.MinSizeRel|x86.ActiveCfg = MinSizeRel|x64
{3335AAF0-489D-359D-8305-9B7A44E2C760}.Release|Any CPU.ActiveCfg = Release|x64
{3335AAF0-489D-359D-8305-9B7A44E2C760}.Release|x64.ActiveCfg = Release|x64
{3335AAF0-489D-359D-8305-9B7A44E2C760}.Release|x64.Build.0 = Release|x64
{3335AAF0-489D-359D-8305-9B7A44E2C760}.Release|x86.ActiveCfg = Release|x64
{3335AAF0-489D-359D-8305-9B7A44E2C760}.RelWithDebInfo|Any CPU.ActiveCfg = RelWithDebInfo|x64
{3335AAF0-489D-359D-8305-9B7A44E2C760}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
{3335AAF0-489D-359D-8305-9B7A44E2C760}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
{3335AAF0-489D-359D-8305-9B7A44E2C760}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x64
{9A4D4D07-1AB6-4B2B-B111-A4F34D6C267E}.Debug|Any CPU.ActiveCfg = Debug|x64
{9FA60215-26AF-3EB7-AB89-D4F4B126EF40}.Debug|x64.ActiveCfg = Debug|x64
{9FA60215-26AF-3EB7-AB89-D4F4B126EF40}.Debug|x64.Build.0 = Debug|x64
{9FA60215-26AF-3EB7-AB89-D4F4B126EF40}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
{9FA60215-26AF-3EB7-AB89-D4F4B126EF40}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
{9FA60215-26AF-3EB7-AB89-D4F4B126EF40}.Release|x64.ActiveCfg = Release|x64
{9FA60215-26AF-3EB7-AB89-D4F4B126EF40}.Release|x64.Build.0 = Release|x64
{9FA60215-26AF-3EB7-AB89-D4F4B126EF40}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
{9FA60215-26AF-3EB7-AB89-D4F4B126EF40}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
{9A4D4D07-1AB6-4B2B-B111-A4F34D6C267E}.Debug|x64.ActiveCfg = Debug|x64
{9A4D4D07-1AB6-4B2B-B111-A4F34D6C267E}.Debug|x64.Build.0 = Debug|x64
{9A4D4D07-1AB6-4B2B-B111-A4F34D6C267E}.Debug|x86.ActiveCfg = Debug|x64
{9A4D4D07-1AB6-4B2B-B111-A4F34D6C267E}.MinSizeRel|Any CPU.ActiveCfg = Release|x64
{9A4D4D07-1AB6-4B2B-B111-A4F34D6C267E}.MinSizeRel|Any CPU.Build.0 = Release|x64
{9A4D4D07-1AB6-4B2B-B111-A4F34D6C267E}.MinSizeRel|x64.ActiveCfg = Release|x64
{9A4D4D07-1AB6-4B2B-B111-A4F34D6C267E}.MinSizeRel|x64.Build.0 = Release|x64
{9A4D4D07-1AB6-4B2B-B111-A4F34D6C267E}.MinSizeRel|x86.ActiveCfg = Release|x64
{9A4D4D07-1AB6-4B2B-B111-A4F34D6C267E}.MinSizeRel|x86.Build.0 = Release|x64
{9A4D4D07-1AB6-4B2B-B111-A4F34D6C267E}.Release|Any CPU.ActiveCfg = Release|x64
{9A4D4D07-1AB6-4B2B-B111-A4F34D6C267E}.Release|x64.ActiveCfg = Release|x64
{9A4D4D07-1AB6-4B2B-B111-A4F34D6C267E}.Release|x64.Build.0 = Release|x64
{9A4D4D07-1AB6-4B2B-B111-A4F34D6C267E}.Release|x86.ActiveCfg = Release|x64
{9A4D4D07-1AB6-4B2B-B111-A4F34D6C267E}.RelWithDebInfo|Any CPU.ActiveCfg = Release|x64
{9A4D4D07-1AB6-4B2B-B111-A4F34D6C267E}.RelWithDebInfo|Any CPU.Build.0 = Release|x64
{9A4D4D07-1AB6-4B2B-B111-A4F34D6C267E}.RelWithDebInfo|x64.ActiveCfg = Release|x64
{9A4D4D07-1AB6-4B2B-B111-A4F34D6C267E}.RelWithDebInfo|x64.Build.0 = Release|x64
{9A4D4D07-1AB6-4B2B-B111-A4F34D6C267E}.RelWithDebInfo|x86.ActiveCfg = Release|x64
{9A4D4D07-1AB6-4B2B-B111-A4F34D6C267E}.RelWithDebInfo|x86.Build.0 = Release|x64
{387566C6-C6F6-412C-A30C-9855BBCB4816}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{387566C6-C6F6-412C-A30C-9855BBCB4816}.Debug|Any CPU.Build.0 = Debug|Any CPU
{387566C6-C6F6-412C-A30C-9855BBCB4816}.Debug|x64.ActiveCfg = Debug|Any CPU
{387566C6-C6F6-412C-A30C-9855BBCB4816}.Debug|x64.Build.0 = Debug|Any CPU
{387566C6-C6F6-412C-A30C-9855BBCB4816}.Debug|x86.ActiveCfg = Debug|Any CPU
{387566C6-C6F6-412C-A30C-9855BBCB4816}.Debug|x86.Build.0 = Debug|Any CPU
{387566C6-C6F6-412C-A30C-9855BBCB4816}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
{387566C6-C6F6-412C-A30C-9855BBCB4816}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
{387566C6-C6F6-412C-A30C-9855BBCB4816}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
{387566C6-C6F6-412C-A30C-9855BBCB4816}.MinSizeRel|x64.Build.0 = Debug|Any CPU
{387566C6-C6F6-412C-A30C-9855BBCB4816}.MinSizeRel|x86.ActiveCfg = Debug|Any CPU
{387566C6-C6F6-412C-A30C-9855BBCB4816}.MinSizeRel|x86.Build.0 = Debug|Any CPU
{387566C6-C6F6-412C-A30C-9855BBCB4816}.Release|Any CPU.ActiveCfg = Release|Any CPU
{387566C6-C6F6-412C-A30C-9855BBCB4816}.Release|Any CPU.Build.0 = Release|Any CPU
{387566C6-C6F6-412C-A30C-9855BBCB4816}.Release|x64.ActiveCfg = Release|Any CPU
{387566C6-C6F6-412C-A30C-9855BBCB4816}.Release|x64.Build.0 = Release|Any CPU
{387566C6-C6F6-412C-A30C-9855BBCB4816}.Release|x86.ActiveCfg = Release|Any CPU
{387566C6-C6F6-412C-A30C-9855BBCB4816}.Release|x86.Build.0 = Release|Any CPU
{387566C6-C6F6-412C-A30C-9855BBCB4816}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
{387566C6-C6F6-412C-A30C-9855BBCB4816}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
{387566C6-C6F6-412C-A30C-9855BBCB4816}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
{387566C6-C6F6-412C-A30C-9855BBCB4816}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
{387566C6-C6F6-412C-A30C-9855BBCB4816}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
{387566C6-C6F6-412C-A30C-9855BBCB4816}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
{6E449EB6-20AC-4FA6-B8D9-10F4BB7E1FEE}.Debug|Any CPU.ActiveCfg = Debug|x64
{387566C6-C6F6-412C-A30C-9855BBCB4816}.Debug|x64.ActiveCfg = Debug|x64
{387566C6-C6F6-412C-A30C-9855BBCB4816}.Debug|x64.Build.0 = Debug|x64
{387566C6-C6F6-412C-A30C-9855BBCB4816}.MinSizeRel|x64.ActiveCfg = Debug|x64
{387566C6-C6F6-412C-A30C-9855BBCB4816}.MinSizeRel|x64.Build.0 = Debug|x64
{387566C6-C6F6-412C-A30C-9855BBCB4816}.Release|x64.ActiveCfg = Release|x64
{387566C6-C6F6-412C-A30C-9855BBCB4816}.Release|x64.Build.0 = Release|x64
{387566C6-C6F6-412C-A30C-9855BBCB4816}.RelWithDebInfo|x64.ActiveCfg = Release|x64
{387566C6-C6F6-412C-A30C-9855BBCB4816}.RelWithDebInfo|x64.Build.0 = Release|x64
{6E449EB6-20AC-4FA6-B8D9-10F4BB7E1FEE}.Debug|x64.ActiveCfg = Debug|x64
{6E449EB6-20AC-4FA6-B8D9-10F4BB7E1FEE}.Debug|x64.Build.0 = Debug|x64
{6E449EB6-20AC-4FA6-B8D9-10F4BB7E1FEE}.Debug|x86.ActiveCfg = Debug|x64
{6E449EB6-20AC-4FA6-B8D9-10F4BB7E1FEE}.MinSizeRel|Any CPU.ActiveCfg = Release|x64
{6E449EB6-20AC-4FA6-B8D9-10F4BB7E1FEE}.MinSizeRel|Any CPU.Build.0 = Release|x64
{6E449EB6-20AC-4FA6-B8D9-10F4BB7E1FEE}.MinSizeRel|x64.ActiveCfg = Release|x64
{6E449EB6-20AC-4FA6-B8D9-10F4BB7E1FEE}.MinSizeRel|x64.Build.0 = Release|x64
{6E449EB6-20AC-4FA6-B8D9-10F4BB7E1FEE}.MinSizeRel|x86.ActiveCfg = Release|x64
{6E449EB6-20AC-4FA6-B8D9-10F4BB7E1FEE}.MinSizeRel|x86.Build.0 = Release|x64
{6E449EB6-20AC-4FA6-B8D9-10F4BB7E1FEE}.Release|Any CPU.ActiveCfg = Release|x64
{6E449EB6-20AC-4FA6-B8D9-10F4BB7E1FEE}.Release|x64.ActiveCfg = Release|x64
{6E449EB6-20AC-4FA6-B8D9-10F4BB7E1FEE}.Release|x64.Build.0 = Release|x64
{6E449EB6-20AC-4FA6-B8D9-10F4BB7E1FEE}.Release|x86.ActiveCfg = Release|x64
{6E449EB6-20AC-4FA6-B8D9-10F4BB7E1FEE}.RelWithDebInfo|Any CPU.ActiveCfg = Release|x64
{6E449EB6-20AC-4FA6-B8D9-10F4BB7E1FEE}.RelWithDebInfo|Any CPU.Build.0 = Release|x64
{6E449EB6-20AC-4FA6-B8D9-10F4BB7E1FEE}.RelWithDebInfo|x64.ActiveCfg = Release|x64
{6E449EB6-20AC-4FA6-B8D9-10F4BB7E1FEE}.RelWithDebInfo|x64.Build.0 = Release|x64
{6E449EB6-20AC-4FA6-B8D9-10F4BB7E1FEE}.RelWithDebInfo|x86.ActiveCfg = Release|x64
{6E449EB6-20AC-4FA6-B8D9-10F4BB7E1FEE}.RelWithDebInfo|x86.Build.0 = Release|x64
{2256015B-E7D5-3614-8F39-814CA68A4444}.Debug|Any CPU.ActiveCfg = Debug|x64
{2256015B-E7D5-3614-8F39-814CA68A4444}.Debug|x64.ActiveCfg = Debug|x64
{2256015B-E7D5-3614-8F39-814CA68A4444}.Debug|x64.Build.0 = Debug|x64
{2256015B-E7D5-3614-8F39-814CA68A4444}.Debug|x86.ActiveCfg = Debug|x64
{2256015B-E7D5-3614-8F39-814CA68A4444}.MinSizeRel|Any CPU.ActiveCfg = MinSizeRel|x64
{2256015B-E7D5-3614-8F39-814CA68A4444}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
{2256015B-E7D5-3614-8F39-814CA68A4444}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
{2256015B-E7D5-3614-8F39-814CA68A4444}.MinSizeRel|x86.ActiveCfg = MinSizeRel|x64
{2256015B-E7D5-3614-8F39-814CA68A4444}.Release|Any CPU.ActiveCfg = Release|x64
{2256015B-E7D5-3614-8F39-814CA68A4444}.Release|x64.ActiveCfg = Release|x64
{2256015B-E7D5-3614-8F39-814CA68A4444}.Release|x64.Build.0 = Release|x64
{2256015B-E7D5-3614-8F39-814CA68A4444}.Release|x86.ActiveCfg = Release|x64
{2256015B-E7D5-3614-8F39-814CA68A4444}.RelWithDebInfo|Any CPU.ActiveCfg = RelWithDebInfo|x64
{2256015B-E7D5-3614-8F39-814CA68A4444}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
{2256015B-E7D5-3614-8F39-814CA68A4444}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
{2256015B-E7D5-3614-8F39-814CA68A4444}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x64
{6963C314-83C4-4667-B0D0-C2F7AE208C29}.Debug|Any CPU.ActiveCfg = Debug|x64
{A1B7276B-8F81-3D58-A22E-870AF28DF9B9}.Debug|x64.ActiveCfg = Debug|x64
{A1B7276B-8F81-3D58-A22E-870AF28DF9B9}.Debug|x64.Build.0 = Debug|x64
{A1B7276B-8F81-3D58-A22E-870AF28DF9B9}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
{A1B7276B-8F81-3D58-A22E-870AF28DF9B9}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
{A1B7276B-8F81-3D58-A22E-870AF28DF9B9}.Release|x64.ActiveCfg = Release|x64
{A1B7276B-8F81-3D58-A22E-870AF28DF9B9}.Release|x64.Build.0 = Release|x64
{A1B7276B-8F81-3D58-A22E-870AF28DF9B9}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
{A1B7276B-8F81-3D58-A22E-870AF28DF9B9}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
{6963C314-83C4-4667-B0D0-C2F7AE208C29}.Debug|x64.ActiveCfg = Debug|x64
{6963C314-83C4-4667-B0D0-C2F7AE208C29}.Debug|x64.Build.0 = Debug|x64
{6963C314-83C4-4667-B0D0-C2F7AE208C29}.Debug|x86.ActiveCfg = Debug|x64
{6963C314-83C4-4667-B0D0-C2F7AE208C29}.MinSizeRel|Any CPU.ActiveCfg = Release|x64
{6963C314-83C4-4667-B0D0-C2F7AE208C29}.MinSizeRel|Any CPU.Build.0 = Release|x64
{6963C314-83C4-4667-B0D0-C2F7AE208C29}.MinSizeRel|x64.ActiveCfg = Release|x64
{6963C314-83C4-4667-B0D0-C2F7AE208C29}.MinSizeRel|x64.Build.0 = Release|x64
{6963C314-83C4-4667-B0D0-C2F7AE208C29}.MinSizeRel|x86.ActiveCfg = Release|x64
{6963C314-83C4-4667-B0D0-C2F7AE208C29}.MinSizeRel|x86.Build.0 = Release|x64
{6963C314-83C4-4667-B0D0-C2F7AE208C29}.Release|Any CPU.ActiveCfg = Release|x64
{6963C314-83C4-4667-B0D0-C2F7AE208C29}.Release|x64.ActiveCfg = Release|x64
{6963C314-83C4-4667-B0D0-C2F7AE208C29}.Release|x64.Build.0 = Release|x64
{6963C314-83C4-4667-B0D0-C2F7AE208C29}.Release|x86.ActiveCfg = Release|x64
{6963C314-83C4-4667-B0D0-C2F7AE208C29}.RelWithDebInfo|Any CPU.ActiveCfg = Release|x64
{6963C314-83C4-4667-B0D0-C2F7AE208C29}.RelWithDebInfo|Any CPU.Build.0 = Release|x64
{6963C314-83C4-4667-B0D0-C2F7AE208C29}.RelWithDebInfo|x64.ActiveCfg = Release|x64
{6963C314-83C4-4667-B0D0-C2F7AE208C29}.RelWithDebInfo|x64.Build.0 = Release|x64
{6963C314-83C4-4667-B0D0-C2F7AE208C29}.RelWithDebInfo|x86.ActiveCfg = Release|x64
{6963C314-83C4-4667-B0D0-C2F7AE208C29}.RelWithDebInfo|x86.Build.0 = Release|x64
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.Debug|x64.ActiveCfg = Debug|Any CPU
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.Debug|x64.Build.0 = Debug|Any CPU
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.Debug|x86.ActiveCfg = Debug|Any CPU
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.Debug|x86.Build.0 = Debug|Any CPU
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.MinSizeRel|x64.Build.0 = Debug|Any CPU
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.MinSizeRel|x86.ActiveCfg = Debug|Any CPU
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.MinSizeRel|x86.Build.0 = Debug|Any CPU
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.Release|Any CPU.Build.0 = Release|Any CPU
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.Release|x64.ActiveCfg = Release|Any CPU
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.Release|x64.Build.0 = Release|Any CPU
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.Release|x86.ActiveCfg = Release|Any CPU
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.Release|x86.Build.0 = Release|Any CPU
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
{BE9F27C3-B583-47DF-95FA-1F8BBC89DCCB}.Debug|Any CPU.ActiveCfg = Debug|x64
{BE9F27C3-B583-47DF-95FA-1F8BBC89DCCB}.Debug|x64.ActiveCfg = Debug|x64
{BE9F27C3-B583-47DF-95FA-1F8BBC89DCCB}.Debug|x64.Build.0 = Debug|x64
{BE9F27C3-B583-47DF-95FA-1F8BBC89DCCB}.Debug|x86.ActiveCfg = Debug|x64
{BE9F27C3-B583-47DF-95FA-1F8BBC89DCCB}.MinSizeRel|Any CPU.ActiveCfg = Release|x64
{BE9F27C3-B583-47DF-95FA-1F8BBC89DCCB}.MinSizeRel|Any CPU.Build.0 = Release|x64
{BE9F27C3-B583-47DF-95FA-1F8BBC89DCCB}.MinSizeRel|x64.ActiveCfg = Release|x64
{BE9F27C3-B583-47DF-95FA-1F8BBC89DCCB}.MinSizeRel|x64.Build.0 = Release|x64
{BE9F27C3-B583-47DF-95FA-1F8BBC89DCCB}.MinSizeRel|x86.ActiveCfg = Release|x64
{BE9F27C3-B583-47DF-95FA-1F8BBC89DCCB}.MinSizeRel|x86.Build.0 = Release|x64
{BE9F27C3-B583-47DF-95FA-1F8BBC89DCCB}.Release|Any CPU.ActiveCfg = Release|x64
{BE9F27C3-B583-47DF-95FA-1F8BBC89DCCB}.Release|x64.ActiveCfg = Release|x64
{BE9F27C3-B583-47DF-95FA-1F8BBC89DCCB}.Release|x64.Build.0 = Release|x64
{BE9F27C3-B583-47DF-95FA-1F8BBC89DCCB}.Release|x86.ActiveCfg = Release|x64
{BE9F27C3-B583-47DF-95FA-1F8BBC89DCCB}.RelWithDebInfo|Any CPU.ActiveCfg = Release|x64
{BE9F27C3-B583-47DF-95FA-1F8BBC89DCCB}.RelWithDebInfo|Any CPU.Build.0 = Release|x64
{BE9F27C3-B583-47DF-95FA-1F8BBC89DCCB}.RelWithDebInfo|x64.ActiveCfg = Release|x64
{BE9F27C3-B583-47DF-95FA-1F8BBC89DCCB}.RelWithDebInfo|x64.Build.0 = Release|x64
{BE9F27C3-B583-47DF-95FA-1F8BBC89DCCB}.RelWithDebInfo|x86.ActiveCfg = Release|x64
{BE9F27C3-B583-47DF-95FA-1F8BBC89DCCB}.RelWithDebInfo|x86.Build.0 = Release|x64
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.Debug|x64.ActiveCfg = Debug|x64
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.Debug|x64.Build.0 = Debug|x64
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.MinSizeRel|x64.ActiveCfg = Debug|x64
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.MinSizeRel|x64.Build.0 = Debug|x64
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.Release|x64.ActiveCfg = Release|x64
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.Release|x64.Build.0 = Release|x64
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.RelWithDebInfo|x64.ActiveCfg = Release|x64
{ECD78CC5-138F-4809-A764-2358C2AC2E82}.RelWithDebInfo|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
-17
View File
@@ -1,17 +0,0 @@
{
"files.associations": {
"chrono": "cpp",
"future": "cpp",
"system_error": "cpp",
"ios": "cpp",
"utility": "cpp",
"iosfwd": "cpp",
"xhash": "cpp",
"xstring": "cpp",
"xtree": "cpp",
"xutility": "cpp",
"exception": "cpp",
"bitset": "cpp",
"xlocale": "cpp"
}
}
+22 -34
View File
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<PropertyGroup>
<ComputerSpecificConfig>..\..\tools\override\$(computername).props</ComputerSpecificConfig>
<SparkRoot>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)\..\..))</SparkRoot>
<SourceRoot>$([System.IO.Path]::GetFullPath($(SparkRoot)\src))</SourceRoot>
@@ -12,53 +12,41 @@
<EnableDefaultContentItems>False</EnableDefaultContentItems>
<ShowMissingItemTypes>false</ShowMissingItemTypes>
<Configuration Condition="'$(configuration)'==''">Debug</Configuration>
</PropertyGroup>
</PropertyGroup>
<PropertyGroup Label="Output">
<PropertyGroup Label="Output">
<BaseOutputPath>$(SparkRoot)\build\$(Configuration)</BaseOutputPath>
<OutputPath>$(BaseOutputPath)\bin</OutputPath>
<BaseIntermediateOutputPath>$(BaseOutputPath)\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<IntermediateOutputPath>$(BaseOutputPath)\obj\$(MSBuildProjectName)</IntermediateOutputPath>
<GenDir>$(BaseOutputPath)\gen\$(MSBuildProjectName)</GenDir>
</PropertyGroup>
</PropertyGroup>
<Import Project="$(ComputerSpecificConfig)" Condition="Exists($(ComputerSpecificConfig))" />
<Import
Project="$(ComputerSpecificConfig)"
Condition="Exists($(ComputerSpecificConfig))" />
<ItemGroup>
<AvailableItemName Include="Proto2">
<Targets>CompileProto3</Targets>
</AvailableItemName>
<AvailableItemName Include="Proto3">
<Targets>CompileProto3</Targets>
</AvailableItemName>
<AvailableItemName Include="Proto3Excel">
<Targets>CompileProto3Excel</Targets>
</AvailableItemName>
</ItemGroup>
<PropertyGroup Label="ProtoBuf">
<PropertyGroup Label="ProtoBuf">
<ProtocPluginBase>$(SparkRoot)\src\lib\api\service_compiler</ProtocPluginBase>
<ProtoInclude>$(Externals)\include</ProtoInclude>
<protoc>$(Externals)\bin\protoc.exe</protoc>
<protogen>$(Externals)\bin\protogen.exe</protogen>
</PropertyGroup>
</PropertyGroup>
<ItemDefinitionGroup>
<Proto2>
</Proto2>
<ItemDefinitionGroup>
<Proto2></Proto2>
<Proto3>
<OutBase>$(IntermediateOutputPath)\gen\%(relativedir)</OutBase>
<OutCS>%(OutBase)%(FileName).cs</OutCS>
<OutCSClient>%(OutBase)%(FileName).client.pb.cs</OutCSClient>
<OutCSServer>%(OutBase)%(FileName).server.pb.cs</OutCSServer>
<OutCSImmutable>%(OutBase)%(FileName).immutable.pb.cs</OutCSImmutable>
<CompileOptions></CompileOptions>
<OutBase>$(IntermediateOutputPath)\gen\%(relativedir)</OutBase>
<OutCS>%(OutBase)%(FileName).cs</OutCS>
<OutCSClient>%(OutBase)%(FileName).client.pb.cs</OutCSClient>
<OutCSServer>%(OutBase)%(FileName).server.pb.cs</OutCSServer>
<OutCSImmutable>%(OutBase)%(FileName).immutable.pb.cs</OutCSImmutable>
<CompileOptions></CompileOptions>
</Proto3>
<Proto3Excel>
<OutBase>$(IntermediateOutputPath)\gen\%(relativedir)</OutBase>
<OutCSExcel>%(OutBase)%(FileName).excel.pb.cs</OutCSExcel>
<CompileOptions></CompileOptions>
</Proto3Excel>
</ItemDefinitionGroup>
<OutBase>$(IntermediateOutputPath)\gen\%(relativedir)</OutBase>
<OutCSExcel>%(OutBase)%(FileName).excel.pb.cs</OutCSExcel>
<CompileOptions></CompileOptions>
</Proto3Excel>
</ItemDefinitionGroup>
</Project>
+85 -97
View File
@@ -1,97 +1,85 @@
<Project>
<Target Name="CompileProto2"
Condition="'@(Proto2)'!=''"
Inputs="$(MSBuildProjectFile);$(protogen);%(Proto2.FullPath)"
Outputs="$(GenDir)\proto2\%(Proto2.filename).cs"
AfterTargets="PreBuildEvent">
<PropertyGroup>
<SourceRelativeFile>$([System.String]::Copy('%(proto2.fullpath)').Replace($(SourceRoot), ''))</SourceRelativeFile>
<SourceRelativeDir>$([System.IO.Path]::GetDirectoryName($(SourceRelativeFile)))</SourceRelativeDir>
<WorkingDirectory>$(GenDir)\proto2</WorkingDirectory>
</PropertyGroup>
<MakeDir Directories="$(WorkingDirectory)" />
<Copy SourceFiles="%(Proto2.FullPath)" DestinationFolder="$(WorkingDirectory)" SkipUnchangedFiles="True" UseHardLinksIfPossible="True" />
<Error Text="protogen.exe does not exist. If you forgot to clone with externals try: git submodule update --init --recursive" Condition="!Exists($(protogen))" />
<Exec Command="$(Protogen) %(Proto2.filename)%(proto2.extension) --csharp_out=. -I. -I$(SourceRoot) -I$(Externals)\include"
WorkingDirectory="$(WorkingDirectory)" />
<ItemGroup>
<Compile Include="$(WorkingDirectory)\%(Proto2.filename).cs" />
</ItemGroup>
</Target>
<!--
Run this after GetAssemblyVersion because it happens after the Xaml compiler
and exists in both xaml and non-xaml projects. One of the (many) xaml compile
passes wipes out the additional compile includes that we add.
-->
<Target Name="CompileProto3" AfterTargets="GetAssemblyVersion"
Condition="'@(Proto3)'!=''"
Inputs="$(protoc);
%(Proto3.Identity);$(ProtocPluginBase)\plugin.py;
$(ProtocPluginBase)\templates\c#\client.pb.cs;
$(ProtocPluginBase)\templates\c#\server.pb.cs;
$(ProtocPluginBase)\templates\c#\immutable.pb.cs;"
Outputs="%(Proto3.OutCS);%(Proto3.OutCSServer);%(Proto3.OutCSClient);%(Proto3.OutCSImmutable)">
<MakeDir Directories="%(Proto3.OutBase)" />
<Message Importance="High" Text="Generating service %(Proto3.FileName)" />
<Exec Command="
set PATH=$(spark_build_python_path);%path% &amp;
set PYTHONPATH=$(Externals)\python &amp;
$(protoc) ^
%(Proto3.FullPath) ^
--error_format=msvs ^
--proto_path=$(protoinc);$(SourceRoot) ^
--plugin=&quot;protoc-gen-service=$(ProtocPluginBase)\plugin.cmd&quot; ^
--service_out=lang=c#,strip_out_path=1:%(Proto3.OutBase) ^
--csharp_out=%(CompileOptions)%(Proto3.OutBase)"
WorkingDirectory="%(relativedir)" />
<ItemGroup>
<Compile Include="%(Proto3.OutCS)" />
<Compile Include="%(Proto3.OutCSClient)" />
<Compile Include="%(Proto3.OutCSServer)" />
<Compile Include="%(Proto3.OutCSImmutable)" />
</ItemGroup>
</Target>
<Target Name="CompileProto3Excel" AfterTargets="GetAssemblyVersion"
Condition="'@(Proto3Excel)'!=''"
Inputs="$(protoc);
%(Proto3Excel.Identity);$(ProtocPluginBase)\plugin.py;
$(ProtocPluginBase)\templates\excel\excel.pb.cs;"
Outputs="%(Proto3Excel.OutCSExcel)">
<MakeDir Directories="%(Proto3Excel.OutBase)" />
<Message Importance="High" Text="Generating excel service %(Proto3Excel.FileName)" />
<Exec Command="
set PATH=$(spark_build_python_path);%path% &amp;
set PYTHONPATH=$(Externals)\python &amp;
$(protoc) ^
%(Proto3Excel.FullPath) ^
--error_format=msvs ^
--proto_path=$(protoinc);$(SourceRoot) ^
--plugin=&quot;protoc-gen-service=$(ProtocPluginBase)\plugin.cmd&quot; ^
--service_out=lang=excel,strip_out_path=1:%(Proto3Excel.OutBase) ^
"
WorkingDirectory="%(relativedir)" />
<ItemGroup>
<Compile Include="%(Proto3Excel.OutCSExcel)" />
</ItemGroup>
</Target>
<Target Name="AfterClean" AfterTargets="Clean">
<Delete Files="%(Proto3.OutCS)" />
<Delete Files="%(Proto3.OutCSClient)" />
<Delete Files="%(Proto3.OutCSServer)" />
<Delete Files="%(Proto3.OutCSImmutable)" />
<Delete Files="$(GenDir)\proto2\*" />
<Delete Files="%(Proto3Excel.OutCSExcel)" />
</Target>
<Target Name="Test" DependsOnTargets="Build">
</Target>
</Project>
<Project>
<Target
Name="CompileProto2"
Condition="'@(Proto2)'!=''"
Inputs="$(MSBuildProjectFile);$(protogen);%(Proto2.FullPath)"
Outputs="$(GenDir)\proto2\%(Proto2.filename).cs"
AfterTargets="PreBuildEvent">
<PropertyGroup>
<SourceRelativeFile>$([System.String]::Copy('%(proto2.fullpath)').Replace($(SourceRoot), ''))</SourceRelativeFile>
<SourceRelativeDir>$([System.IO.Path]::GetDirectoryName($(SourceRelativeFile)))</SourceRelativeDir>
<WorkingDirectory>$(GenDir)\proto2</WorkingDirectory>
</PropertyGroup>
<MakeDir Directories="$(WorkingDirectory)" />
<Copy
SourceFiles="%(Proto2.FullPath)"
DestinationFolder="$(WorkingDirectory)"
SkipUnchangedFiles="True"
UseHardLinksIfPossible="True" />
<Error
Text="protogen.exe does not exist. If you forgot to clone with externals try: git submodule update --init --recursive"
Condition="!Exists($(protogen))" />
<Exec
Command="$(Protogen) %(Proto2.filename)%(proto2.extension) --csharp_out=. -I. -I$(SourceRoot) -I$(Externals)\include"
WorkingDirectory="$(WorkingDirectory)" />
<ItemGroup>
<Compile Include="$(WorkingDirectory)\%(Proto2.filename).cs" />
</ItemGroup>
</Target>
<!--
Run this after GetAssemblyVersion because it happens after the Xaml compiler
and exists in both xaml and non-xaml projects. One of the (many) xaml compile
passes wipes out the additional compile includes that we add.
-->
<Target
Name="CompileProto3"
AfterTargets="GetAssemblyVersion"
Condition="'@(Proto3)'!=''"
Inputs="$(protoc);
%(Proto3.Identity);$(ProtocPluginBase)\plugin.py;
$(ProtocPluginBase)\templates\c#\client.pb.cs;
$(ProtocPluginBase)\templates\c#\server.pb.cs;
$(ProtocPluginBase)\templates\c#\immutable.pb.cs;"
Outputs="%(Proto3.OutCS);%(Proto3.OutCSServer);%(Proto3.OutCSClient);%(Proto3.OutCSImmutable)">
<MakeDir Directories="%(Proto3.OutBase)" />
<Message
Importance="High"
Text="Generating service %(Proto3.FileName)" />
<Exec Command="$(SparkRoot)\.venv\Scripts\activate.bat" />
<Exec Command="set PYTHONPATH=$(SparkRoot)\.venv\Scripts\python" />
<Exec
Command="
$(SparkRoot)\tools\build_protos.cmd ^
%(Proto3.FullPath) ^
--error_format=msvs ^
--proto_path=$(SourceRoot) ^
--plugin=&quot;protoc-gen-service=$(ProtocPluginBase)\plugin.cmd&quot; ^
--service_out=lang=c#,strip_out_path=1:%(Proto3.OutBase) ^
--csharp_out=%(CompileOptions)%(Proto3.OutBase)"
WorkingDirectory="%(relativedir)" />
<ItemGroup>
<Compile Include="%(Proto3.OutCS)" />
<Compile Include="%(Proto3.OutCSClient)" />
<Compile Include="%(Proto3.OutCSServer)" />
<Compile Include="%(Proto3.OutCSImmutable)" />
</ItemGroup>
</Target>
<Target
Name="AfterClean"
AfterTargets="Clean">
<Delete Files="%(Proto3.OutCS)" />
<Delete Files="%(Proto3.OutCSClient)" />
<Delete Files="%(Proto3.OutCSServer)" />
<Delete Files="%(Proto3.OutCSImmutable)" />
<Delete Files="$(GenDir)\proto2\*" />
</Target>
<Target
Name="Test"
DependsOnTargets="Build"></Target>
</Project>
@@ -0,0 +1,146 @@
namespace mbts.spark {
using mbts.analytics;
using mbts.ui;
using mbts.ui.shell;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reactive.Linq;
class AnalyticsExpirationParametersRowVM : DisposableViewModelBase, ISelectable, IEquatable<AnalyticsExpirationParametersRowVM> {
readonly AnalyticsExpirationParameters _committed_value;
readonly Property<bool> _is_selected;
readonly Property<SecurityExpiration> _driver;
readonly Property<SecurityExpiration> _deliverable;
readonly Property<SecurityExpiration> _roll_schedule;
readonly Property<double> _roll_target;
readonly Property<double> _riskless_rate;
readonly Property<double> _settlement_price;
readonly Property<double> _delta_beta;
readonly Property<double> _vega_beta;
readonly Property<bool> _is_driver_dirty;
readonly Property<bool> _is_deliverable_dirty;
readonly Property<bool> _is_roll_schedule_dirty;
readonly Property<bool> _is_roll_target_dirty;
readonly Property<bool> _is_riskless_rate_dirty;
readonly Property<bool> _is_settlement_price_dirty;
readonly Property<bool> _is_delta_beta_dirty;
readonly Property<bool> _is_vega_beta_dirty;
readonly Property<bool> _is_dirty;
bool _is_last_row_of_month_group;
public AnalyticsExpirationParametersRowVM(AnalyticsExpirationParametersVM owner, AnalyticsExpirationParameters committed_value) {
this.owner = owner ?? throw new ArgumentNullException(nameof(owner));
_committed_value = committed_value ?? throw new ArgumentNullException(nameof(committed_value));
security = committed_value.security ?? throw new ArgumentException("security must be non-null", nameof(committed_value));
_is_selected = backing(nameof(is_selected), false);
_is_selected.Changed += (oldval, newval) => is_selected_changed?.Invoke(newval);
var is_dirty_srcs = new List<IObservable<bool>>();
(_driver, _is_driver_dirty) = mk_cell_props(nameof(driver), committed_value.driver_security);
(_deliverable, _is_deliverable_dirty) = mk_cell_props(nameof(deliverable), committed_value.deliverable_security);
(_roll_schedule, _is_roll_schedule_dirty) = mk_cell_props(nameof(roll_schedule), committed_value.roll_schedule_expiration);
(_roll_target, _is_roll_target_dirty) = mk_cell_props(nameof(roll_target), committed_value.roll_target);
(_riskless_rate, _is_riskless_rate_dirty) = mk_cell_props(nameof(riskless_rate), committed_value.riskless_rate);
(_settlement_price, _is_settlement_price_dirty) = mk_cell_props(nameof(settlement_price), committed_value.settlement_price);
(_delta_beta, _is_delta_beta_dirty) = mk_cell_props(nameof(delta_beta), committed_value.delta_beta);
(_vega_beta, _is_vega_beta_dirty) = mk_cell_props(nameof(vega_beta), committed_value.vega_beta);
_is_dirty = backing(
nameof(is_dirty),
Observable.CombineLatest(is_dirty_srcs).Select(dirties => dirties.Any()).OnDispatcher());
(Property<T> prop, Property<bool> dirty_prop) mk_cell_props<T>(string name, T orig_val) {
var prop = backing(name, orig_val);
var dirty_src = prop.observe_current(true).Select(new_val => !Equals(new_val, orig_val));
is_dirty_srcs.Add(dirty_src);
var dirty_prop = backing($"is_{prop.name}_dirty", dirty_src);
return (prop, dirty_prop);
}
}
public event Action<bool> is_selected_changed;
public AnalyticsExpirationParametersVM owner { get; }
public SecurityExpiration security { get; }
public SecurityExpiration driver { get => _driver.Value; set => _driver.set(value); }
public SecurityExpiration deliverable { get => _deliverable.Value; set => _deliverable.set(value); }
public SecurityExpiration roll_schedule { get => _roll_schedule.Value; set => _roll_schedule.set(value); }
public AnalyticsExpirationParameters original_params => _committed_value;
public double roll_target { get => _roll_target.Value; set => _roll_target.set(value); }
public double riskless_rate { get => _riskless_rate.Value; set => _riskless_rate.set(value); }
public double settlement_price { get => _settlement_price.Value; set => _settlement_price.set(value); }
public double delta_beta { get => _delta_beta.Value; set => _delta_beta.set(value); }
public double vega_beta { get => _vega_beta.Value; set => _vega_beta.set(value); }
public bool is_driver_dirty => _is_driver_dirty.Value;
public bool is_deliverable_dirty => _is_deliverable_dirty.Value;
public bool is_roll_schedule_dirty => _is_roll_schedule_dirty.Value;
public bool is_roll_target_dirty => _is_roll_target_dirty.Value;
public bool is_riskless_rate_dirty => _is_riskless_rate_dirty.Value;
public bool is_settlement_price_dirty => _is_settlement_price_dirty.Value;
public bool is_delta_beta_dirty => _is_delta_beta_dirty.Value;
public bool is_vega_beta_dirty => _is_vega_beta_dirty.Value;
public bool is_dirty => _is_dirty.Value;
public bool is_selected {
get => _is_selected.Value;
set => _is_selected.set(value);
}
public bool is_last_row_of_month_group {
get => _is_last_row_of_month_group;
set => Set(ref _is_last_row_of_month_group, value);
}
public AnalyticsExpirationParameters candidate_value => new(
security,
driver,
deliverable.is_empty() ? null : deliverable,
roll_schedule.is_empty() ? null : roll_schedule,
roll_target,
riskless_rate,
settlement_price,
delta_beta,
vega_beta);
public IObservable<SecurityExpiration> observe_roll_schedule() =>
_roll_schedule.observe_current(true);
public IObservable<bool> observe_roll_schedule_dirty() =>
_is_roll_schedule_dirty.observe_current(true);
public IObservable<bool> observe_is_dirty() =>
_is_dirty.observe_current(true);
public void revert() {
driver = _committed_value.driver_security;
deliverable = _committed_value.deliverable_security;
roll_schedule = _committed_value.roll_schedule_expiration;
roll_target = _committed_value.roll_target;
riskless_rate = _committed_value.riskless_rate;
settlement_price = _committed_value.settlement_price;
delta_beta = _committed_value.delta_beta;
vega_beta = _committed_value.vega_beta;
}
public override string ToString() =>
$"sec: {security}; drv: {driver}; dlv: {deliverable}; roll: {roll_schedule} @ {roll_target}";
public bool Equals(AnalyticsExpirationParametersRowVM other) =>
other is not null &&
security.Equals(other.security);
public override bool Equals(object obj) =>
Equals(obj as AnalyticsExpirationParametersRowVM);
public override int GetHashCode() =>
security.GetHashCode();
}
}
@@ -0,0 +1,19 @@
namespace mbts.spark {
using ProtoBuf;
[ProtoContract]
class AnalyticsExpirationParametersSettings {
public const int VERSION = 1;
public static AnalyticsExpirationParametersSettings Default => new();
[ProtoMember(10)]
public string[] selected_symbols {get;set;}
[ProtoMember(20)]
public bool auto_copy_rates_is_checked {get;set;}
[ProtoMember(30)]
public bool auto_copy_rolls_is_checked {get;set;}
}
}
@@ -0,0 +1,236 @@
namespace mbts.spark {
using bts.api;
using bts.reactive;
using bts.utils;
using mbts;
using mbts.analytics;
using mbts.collections;
using mbts.ui;
using mbts.ui.controls;
using mbts.ui.shell;
using mbts.ui.utility;
using mbts.utils;
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Linq;
using System.Reactive;
using System.Reactive.Linq;
using System.Windows.Controls;
using System.Windows.Input;
class AnalyticsExpirationParametersVM : DisposableViewModelBase, IHandleRowSelection {
readonly IBus _bus;
readonly ObservableCollection<AnalyticsExpirationParameters> _parameters = new();
readonly DeferrableActionWrapper _sync_visible_rows;
readonly Property<AnalyticsExpirationParametersRowVM> _copy_row_source;
readonly DelegateProperty<bool> _is_dirty;
readonly HashSet<AnalyticsExpirationParametersRowVM> _selected_rows = new();
AnalyticsExpirationParametersMap _parameter_map;
bool _auto_copy_rolls_is_checked;
bool _auto_copy_rates_is_checked;
(ICommand cmd, IDisposable can_exe_sub)? _smart_copy_roll_target_to_selection_cmd;
(ICommand cmd, IDisposable can_exe_sub)? _smart_copy_riskless_rate_to_selection_cmd;
public AnalyticsExpirationParametersVM(IBus bus, AnalyticsExpirationParametersSettings startup_data) {
_bus = bus ?? throw new ArgumentNullException(nameof(bus));
var selected_symbol_ref_count = new RefCountMap<string>();
_sync_visible_rows = new(() =>
visible_rows.sync_with(rows.Where(x => selected_symbol_ref_count.ContainsKey(x.security.symbol))));
non_options_with_empty = new ObservableAggregateCollection<SecurityExpiration>(
new() { SecurityExpiration.empty }, non_options);
_copy_row_source = backing<AnalyticsExpirationParametersRowVM>(nameof(copy_row_source));
_is_dirty = backing(nameof(is_dirty), () => rows.Any(r => r.is_dirty));
if (startup_data is not null) {
if (!startup_data.selected_symbols.is_null_or_empty()) {
selected_symbols.AddRange(startup_data.selected_symbols);
}
auto_copy_rolls_is_checked = startup_data.auto_copy_rolls_is_checked;
auto_copy_rates_is_checked = startup_data.auto_copy_rates_is_checked;
}
commit_cmd = ObservantCommand.create(_commit, out var can_commit_observer);
revert_cmd = ObservantCommand.create(_revert, out var can_revert_observer);
_dispose = Disposable.Create(
ObservableAutoWrapper.connect(_parameters, rows, p => new(this, p), r => r.Dispose()),
rows.Subscribe((s, e) => _sync_visible_rows.execute()),
_bus.subscribe(SparkTags.ExpirationParametersInputTag).OnDispatcher().Subscribe(
CompositeObserver.create(
Observer.Create<AnalyticsExpirationParametersMap>(_on_parameter_map),
can_commit_observer.wrap<bool, AnalyticsExpirationParametersMap>(m => m is not null))),
ObservableAutoWrapper.connect_item_hooks(selected_symbols, sym => {
if (selected_symbol_ref_count.increment_adds_key(sym)) {
_sync_visible_rows.execute();
}
return Disposable.Create(() => {
if (selected_symbol_ref_count.decrement_removes_key(sym)) {
_sync_visible_rows.execute();
}
});
}),
ObservableAutoWrapper.connect_item_hooks(rows, r => r.observe_is_dirty().Subscribe(_ => _is_dirty.refresh())),
_is_dirty.observe_current(true).OnDispatcher().Subscribe(can_revert_observer),
Disposable.wrap_collection(rows),
Disposable.Create(() => {
_smart_copy_roll_target_to_selection_cmd?.can_exe_sub?.Dispose();
_smart_copy_riskless_rate_to_selection_cmd?.can_exe_sub?.Dispose();
}));
}
public ObservableCollection<SecurityExpiration> non_options { get; } = new();
public ObservableCollection<SecurityExpiration> non_options_with_empty { get; } = new();
public ObservableCollection<AnalyticsExpirationParametersRowVM> rows { get; } = new();
public ObservableCollection<AnalyticsExpirationParametersRowVM> visible_rows { get; } = new();
public AnalyticsExpirationParametersRowVM copy_row_source {
get => _copy_row_source.Value;
set => _copy_row_source.set(value);
}
public ObservableCollection<string> symbols { get; } = new();
public ObservableCollection<string> selected_symbols { get; } = new();
public bool is_dirty => _is_dirty.Value;
public bool auto_copy_rolls_is_checked {
get => _auto_copy_rolls_is_checked;
set => Set(ref _auto_copy_rolls_is_checked, value);
}
public bool auto_copy_rates_is_checked {
get => _auto_copy_rates_is_checked;
set => Set(ref _auto_copy_rates_is_checked, value);
}
public ICommand commit_cmd { get; }
public ICommand revert_cmd { get; }
public ICommand copy_driver_to_selection_cmd => _copy_to_selection_cmd((f, t) => t.driver = f.driver);
public ICommand copy_deliverable_to_selection_cmd => _copy_to_selection_cmd((f, t) => t.deliverable = f.deliverable);
public ICommand copy_roll_schedule_to_selection_cmd => _copy_to_selection_cmd((f, t) => t.roll_schedule = f.roll_schedule);
public ICommand copy_roll_target_to_selection_cmd => _copy_to_selection_cmd((f, t) => t.roll_target = f.roll_target);
public ICommand copy_riskless_rate_to_selection_cmd => _copy_to_selection_cmd((f, t) => t.riskless_rate = f.riskless_rate);
public ICommand copy_settlement_price_to_selection_cmd => _copy_to_selection_cmd((f, t) => t.settlement_price = f.settlement_price);
public ICommand copy_delta_beta_to_selection_cmd => _copy_to_selection_cmd((f, t) => t.delta_beta = f.delta_beta);
public ICommand copy_vega_beta_to_selection_cmd => _copy_to_selection_cmd((f, t) => t.vega_beta = f.vega_beta);
public ICommand smart_copy_roll_target_to_selection_cmd =>
(_smart_copy_roll_target_to_selection_cmd ??= _smart_copy_to_selection_cmd(
(f, t) => t.roll_target = f.roll_target)).cmd;
public ICommand smart_copy_riskless_rate_to_selection_cmd =>
(_smart_copy_riskless_rate_to_selection_cmd ??= _smart_copy_to_selection_cmd(
(f, t) => t.riskless_rate = f.riskless_rate)).cmd;
public void commit(IEnumerable<AnalyticsExpirationParameters> data) =>
_bus.post(SparkTags.ExpirationParametersCommitTag, data);
public IEnumerable<SecurityExpiration> get_smart_copy_roll_exps(
AnalyticsExpirationParameters source) =>
get_smart_copy_roll_exps(source.roll_schedule_expiration);
public IEnumerable<SecurityExpiration> get_smart_copy_roll_exps(
SecurityExpiration roll_schedule_expiration) {
foreach (var (exp, exp_params) in _parameter_map?.exp_map.empty_if_null()) {
if (exp_params.roll_schedule_expiration.Equals(roll_schedule_expiration)) {
yield return exp;
}
}
}
public AnalyticsExpirationParametersSettings get_state() =>
new() {
selected_symbols = selected_symbols.Cast<string>().ToArray(),
auto_copy_rates_is_checked = auto_copy_rates_is_checked,
auto_copy_rolls_is_checked = auto_copy_rolls_is_checked
};
Action<AnalyticsExpirationParametersRowVM> _copy_to_selection(Action<AnalyticsExpirationParametersRowVM, AnalyticsExpirationParametersRowVM> copy_to_row) =>
from_row => {
foreach (var to_row in _selected_rows) {
copy_to_row(from_row, to_row);
}
};
ICommand _copy_to_selection_cmd(Action<AnalyticsExpirationParametersRowVM, AnalyticsExpirationParametersRowVM> copy_to_row) =>
Command.create(_copy_to_selection(copy_to_row));
Action<AnalyticsExpirationParametersRowVM> _smart_copy_to_selection(Action<AnalyticsExpirationParametersRowVM, AnalyticsExpirationParametersRowVM> copy_to_row) =>
from_row => {
foreach (var to_row in _get_smart_copy_roll_target_rows(from_row)) {
copy_to_row(from_row, to_row);
}
};
(ICommand cmd, IDisposable can_exe_sub) _smart_copy_to_selection_cmd(
Action<AnalyticsExpirationParametersRowVM, AnalyticsExpirationParametersRowVM> copy_to_row) {
var cmd = ObservantCommand.create(
_smart_copy_to_selection(copy_to_row), observe_can_execute, out var can_exe_observer);
var can_exe_sub = _copy_row_source.observe_current(true).OnDispatcher().Subscribe(can_exe_observer);
return (cmd, can_exe_sub);
static IObservable<bool> observe_can_execute(AnalyticsExpirationParametersRowVM row) =>
row is null ?
Observable.Return(false) :
row.observe_roll_schedule()
.CombineLatest(row.observe_roll_schedule_dirty(), (rs, rs_dirty) => (rs, rs_dirty))
.Select(tup => !tup.rs.is_empty() && !tup.rs_dirty)
.OnDispatcher();
}
IEnumerable<AnalyticsExpirationParametersRowVM> _get_smart_copy_roll_target_rows(AnalyticsExpirationParametersRowVM row) {
var target_exps = get_smart_copy_roll_exps(
row.original_params.roll_schedule_expiration)
.ToHashSet();
return rows.Where(r => target_exps.Contains(r.security));
}
void _commit() {
if (_parameter_map is null) {
// Don't commit before [any] data has been received from the server
return;
}
var new_params = rows.Select(r => r.candidate_value).ToImmutableList();
_bus.post(SparkTags.ExpirationParametersCommitTag, new_params);
}
void _revert() {
foreach (var r in rows) {
r.revert();
}
}
void _on_parameter_map(AnalyticsExpirationParametersMap parameter_map) {
bool is_first_update = _parameter_map is null;
_parameter_map = parameter_map ?? throw new ArgumentNullException(nameof(parameter_map));
_parameters.sync_with(parameter_map.get_sorted_exps().Select(parameter_map.get_parameter));
non_options.sync_with(parameter_map.get_sorted_exps().Where(exp => exp.security_type != SecurityType.Option));
// Set `is_last_row_of_month_group` for each row
foreach (var exp_rows in rows.GroupBy(r => r.security.expiration.Month)) {
var sorted_exp_rows = exp_rows.OrderBy(r => r.security.expiration).ToList();
foreach (var row in sorted_exp_rows.Take(sorted_exp_rows.Count - 1)) {
row.is_last_row_of_month_group = false;
}
sorted_exp_rows.Last().is_last_row_of_month_group = true;
}
symbols.sync_with(_parameters.Select(p => p.security.symbol).Distinct().Ordered());
using var _ = _sync_visible_rows.defer_execution();
if (is_first_update) {
// select all symbols on first update
selected_symbols.sync_with(symbols);
}
}
public void row_selection_changed(SelectionChangedEventArgs e) =>
RowSelectionHelper.apply_changes(_selected_rows, e);
}
}
@@ -0,0 +1,547 @@
<UserControl
x:Class="mbts.ui.shell.AnalyticsExpirationParametersView"
x:ClassModifier="internal"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:c="clr-namespace:mbts.ui.controls"
xmlns:u="clr-namespace:mbts.ui"
xmlns:cv="clr-namespace:mbts.ui.converters"
xmlns:shell="clr-namespace:mbts.ui.shell"
Background="{StaticResource CommonBackground}">
<UserControl.Resources>
<cv:DoubleTextConverter x:Key="DoubleTextConverter" />
<cv:DoubleTextConverter
x:Key="RisklessRateConverter"
Multiplier="100" />
<shell:ExpTextConverter
x:Key="ExpirationTextConverter"
ShowSymbol="True"
MapExp="True" />
<DataTemplate x:Key="ExpirationTemplate">
<TextBlock Text="{Binding Converter={StaticResource ExpirationTextConverter}}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Style.Triggers>
<Trigger
Property="Text"
Value="None">
<Setter
Property="FontStyle"
Value="Italic" />
<Setter
Property="Foreground"
Value="Gray" />
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</DataTemplate>
<ContextMenu x:Key="DriverContextMenu">
<MenuItem
Header="Copy Driver to Selection"
Command="{Binding owner.copy_driver_to_selection_cmd}"
CommandParameter="{Binding}"
/>
</ContextMenu>
<ContextMenu x:Key="DeliverableContextMenu">
<MenuItem
Header="Copy Deliverable to Selection"
Command="{Binding owner.copy_deliverable_to_selection_cmd}"
CommandParameter="{Binding}"
/>
</ContextMenu>
<ContextMenu x:Key="RollScheduleContextMenu">
<MenuItem
Header="Copy Roll Schedule to Selection"
Command="{Binding owner.copy_roll_schedule_to_selection_cmd}"
CommandParameter="{Binding}"
/>
</ContextMenu>
<ContextMenu x:Key="RollTargetContextMenu">
<MenuItem
Header="Copy Roll Target to Selection"
Command="{Binding owner.copy_roll_target_to_selection_cmd}"
CommandParameter="{Binding}"
/>
<MenuItem
Header="Smart Copy Roll Target"
Command="{Binding owner.smart_copy_roll_target_cmd}"
CommandParameter="{Binding}"
/>
</ContextMenu>
<ContextMenu x:Key="RisklessRateContextMenu">
<MenuItem
Header="Copy Riskless Rate to Selection"
Command="{Binding owner.copy_riskless_rate_to_selection_cmd}"
CommandParameter="{Binding}"
/>
</ContextMenu>
<ContextMenu x:Key="SettlementPriceContextMenu">
<MenuItem
Header="{Binding security}"
HeaderStringFormat="Copy '{0}' Settlement to Selection"
Command="{Binding owner.copy_settlement_price_to_selection_cmd}"
CommandParameter="{Binding}"
/>
</ContextMenu>
<ContextMenu x:Key="DeltaBetaContextMenu">
<MenuItem
Header="Copy Delta Beta to Selection"
Command="{Binding owner.copy_delta_beta_to_selection_cmd}"
CommandParameter="{Binding}"
/>
</ContextMenu>
<ContextMenu x:Key="VegaBetaContextMenu">
<MenuItem
Header="Copy Vega Beta to Selection"
Command="{Binding owner.copy_vega_beta_to_selection_cmd}"
CommandParameter="{Binding}"
/>
</ContextMenu>
</UserControl.Resources>
<Grid>
<Grid.Resources>
<cv:BooleanToVisibilityConverter x:Key="TrueVisibilityConverter" />
<cv:BooleanToVisibilityConverter x:Key="FalseVisibilityConverter" VisibilityForFalse="Visible" VisibilityForTrue="Collapsed" />
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<StackPanel
Grid.Row="0"
Orientation="Horizontal"
Margin="0,5,0,5">
<c:ComboCheckBox
ItemsSource="{Binding symbols}"
SelectedItems="{Binding selected_symbols}"
HorizontalAlignment="Left"
Margin="5,2,2,2"
TextBlock.Foreground="Black"
HeaderContent="Symbols"
ShowSelectAll="True"
/>
<WrapPanel>
<TextBlock Margin="5,5,0,0" Text="Auto copy rolls:" />
<CheckBox Margin="5,5,10,0" IsChecked="{Binding auto_copy_rolls_is_checked}" />
</WrapPanel>
<WrapPanel>
<TextBlock Margin='0,5,0,0' Text="Auto copy rates:" />
<CheckBox Margin="5,5,0,0" IsChecked="{Binding auto_copy_rates_is_checked}" />
</WrapPanel>
</StackPanel>
<c:DataGridEx
x:Name="_grid"
Grid.Row="1"
ItemsSource="{Binding visible_rows}"
AlternatingRowBackground="{u:BTSColor MarketData.driver_background}"
VerticalGridLinesBrush="Gray"
EnableRowVirtualization="True"
EnableColumnVirtualization="True"
CanUserAddRows="False"
AutoGenerateColumns="False"
CanUserReorderColumns="False"
CanUserSortColumns="False"
CanUserDeleteRows="False"
RowHeaderWidth="0"
GridLinesVisibility="Vertical"
SelectionUnit="FullRow"
SelectedUnits="{Binding selected_rows}"
PreviewMouseRightButtonUp="_grid_PreviewMouseRightButtonUp">
<DataGrid.Resources>
<Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource {x:Type DataGridCell}}">
<Setter Property="BorderThickness" Value="1" />
<Style.Triggers>
<Trigger
Property="IsSelected"
Value="True">
<Setter
Property="Background"
Value="{u:BTSColor Grid.grid_selection_background}" />
<Setter
Property="BorderBrush"
Value="{u:BTSColor Grid.grid_selection_background}" />
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.Resources>
<DataGrid.RowStyle>
<Style TargetType="DataGridRow">
<Setter Property="IsSelected" Value="{Binding is_selected, Mode=TwoWay}"/>
<Setter Property="Background" Value="Transparent"/>
<Style.Triggers>
<Trigger
Property="IsSelected"
Value="true">
<Setter
Property="Background"
Value="{u:BTSColor Grid.grid_selection_background}" />
</Trigger>
<DataTrigger
Binding="{Binding is_last_row_of_month_group}"
Value="True">
<Setter
Property="BorderThickness"
Value="0,0,0,1" />
<Setter
Property="BorderBrush"
Value="Black" />
</DataTrigger>
</Style.Triggers>
</Style>
</DataGrid.RowStyle>
<DataGrid.ColumnHeaderStyle>
<Style TargetType="DataGridColumnHeader">
<Setter
Property="Background"
Value="{u:BTSColor Name=header}" />
<Setter
Property="Foreground"
Value="{u:BTSColor Name=header_text}" />
<Setter
Property="HorizontalContentAlignment"
Value="Center" />
<Setter
Property="BorderThickness"
Value="0,0,1,0" />
<Setter
Property="BorderBrush"
Value="Black" />
<Setter
Property="Padding"
Value="3" />
<Setter
Property="MinWidth"
Value="80" />
</Style>
</DataGrid.ColumnHeaderStyle>
<DataGrid.Columns>
<DataGridTextColumn
Header="Security"
Binding="{Binding security, Converter={StaticResource ExpirationTextConverter}}"
IsReadOnly="True">
<DataGridTextColumn.CellStyle>
<Style
TargetType="DataGridCell"
BasedOn="{StaticResource {x:Type DataGridCell}}">
<Setter
Property="Background"
Value="{u:BTSColor Name=header}" />
<Setter
Property="Foreground"
Value="{u:BTSColor Name=header_text}" />
<Setter
Property="BorderThickness"
Value="0" />
<Setter
Property="VerticalContentAlignment"
Value="Center" />
<Setter
Property="Padding"
Value="3" />
<Style.Triggers>
<DataTrigger
Binding="{Binding security.security_type}"
Value="OPTION">
<Setter
Property="Foreground"
Value="{u:BTSColor Name=header_text}" />
</DataTrigger>
<DataTrigger
Binding="{Binding security.security_type}"
Value="FUTURE">
<Setter
Property="Foreground"
Value="Gold" />
</DataTrigger>
<DataTrigger
Binding="{Binding security.security_type}"
Value="UNSET">
<Setter
Property="Foreground"
Value="PaleGreen" />
</DataTrigger>
</Style.Triggers>
</Style>
</DataGridTextColumn.CellStyle>
</DataGridTextColumn>
<DataGridTemplateColumn
Header="Driver"
MinWidth="105">
<DataGridTemplateColumn.CellStyle>
<Style
TargetType="DataGridCell"
BasedOn="{StaticResource {x:Type DataGridCell}}">
<Setter
Property="ContextMenu"
Value="{StaticResource DriverContextMenu}" />
<Style.Triggers>
<DataTrigger
Binding="{Binding is_driver_dirty}"
Value="True">
<Setter
Property="BorderBrush"
Value="Red" />
</DataTrigger>
</Style.Triggers>
</Style>
</DataGridTemplateColumn.CellStyle>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<ComboBox
ItemsSource="{Binding DataContext.non_options, RelativeSource={RelativeSource AncestorType=c:DataGridEx}}"
ItemTemplate="{StaticResource ExpirationTemplate}"
SelectedItem="{Binding driver, UpdateSourceTrigger=PropertyChanged}"
Margin="2" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn
Header="Deliverable"
MinWidth="105">
<DataGridTemplateColumn.CellStyle>
<Style
TargetType="DataGridCell"
BasedOn="{StaticResource {x:Type DataGridCell}}">
<Setter
Property="ContextMenu"
Value="{StaticResource DeliverableContextMenu}" />
<Style.Triggers>
<DataTrigger
Binding="{Binding is_deliverable_dirty}"
Value="True">
<Setter
Property="BorderBrush"
Value="Red" />
</DataTrigger>
</Style.Triggers>
</Style>
</DataGridTemplateColumn.CellStyle>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<ComboBox
ItemsSource="{Binding DataContext.non_options_with_empty, RelativeSource={RelativeSource AncestorType=c:DataGridEx}}"
ItemTemplate="{StaticResource ExpirationTemplate}"
SelectedItem="{Binding deliverable, UpdateSourceTrigger=PropertyChanged}"
Margin="2" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn
Header="Roll Schedule"
MinWidth="105">
<DataGridTemplateColumn.CellStyle>
<Style
TargetType="DataGridCell"
BasedOn="{StaticResource {x:Type DataGridCell}}">
<Setter
Property="ContextMenu"
Value="{StaticResource RollScheduleContextMenu}" />
<Style.Triggers>
<DataTrigger
Binding="{Binding is_roll_schedule_dirty}"
Value="True">
<Setter
Property="BorderBrush"
Value="Red" />
</DataTrigger>
</Style.Triggers>
</Style>
</DataGridTemplateColumn.CellStyle>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<ComboBox
ItemsSource="{Binding DataContext.non_options_with_empty, RelativeSource={RelativeSource AncestorType=c:DataGridEx}}"
ItemTemplate="{StaticResource ExpirationTemplate}"
SelectedItem="{Binding roll_schedule, UpdateSourceTrigger=PropertyChanged}"
Margin="2" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="Roll Target $">
<DataGridTemplateColumn.CellStyle>
<Style
TargetType="DataGridCell"
BasedOn="{StaticResource {x:Type DataGridCell}}">
<Setter
Property="ContextMenu"
Value="{StaticResource RollTargetContextMenu}" />
<Style.Triggers>
<DataTrigger
Binding="{Binding is_roll_target_dirty}"
Value="True">
<Setter
Property="BorderBrush"
Value="Red" />
</DataTrigger>
</Style.Triggers>
</Style>
</DataGridTemplateColumn.CellStyle>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock
Text="{Binding roll_target, Converter={StaticResource DoubleTextConverter}}"
VerticalAlignment="Center"
Margin="2,0,2,0"
ContextMenu="{StaticResource RollTargetContextMenu}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<TextBox
Text="{Binding roll_target, Converter={StaticResource DoubleTextConverter}}"
Margin="2" />
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="Riskless Rate %">
<DataGridTemplateColumn.CellStyle>
<Style
TargetType="DataGridCell"
BasedOn="{StaticResource {x:Type DataGridCell}}">
<Setter
Property="ContextMenu"
Value="{StaticResource RisklessRateContextMenu}" />
<Style.Triggers>
<DataTrigger
Binding="{Binding is_riskless_rate_dirty}"
Value="True">
<Setter
Property="BorderBrush"
Value="Red" />
</DataTrigger>
</Style.Triggers>
</Style>
</DataGridTemplateColumn.CellStyle>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock
Text="{Binding riskless_rate, Converter={StaticResource RisklessRateConverter}}"
VerticalAlignment="Center"
Margin="2,0,2,0"
ContextMenu="{StaticResource RisklessRateContextMenu}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<TextBox Text="{Binding riskless_rate, Converter={StaticResource RisklessRateConverter}}" />
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="Settlement Price $">
<DataGridTemplateColumn.CellStyle>
<Style
TargetType="DataGridCell"
BasedOn="{StaticResource {x:Type DataGridCell}}">
<Setter
Property="ContextMenu"
Value="{StaticResource SettlementPriceContextMenu}" />
<Style.Triggers>
<DataTrigger
Binding="{Binding is_settlement_price_dirty}"
Value="True">
<Setter
Property="BorderBrush"
Value="Red" />
</DataTrigger>
</Style.Triggers>
</Style>
</DataGridTemplateColumn.CellStyle>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock
Text="{Binding settlement_price, Converter={StaticResource DoubleTextConverter}}"
VerticalAlignment="Center"
Margin="2,0,2,0"
ContextMenu="{StaticResource SettlementPriceContextMenu}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<TextBox Text="{Binding settlement_price, Converter={StaticResource DoubleTextConverter}}" />
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="Delta Beta">
<DataGridTemplateColumn.CellStyle>
<Style
TargetType="DataGridCell"
BasedOn="{StaticResource {x:Type DataGridCell}}">
<Setter
Property="ContextMenu"
Value="{StaticResource DeltaBetaContextMenu}" />
<Style.Triggers>
<DataTrigger
Binding="{Binding is_delta_beta_dirty}"
Value="True">
<Setter
Property="BorderBrush"
Value="Red" />
</DataTrigger>
</Style.Triggers>
</Style>
</DataGridTemplateColumn.CellStyle>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock
Text="{Binding delta_beta, Converter={StaticResource DoubleTextConverter}}"
VerticalAlignment="Center"
Margin="2,0,2,0"
ContextMenu="{StaticResource DeltaBetaContextMenu}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<TextBox Text="{Binding delta_beta, Converter={StaticResource DoubleTextConverter}}" />
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="Vega Beta">
<DataGridTemplateColumn.CellStyle>
<Style
TargetType="DataGridCell"
BasedOn="{StaticResource {x:Type DataGridCell}}">
<Setter
Property="ContextMenu"
Value="{StaticResource VegaBetaContextMenu}" />
<Style.Triggers>
<DataTrigger
Binding="{Binding is_vega_beta_dirty}"
Value="True">
<Setter
Property="BorderBrush"
Value="Red" />
</DataTrigger>
</Style.Triggers>
</Style>
</DataGridTemplateColumn.CellStyle>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock
Text="{Binding vega_beta, Converter={StaticResource DoubleTextConverter}}"
VerticalAlignment="Center"
Margin="2,0,2,0"
ContextMenu="{StaticResource VegaBetaContextMenu}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<TextBox Text="{Binding vega_beta, Converter={StaticResource DoubleTextConverter}}" />
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</c:DataGridEx>
</Grid>
</UserControl>
@@ -0,0 +1,76 @@
namespace mbts.ui.shell {
using bts.api;
using mbts.spark;
using mbts.ui.controls;
using mbts.ui.extensions;
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Input;
/// <summary>
/// Interaction logic for AnalyticsExpirationParametersView.xaml
/// </summary>
partial class AnalyticsExpirationParametersView : UserControl {
IDisposable _context_menu_op;
IDisposable _data_context_hooks;
public AnalyticsExpirationParametersView() {
InitializeComponent();
DataContextChanged += on_data_context_changed;
void on_data_context_changed(object sender, DependencyPropertyChangedEventArgs e) {
Disposable.dispose(ref _data_context_hooks);
if (e.NewValue is IHandleRowSelection hrs) {
hrs.row_selection_changed(new(Selector.SelectionChangedEvent, Array.Empty<object>(), _grid.SelectedItems));
_data_context_hooks = _grid.SubscribeSelectionChanged((s, e) => hrs.row_selection_changed(e));
}
}
}
void _grid_PreviewMouseRightButtonUp(object sender, MouseButtonEventArgs e) {
Disposable.dispose(ref _context_menu_op);
if (e.OriginalSource is not FrameworkElement el || DataContext is not AnalyticsExpirationParametersVM vm) {
return;
}
var cell = el.find_ancestor_of_type<DataGridCell>();
if (cell?.ContextMenu is not ContextMenu cm || cell.DataContext is not AnalyticsExpirationParametersRowVM row) {
return;
}
vm.copy_row_source = row;
cm.DataContext = row;
cm.IsOpen = true;
_context_menu_op = cm.SubscribeClosed((s, e) => vm.copy_row_source = null);
e.Handled = true;
}
}
class ExpTextConverter : IValueConverter {
public ExpTextConverter() {
NullOrEmptyText = "None";
}
public bool ShowType { get; set; }
public bool ShowSymbol { get; set; }
public bool MapExp { get; set; }
public string NullOrEmptyText { get; set; }
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) {
var exp = value as SecurityExpiration;
if (exp == null || exp.is_empty()) {
return NullOrEmptyText;
}
return ShowSymbol ?
SecurityFormatter.format_future(exp.symbol, exp.expiration) :
DateFormatter.Format(exp.expiration, DateFormat.MonthCodeLastDigitYear);
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) {
throw new NotImplementedException();
}
}
}
@@ -0,0 +1,48 @@
namespace mbts.spark {
using bts.api;
using bts.spark;
using mbts.ui;
using mbts.ui.shell;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Input;
class AnalyticsExpirationParametersWindow : SparkWindow<AnalyticsExpirationParametersSettings>, ISharedWindow {
public const string WINDOW_TYPE = "AnalyticsExpirationParameters";
readonly AnalyticsExpirationParametersSettings _init_settings;
List<SparkCommand> _commands;
AnalyticsExpirationParametersVM _vm;
AnalyticsExpirationParametersView _view;
public AnalyticsExpirationParametersWindow(
IBus bus, AnalyticsExpirationParametersWindowFactory factory, AnalyticsExpirationParametersSettings settings)
: base("Analytics Exp Params", bus, factory) {
_init_settings = settings;
_dispose = Disposable.Create(() => _vm?.Dispose());
}
public override string window_type => WINDOW_TYPE;
public string thread_id => WINDOW_TYPE;
public override AnalyticsExpirationParametersSettings SaveState =>
_vm?.get_state();
public override UIElement Content =>
_view;
public override IEnumerable<SparkCommand> Commands => _commands.empty_if_null();
public void thread_init() {
_vm = new AnalyticsExpirationParametersVM(_bus, _init_settings);
_view = new AnalyticsExpirationParametersView { DataContext = _vm };
_commands = new() {
new SparkCommandCommand("Commit", Icons.Disk, _vm.commit_cmd, new KeyGesture(Key.S, ModifierKeys.Control)),
new SparkCommandCommand("Revert", Icons.UndoCircular, _vm.revert_cmd, new KeyGesture(Key.Z, ModifierKeys.Control)),
};
}
}
}
@@ -0,0 +1,30 @@
namespace mbts.spark {
using bts.api;
using bts.shell;
using bts.spark;
using mbts.ui;
using System;
using System.Reactive.Linq;
using System.Threading.Tasks;
class AnalyticsExpirationParametersWindowFactory : ShellWindowFactory<AnalyticsExpirationParametersSettings> {
readonly IBus _bus;
public AnalyticsExpirationParametersWindowFactory(IShellModule module, IBus bus)
: base(module, SparkCommands.show_vol_surface.title) {
_bus = bus;
_dispose = bus.subscribe(SparkTags.show_analytics_exp_params).OnDispatcher().Subscribe(_show);
}
public override Task<IShellWindow> load(AnalyticsExpirationParametersSettings state) =>
Task.FromResult(_create(state));
void _show(AnalyticsExpirationParametersSettings _) =>
_bus.post(SparkTags.ShowWindow, _create(new()));
IShellWindow _create(AnalyticsExpirationParametersSettings startup_data) =>
new AnalyticsExpirationParametersWindow(_bus, this, startup_data);
}
}
@@ -0,0 +1,40 @@
namespace mbts.spark {
using bts.api;
using mbts;
using mbts.analytics;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
class AnalyticsParametersUIModel : IDisposable {
AnalyticsExpirationParametersMap _curr_val = null;
readonly IBus _bus;
readonly IDisposable _sub;
public event Action<AnalyticsExpirationParametersMap> on_expiration_parameters;
public AnalyticsParametersUIModel(IBus bus) {
_bus = bus;
_sub = _bus.subscribe(SparkTags.ExpirationParametersInputTag)
.Subscribe(d => on_expiration_parameters?.Invoke(d));
}
public void commit(IEnumerable<AnalyticsExpirationParameters> data) =>
_bus.post(SparkTags.ExpirationParametersCommitTag, data);
public IEnumerable<mbts.SecurityExpiration> get_smart_copy_roll_exps(AnalyticsExpirationParameters source) {
if (_curr_val != null) {
foreach (var kv in _curr_val.exp_map)
if (kv.Value.roll_schedule_expiration.Equals(source.roll_schedule_expiration))
yield return kv.Key;
}
}
public void Dispose() =>
_sub.Dispose();
}
}
@@ -0,0 +1,101 @@
using System;
using System.Collections.Generic;
using System.Linq;
using bts;
using mbts.analytics;
using bts.api.analytics;
using System.Reactive.Linq;
using bts.api;
using System.Threading;
namespace mbts.spark {
// 1. Reads exp params from the network and publishes
// it to the BB
// 2. Listens to ExpirationParametersCommitTag and
// writes the calls into persistence to save the data
public class AnalyticsParametersManager : IDisposable {
private readonly ThreadedBlackboard _bb;
private AnalyticsService _analytics_service;
private List<IDisposable> _disposables = new List<IDisposable>();
private IDictionary<mbts.SecurityExpiration, AnalyticsExpirationParameters>
_data = new Dictionary<mbts.SecurityExpiration, AnalyticsExpirationParameters>();
private readonly ITag<IEnumerable<AnalyticsExpirationParameters>>
_in_bb_exp_params_commit_tag = SparkTags.ExpirationParametersCommitTag;
private readonly ITag<SystemContractData> _in_contracts_tag = SparkTags.SystemContractsTag;
private readonly ITag<AnalyticsExpirationParametersMap> _out_exp_params_tag =
SparkTags.ExpirationParametersInputTag;
private HighPerformanceTimer _timer = new HighPerformanceTimer();
public AnalyticsParametersManager(ThreadedBlackboard bb,
AnalyticsService analytics_server) {
_bb = bb;
_analytics_service = analytics_server;
var exp_params_sub = _analytics_service.subscribei_exp_parameters()
.ObserveOn(SynchronizationContext.Current)
.Subscribe(_on_exp_parameters);
_disposables.Add(exp_params_sub);
_bb.subscribe(_in_bb_exp_params_commit_tag);
_bb.subscribe(_in_contracts_tag);
_bb.data_callback += _on_bb_data;
}
private void _on_bb_data(object tag, object data) {
if (_in_contracts_tag.Equals(tag)) {
_assemble_and_publish();
} else if (_in_bb_exp_params_commit_tag == tag) {
// listens to the commit tag and saves it
IEnumerable<AnalyticsExpirationParameters> exp_params =
data as IEnumerable<AnalyticsExpirationParameters>;
exp_params = exp_params.Where(e => e.security.expiration.Date >=
DateTime.Now.Date.Subtract(TimeSpan.FromDays(1)));
bts.Log.Gen.info(
String.Format("AnalyticsParametersManager._on_bb_data received commit count:{0}",
exp_params.Count()));
ExpirationParameterEntryList to_save = new ExpirationParameterEntryList();
to_save.ParamList.AddRange(exp_params.Select(i => i.to_exp_param_entry()));
_timer.start();
_analytics_service.set_exp_parameters(to_save);
_timer.stop();
bts.Log.Gen.info(
String.Format("AnalyticsParametersManager saved exp_params count:{0} t:{1} msecs",
exp_params.Count(), _timer.lastIntervalTime));
}
}
void _on_exp_parameters(bts.api.core.Update<ExpirationParameterEntryListImmutable, int> update) {
_data = new Dictionary<mbts.SecurityExpiration, AnalyticsExpirationParameters>();
bts.Log.Gen.info(String.Format("AnalyticsParametersManager._on_exp_parameters received count:{0}",
update.all.Count()));
bts.Log.assert(update.all.Count() == 0 || update.all.Count() == 1);
foreach (ExpirationParameterEntryListImmutable l in update.all) {
foreach (ExpirationParameterEntryImmutable e in l.ParamList) {
AnalyticsExpirationParameters new_entry = new AnalyticsExpirationParameters(e);
_data[new_entry.security] = new_entry;
}
break;
}
Log.Gen.info($"AnalyticsParametersManager._on_exp_parameters count: {_data.Count}");
_assemble_and_publish();
// _bb.post(_out_exp_params_tag, new AnalyticsExpirationParametersMap(_data));
}
private void _assemble_and_publish() {
if (_data != null) {
SystemContractData sc_data = _bb.read_state(_in_contracts_tag);
if (sc_data != null) {
_bb.post(_out_exp_params_tag, new AnalyticsExpirationParametersMap(_data, sc_data));
}
}
}
#region IDisposable
public void Dispose() {
_bb.data_callback -= _on_bb_data;
foreach (IDisposable d in _disposables) {
d.Dispose();
}
}
#endregion
}
}
Loaded 100 of 3737 files, more files were not shown because too many files have changed in this diff. Show more