Advertisement
Guest User

QuantOffice/QuantServer Installation

a guest
Feb 21st, 2013
752
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.23 KB | None | 0 0
  1. 4.3 QuantOffice/QuantServer Installation
  2.  
  3.  
  4.  
  5. Author: Brian McGreal
  6. Version: 4.3
  7.  
  8. Table of Contents
  9. 4.3 QuantOffice/QuantServer Installation
  10. Table of Contents
  11. Version History
  12. Introduction
  13. Execution History
  14. 1. Deltix Product Installer
  15. 2. Timebase Server/Administration
  16. 3. Aggregating Data: Feed Simulator
  17. 4. QuantOffice: Backtesting Strategy
  18. 5. UHF: Trade Simulator
  19. 6. Trading Console: Deploying Strategy.
  20. 7. Live Feed Provider: IQFeed
  21. 8. Live Trader: FIX ITGDerivatives
  22. 9. Trading Console: Deploying Strategy using FIX ITGDerivatives
  23. 10. Order Persistence
  24. 11. Additional Use Cases.
  25.  
  26.  
  27.  
  28. Version History
  29. Version
  30. Date Issued
  31. Author:
  32. Comments:
  33. 1.0
  34. 02/01/2010
  35. Brian M.
  36. Initial test plan creation.
  37. 1.1
  38. 02/17/2010
  39. Brian M.
  40. Updated test plan.
  41. 1.2
  42. 02/24/2010
  43. Brian M.
  44. Updated QO backtesting and UHF related sections. Verified general use case from beginning to end.
  45. 1.3
  46. 8/11/2010
  47. Brian M.
  48. Updated using official 4.3 release.
  49. 1.4
  50. 8/31/2010
  51. Brian M.
  52. Updated.
  53.  
  54.  
  55. Introduction
  56. This test plan covers main installation/configuration use case into a clean environment. Components covered in test plan include:
  57.  
  58. 1. Deltix Installer:
  59. a. Installation of software.
  60.  
  61. 2. QuantServer Architect for configuration of:
  62. a. QuantServer/Timebase Server.
  63. b. Aggregatorusing Feed Simulator and Live Data Provider (IQ Feed).
  64. c. UHF using Trade Simulator and Live Trade Broker (FIX ITGDerivatives).
  65. d. Order Persistence using MS SQL Server 2008.
  66.  
  67. 3. QuantOffice Products for:
  68. a. QuantOffice: Accessing tick and fundametal data from Timebase (bridge/direct - new API) for strategy development/backtesting.
  69. b. Trading Console: Strategy deployment into UHF server for live trading.
  70.  
  71. Execution History
  72. Version Tested:
  73. Date Tested:
  74. Author:
  75. Total # of Test Cases:
  76. # Executed:
  77. # Failed:
  78. % Executed:
  79. 4.3.11.21.10628
  80. 02/24/2010
  81. Brian M.
  82.  
  83.  
  84.  
  85.  
  86. 4.3.11.24.10732
  87. 03/02/2010
  88. Brian M
  89.  
  90.  
  91.  
  92.  
  93. 4.3.78.12778
  94. 8/11/2010
  95. Brian M.
  96.  
  97.  
  98.  
  99.  
  100. 4.3.83.12945
  101. 8/31/2010
  102. Brian M.
  103.  
  104.  
  105.  
  106.  
  107.  
  108. 1. Deltix Product Installer
  109. Pre-requisites:
  110.  
  111. Clean registry preferences prior to executing test plan. They can be found under [HKEY_CURRENT_USER]\Software\JavaSoft\Prefs\deltix
  112. Remove existing windows services using "sc delete <SERVICE>".
  113. Vista / Windows 7 Users: Administrative privileges are required to run installer.
  114. Launch installer from http://gw.deltixlab.com/install/web/index.html area.
  115.  
  116. a. Select Next on the initial screen.
  117.  
  118.  
  119.  
  120. b. Accept Licensing Agreement.
  121.  
  122. c. Define Installation Folder and select Next.
  123.  
  124. Note: Repair and upgrades of existing installations will be covered after initial configuration.
  125.  
  126.  
  127.  
  128. d. Select Yes to create directory if it does not exist.
  129.  
  130. e. Enter Serial Number (4746-1192A9A XXXX -XXXX) and select Next.
  131.  
  132. f. Define Deltix Installation Name and select Next.
  133.  
  134.  
  135.  
  136. g. Enable all components and select Next.
  137.  
  138.  
  139.  
  140. h. Define Sample Database Installation folder:
  141.  
  142.  
  143.  
  144. i. Accept default QuantOffice mode (32 or 64 bit) and select Next.
  145.  
  146. j. Expand details and review information. Select Next after QuantServer has been installed
  147.  
  148. k. Expand details and review information. Select Next after QuantOffice has been installed.
  149.  
  150. l. Expand details and review information. Select Next after QuantOffice strategies have been installed.
  151.  
  152. m. Enable Launch QuantServer Architect and select Finish.
  153.  
  154.  
  155.  
  156. n. Resulting directory structure for installation should be:
  157.  
  158.  
  159. o. Desktop folder should contain the following:
  160.  
  161.  
  162. The following sections outline the process for configuring Deltix products using QuantServer Architect client. The resulting configuration will represent a typical customer environment. The remaining sections will use the sample QuantServerHome data installed in previous section.
  163.  
  164.  
  165.  
  166. 2. Timebase Server/Administration
  167. Note: Vista / Windows 7 users must have administrative privileges to create windows services.
  168.  
  169. Configure Timebase Server:
  170.  
  171. a. QuantServer Architect client should appear in Edit mode after being launched from installer and should default to the QuantServerHome directory defined during the installation. The default home directory should contain sample tick database used with sample QO strategy.
  172.  
  173. b. Select Apply and then Start to complete configuration of Timebase server. A new automatic windows service "Timebase on port 8011" will be created.
  174.  
  175. c. Select Done. Verify that Timebase block shows service as Running on the specified host/port and that the sample trade "ES & NQ Futures Trade Data" and "Security Metadata" streams can be seen in storage block.
  176.  
  177.  
  178.  
  179. Updating Sample Security Metadata:
  180.  
  181. a. Launch Timebase Administrator. Select Storage block and (right mouse button) Context Menu - Timebase Admin.
  182.  
  183.  
  184.  
  185. b. Highlight Security Metadata node in database tree and select Context Menu - Edit.
  186.  
  187.  
  188.  
  189. c. Remove NQM10 and ESM10 contracts given they have expired by highlighting rows and selecting Delete. Save changes by selecting Accept in Edit panel. Select OK.
  190.  
  191. Create Tick Stream:
  192.  
  193. This section creates a new Timebase stream where we will store market data once we define our aggregator process in the next section.
  194.  
  195. a. Highlight Timebase database node and select Context Menu - New Stream...
  196.  
  197. i. Define Key (FuturesTicks in this example), Name, Description and select BestBidOffer and Trade Message Type. Select Next.
  198.  
  199. ii. Define static CurrencyCode of "840" at the MarketMessage level and accept remaining default field values and select Create.
  200.  
  201.  
  202. 3. Aggregating Data: Feed Simulator
  203. This section will enable the aggregator service, which will populate the "FuturesTicks" stream that was just created with market data received from a selected feed provider. A "Feed Simulator" feed provider will be used initially, as 3rd party installations are not required. We will install and configure IQ Feed provider in a section later in the test plan.
  204.  
  205. Configure Aggregator Server:
  206.  
  207. a. Select Edit within QuantServer Architect client.
  208.  
  209. b. Enable Receive Market Data and select Feed Simulator ("Sine" in previous releases) as data feed provider.
  210.  
  211. c. Enable Aggregate and/or Maintain Market Data.
  212.  
  213.  
  214.  
  215. d. Highlight individual components seen in schematic to review settings. Select Aggregator block. Accept the default settings. Select Apply, Start. A new automatic windows service "Aggregator on port 1299" will be created.
  216.  
  217.  
  218.  
  219.  
  220.  
  221. Verify that the aggregator service started successfully:
  222.  
  223.  
  224.  
  225. e. Select Done.
  226.  
  227. Define Individual Aggregator Process:
  228.  
  229. This section will configure an aggregator process that will retrieve Futures tick data (Best Bid Offers and Trades) from feed provider (Feed Simulator in this case).
  230.  
  231. a. Select Aggregator block and select Context Menu - Edit Processes.
  232.  
  233.  
  234.  
  235. b. Select New - Hybrid Data Collection Process:
  236.  
  237.  
  238.  
  239. i. Define General Tab Settings: "Feed Simulator" for Key and "FuturesTicks" for Target Stream. Accept remaining default values.
  240.  
  241.  
  242.  
  243. ii. Select BackFill Tab in upper right frame to define backfill settings:
  244.  
  245. Set Max Backfill Depth to "5" days. Accept remaining default values.
  246.  
  247.  
  248.  
  249. iii. Select Data Feed Tab to define data feed settings:
  250.  
  251. We're using GenericInstrument.aggregatorControlField as our symbol format Control Field given the difference between Key format, ESU10, and feed format @ESU0 (any format can be used when working with the feed simulator but we're building up to a customer environment where IQFeed will be used, which will require a different format). Instruments with an empty aggregator value should be excluded from aggregation.
  252.  
  253. Accept remaining default values.
  254.  
  255.  
  256.  
  257. We will revisit aggregator process definition and add transformation property to the use case, as well as other aggregator processes, Batch and Purge, in a later section.
  258.  
  259. iv. Select Apply. Aggregator server should recognize new process was added and begin loading data into tick database. Restart of service should not be required. This can be confirmed by viewing aggregator service log file under \logs directory located in sample QuantServerHome directory (For example, D:\Production\4.3\4.3.80.12869-installDoc\QuantServerHome\logs\ deltix_Aggregator_0_0.log):
  260.  
  261.  
  262. 31 Aug 15:05:08 INFO
  263. ******************************************************************************************
  264. * *
  265. * Aggregator Version: 4.3.12869 *
  266. * Aggregator Platform: JAVA *
  267. * Quant Server Home: D:\Production\4.3\4.3.80.12869-installDoc\QuantServerHome *
  268. * Aggregator TimeBase URL: dxtick://localhost:8011 *
  269. * Aggregator Web Console: http://localhost:1299 *
  270. * *
  271. ******************************************************************************************
  272.  
  273. 31 Aug 15:05:09 INFO [TickDBClient] Connected
  274. 31 Aug 15:05:09 INFO [Aggregator] Activate aggregator
  275. 31 Aug 15:05:09 WARNING [Aggregator] There are no processes to start!
  276. 31 Aug 15:05:10 INFO FrameworkServlet 'rpc': initialization started
  277. 31 Aug 15:05:10 INFO Refreshing deltix.qsrv.hf.framework.rpc.http.server.UhfWebApplicationContext@644cd580: display name [deltix.qsrv.hf.framework.rpc.http.server.UhfWebApplicationContext@644cd580]; startup date [Tue Aug 31 15:05:10 EDT 2010]; parent: Aggregator
  278. 31 Aug 15:05:10 INFO Bean factory for application context [deltix.qsrv.hf.framework.rpc.http.server.UhfWebApplicationContext@644cd580]: org.springframework.beans.factory.support.DefaultListableBeanFactory@edc86eb
  279. 31 Aug 15:05:10 INFO FrameworkServlet 'rpc': initialization completed in 164 ms
  280. 31 Aug 15:05:11 INFO [Aggregator] Aggregator initialized in 3s
  281. 31 Aug 15:14:01 INFO [Aggregator] Create new process [ProcessDescriptor{key='Sine', configFile='__s_ine.xml'}]
  282. 31 Aug 15:14:01 INFO [PROCESS:Sine] Activate aggregator process
  283. 31 Aug 15:14:01 INFO [PROCESS:Sine] Start process activity
  284. 31 Aug 15:14:03 INFO [HYBRID:Sine] Instruments to load: [@NQU10:FUTURE, @ESU10:FUTURE]
  285.  
  286.  
  287.  
  288. e. Can also verify that data is being stored within tick database through Timebase Administrator.
  289.  
  290. i. Highlight Storage block and select Context Menu - Timebase Admin.
  291.  
  292. ii. Highlight FuturesTicks stream that contains the new BBO (quote) and Trade data and select Data - View.
  293.  
  294.  
  295.  
  296. Note: 4.2 users: Key symbol format that is defined in Security Metadata stream is being used to store tick data, so there is no longer a need to define synonym in QuantOfficeSysFields.xml file.
  297.  
  298.  
  299.  
  300. 4. QuantOffice: Backtesting Strategy
  301. This section will verify QuantServer/Timebase and QuantOffice configuration. It outlines the steps required to access security metadata and tick data used in charting and backtesting strategy.
  302.  
  303. a. Launch QuantOffice by hovering over QuantOffice image and selecting Context Menu - Start within Architect client.
  304.  
  305.  
  306.  
  307. b. Define Server Connection settings: "localhost" and "8011" in this case. Select Test Connection.
  308.  
  309.  
  310.  
  311. c. Select Default Streams. For example, "FuturesTicks". Other Tick DB streams will be available when charting/executing strategy. Select OK and OK.
  312.  
  313.  
  314.  
  315. d. Select Yes to restart QuantOffice.
  316.  
  317. e. Once restarted, verify securities metadata is available:
  318.  
  319. i. Select Market Symbols link and Futures tab. Verify Futures are seen.
  320.  
  321.  
  322.  
  323. f. Chart tick data.
  324.  
  325. i. Highlight ESU10 within Symbols panel and select Context Menu - Chart to chart quotes and trade prices found in "FuturesTicks" stream within Timebase database.
  326.  
  327.  
  328.  
  329. ii. Define the following chart properties (Chart Type: Ticks, Enable Bid/Ask) and select OK.
  330.  
  331.  
  332.  
  333. iii. You should see the following chart based on 5 days of tick data generated by Feed Simulator (Sine) (the aggregator process we defined had a backfill of 5 days). Set Range to "30 min" to see wave.
  334.  
  335.  
  336.  
  337. g. Backtest sample strategy using simulated data:
  338.  
  339. i. Select Strategy Manager link.
  340.  
  341. ii. Highlight strategy and select Build icon.
  342.  
  343.  
  344.  
  345. iii. Once built, highlight strategy again and select Run icon.
  346.  
  347. iv. Define the following strategy parameters: Symbol: ESU10, 30 second bar size. Accept remaining default values and select Start.
  348.  
  349.  
  350.  
  351. v. Define the following input parameters when prompted: Enable Show checkbox and expand EMS Parameters - Order Executor - Parameters tree. Set Simulation Mode to Trade. Accept remaining default values and select OK.
  352.  
  353. QuantOffice Strategy Runner window will appear and strategy will be executed against the last 5 days of tick data. Setting the time range anywhere from 1 to 5 minutes will show individual trades generated by strategy code.
  354.  
  355.  
  356.  
  357.  
  358.  
  359. vi. You can also view table of all orders generated, along with many other statistics, when strategy execution has stopped. Highlight Orders Report under Reports section.
  360.  
  361.  
  362.  
  363. vii. Close Strategy Runner and all other QuantOffice related windows. We've confirmed that the sample strategy builds successfully and orders are generated based on algorithm defined within strategy (details of strategy logic will be covered later in the test plan).
  364.  
  365.  
  366. 5. UHF: Trade Simulator
  367. The following section will outline the process for enabling UHF server and deploying sample strategy, "MktLmtStpESNQ.4.0", so that live trades are generated. The "Trade Simulator" will be used initially, and then we will work with FIX ITGDerivatives test account in a later section.
  368.  
  369. Enabling UHF Server via Architect:
  370.  
  371. a. Select Edit within QuantServer Architect client.
  372.  
  373. b. Enable Perform Live Trading and enable Trade Simulator (a higher level "Simulate Trading" may exist if using older version of software - do not use this simulator). Enabling Trade Simulator enables the MARKET-FEED-SIM simulator which watches the data feed coming in and executes orders based on market quotes. This is the only simulator available to customers.
  374.  
  375. c. Select Apply and Start.
  376.  
  377. Note: QuantOffice does not currently support running UHF as a service, so we will be required to manually start UHF in CMD window from Architect client once configured.
  378.  
  379. d. Once completed, select Done.
  380.  
  381. Note: Current version of software automatically starts UHF in console, so next step "e" is not required.
  382.  
  383. e. Highlight UHF block within schematic and select Context Menu - Start in Console. In this case, I am starting UHF on port 7007 because 8888 was in use.
  384.  
  385.  
  386.  
  387. f. Confirm that the UHF server started successfully.
  388.  
  389.  
  390.  
  391. Current Architect configuration should look as follows:
  392.  
  393.  
  394.  
  395.  
  396. 6. Trading Console: Deploying Strategy.
  397. This section will outline the process used to deploy strategies developed in QuantOffice into UHF server.
  398.  
  399. a. Launch Trading Console by hovering over image and selecting Context Menu - Start within Architect client.
  400.  
  401. b. Connect to UHF server by selecting Connect icon once Trading Console appears (the default port is typically 8888). User and password is not required. Select OK.
  402.  
  403.  
  404.  
  405. c. Enable server list by selection Servers icon.
  406.  
  407. d. Add sample strategy to configuration by selecting Add - Strategy.
  408.  
  409.  
  410.  
  411. i. Highlight MktLmtStpESNQ.4.0 strategy and select OK.
  412.  
  413. ii. Confirm Strategy Configuration Properties and select OK.
  414.  
  415.  
  416.  
  417. iii. Select OK to edit strategy configuration parameters. Define parameters as follows: Symbol ESU10, 30 sec bar size, subscribe to FutureTicks stream, enable Show, change OrderExecutor from OrderSimulator (QuantOffice simulator) to UHF (uses trade provider defined in Architect), exchange TEST. Select Save and close window using "X" in top right corner.
  418.  
  419.  
  420.  
  421. e. Expand strategy node. Highlight strategy and select Start. Confirm UHF server connection URL and select OK.
  422.  
  423.  
  424.  
  425. QuantOffice strategy is now deployed into UHF server. Strategy Runner window will appear and charting of live data and order generation will be seen.
  426.  
  427.  
  428.  
  429. i. Select Stop within Execution tab in Trading Console to suspend execution of strategy. Select OK to confirm stoppage. Can review reports in the same manner within QuantOffice when backtesting strategy.
  430.  
  431.  
  432.  
  433. j. Select Delete within Execution tab in Trading Console to undeploy strategy. Select OK to confirm deletion.
  434.  
  435. k. Close Strategy Runner window and exit Trading Console.
  436.  
  437. At this point, we have completed a scaled down version of what is typically found at a customer site by using our in-house simulators. The next few sections will replace these simulators with live providers and will also enable order persistence using MS SQL Server 2008.
  438.  
  439. A list of supported feed and trade providers can be found on Wiki here: https://gw.deltixlab.com/wiki/wiki/UHF. Notes may be outdated from time to time, so supporting developer should be contacted if there are any questions.
  440.  
  441.  
  442.  
  443. 7. Live Feed Provider: IQFeed
  444. In this section, we will install IQFeed client and configure aggregator to retrieve historical and live data from them, in the same manner we used the feed simulator.
  445.  
  446. a. Stop UHF and Aggregator services through Architect.
  447.  
  448. i. Highlight UHF block and select Context Menu - Shutdown.
  449.  
  450.  
  451.  
  452. ii. Repeat process for Aggregator service (use Shutdown instead of stopping individual processes).
  453.  
  454. b. Download IQ Feed client setup here: http://www.iqfeed.net/iqfeed_client_4_7_0_9.exe
  455.  
  456. i. Run installer and accept all default settings.
  457.  
  458. Limitations with IQFeed:
  459. 1. Real-time feed of bar data is not supported by IQFeed. Historical query for bars is supported.
  460. 2. We have purchased real-time data from NYSE and NASDAQ only. Data from other exchanges will be delayed by 15 minutes. This does not affect customer accounts.
  461.  
  462. c. Log into IQLink:
  463. i. Select IQLink Launcher from Windows Start Menu.
  464.  
  465. ii. Select Start IQLink.
  466.  
  467. iii. Define username and password and select Connect. We currently have the following logins:
  468.  
  469. User:
  470. Password:
  471. 237330
  472. email bmcgreal@deltixlab.com
  473. 237978
  474. email bmcgreal@deltixlab.com
  475.  
  476. Note: Skype group "IQFeed Resource" is used to manage the use of 2 accounts we currently have. Please check with members before logging into IQFeed client.
  477.  
  478.  
  479.  
  480.  
  481. iv. iqconnect.exe and iqlink.exe service should be running once logged in. Login is required before we can successfully configure aggregator process to pull data from IQ Feed.
  482.  
  483. d. Disable feed simulator and enable IQFeed:
  484.  
  485. i. Select Edit within Architect.
  486.  
  487. ii. Disable Feed Simulator from Receive Market Data list. You will be prompted with a decision on what to do with existing aggregator process that currently uses Feed Simulator. Delete the existing process because we will define a new one. Select OK.
  488.  
  489. iii. Enable DTN IQFeed (not DTN IQFeed Level 2).
  490.  
  491. iv. Highlight Feed Connectors block within schematic to review connection properties required. Accept default ports.
  492.  
  493. v. Select Apply, Start, and Done to save configuration changes.
  494.  
  495. We will create a new stream to store IQFeed specific data that will be used when defining our aggregator process.
  496.  
  497. e. Highlight Storage block and select Context Menu - New Stream.
  498.  
  499.  
  500.  
  501. i. Define stream Key, Name, Description. Select BBO and Trade for Message Types. Select Next.
  502.  
  503.  
  504.  
  505. ii. Accept default static values and select Create. You should see a new IQFeed stream within storage block.
  506.  
  507. f. Highlight Aggregator block and select Context Menu - Start In Console (easier to view logging).
  508.  
  509. g. Once aggregator service is running, select Context Menu - Edit Processes to add new Hybrid process:
  510.  
  511. i. Define a new Hybrid Data Collection Process as we did in Section 3 above. Define the Target Stream as "IQFeed" Key on General Tab. Define Backfill period of 5 days on Backfill Tab (historical data is commonly used to warmup strategy indicators before live data is used). Define Data Feed Control field key - "aggregatorControlField" on Data Feed Tab. Accept remaining default values and select Apply.
  512.  
  513. m. Verify data is being received from IQFeed using Timebase Administrator. Expand IQFeed stream within DB tree. Highlight IQFeed node and select Context Menu - View to view live quotes (once 5 days of historical data has been retrieved).
  514.  
  515.  
  516.  
  517. Can also confirm data is being received by highlighting individual symbol, ESU10, and selecting context menu - Monitor.
  518.  
  519.  
  520.  
  521. Console logs will also show that control field (feed provider format) is being used to retrieve data:
  522.  
  523. 1 Sep 14:34:57 INFO [PROCESS:IQFeed] Start process activity
  524. 1 Sep 14:34:59 INFO [HYBRID:IQFeed] Instruments to load: [@NQU10:FUTURE, @ESU10:
  525. FUTURE]
  526. 1 Sep 14:34:59 INFO IQFeedProvider started; useSysTime: true
  527. 1 Sep 14:35:00 INFO [IQFeedAsyncConnection] Connected
  528. 1 Sep 14:35:00 INFO [HYBRID:IQFeed] Set feed filter to feed provider: IQFeedProv
  529. ider
  530. 1 Sep 14:35:00 INFO [HYBRID:IQFeed] There are 2 catch-up tasks in the queue
  531. 1 Sep 14:35:00 INFO [HYBRID:IQFeed] [@NQU10:FUTURE] Try to load history for the
  532. period: [2010-08-27 18:35:00.15, 2010-09-01 18:35:00.29]
  533. 1 Sep 14:35:00 INFO [HYBRID:IQFeed] [@ESU10:FUTURE] Try to load history for the
  534. period: [2010-08-27 18:35:00.23, 2010-09-01 18:35:00.29]
  535. 1 Sep 14:35:21 INFO [HYBRID:IQFeed] [@NQU10:FUTURE] History successfully loaded
  536. >> message count: 1134032, last message time: 2010-09-01 18:34:53.0
  537. 1 Sep 14:35:44 INFO [HYBRID:IQFeed] [@ESU10:FUTURE] History successfully loaded
  538. >> message count: 3006242, last message time: 2010-09-01 18:35:00.0
  539.  
  540.  
  541. 8. Live Trader: FIX ITGDerivatives
  542. In this section, we will configure UHF server to connect to FIX ITGDerivatives broker, in the same manner we used the trade simulator.
  543.  
  544. We will begin by extending the default Security Metadata stream to include a custom attribute, ITGDerivatives$Symbol, which will be used to map futures symbols, ESU10, with the broker specific symbol, ESU0 in this case, when configuring the UHF environment.
  545.  
  546. a. Launch Timebase Administrator.
  547.  
  548. b. Highlight Security Metadata stream and select Context Menu - Edit Stream Schema:
  549.  
  550.  
  551.  
  552. We will create an additional custom attribute at the GenericInstrument class level so that it, along with the existing custom attribute "aggregatorControlField", will be inherited by any instrument type at a lower level.
  553.  
  554. i. Highlight the deltix.qsrv.hf.pub.secmd.GenericInstrument class and create the following attribute by selecting New Non Static:
  555.  
  556. Name
  557.  
  558. Data Type
  559.  
  560. Field Type
  561.  
  562. ITGDerivatives$Symbol
  563.  
  564. String
  565.  
  566. Non Static
  567.  
  568.  
  569.  
  570. ii. Select Next and Finish.
  571.  
  572. c. Edit Security Metadata data and add broker specific symbol:
  573.  
  574. i. Highlight Security Metadata stream and select Context Menu - Edit to edit content of stream.
  575.  
  576. ii. Add broker specific symbols, ESU0 and NQU0, for ITGDerivatives$Symbol attribute.
  577.  
  578.  
  579.  
  580. iii. Select Accept to save changes.
  581.  
  582. d. Enable ITG/Derivatives broker within Architect:
  583.  
  584. i. Select Edit within Architect.
  585.  
  586. ii. Disable Trading Simulator and enable ITG/Derivatives.
  587.  
  588. iii. Highlight Trading Connectors block and edit the following properties within the upper right frame:
  589.  
  590.  
  591.  
  592. Details:
  593.  
  594. FIX.ITGDerivatives.host=simulation.itg.com
  595. FIX.ITGDerivatives.port=10342
  596. FIX.ITGDerivatives.userId=deltix3
  597. FIX.ITGDerivatives.password=email bmcgreal@deltixlab.com
  598. FIX.ITGDerivatives.account=105375
  599. FIX.ITGDerivatives.senderCompId=DELTIX3
  600. FIX.ITGDerivatives.senderSubId=DELTIX3
  601. FIX.ITGDerivatives.targetCompId=ITGD
  602. FIX.ITGDerivatives.targetSubId=ITGD
  603.  
  604.  
  605. iv. Select Save, Apply, Start, and Done.
  606.  
  607. g. Start UHF server by highlighting UHF block and select Context Menu - Start in Console.
  608.  
  609. Confirm that FIX ITGDerivatives connection was established by viewing console logging:
  610.  
  611. 1 Sep 14:50:18 INFO Session FIX.4.4:DELTIX3/DELTIX3->ITGD/ITGD schedule is daily
  612. , 05:00:00 UTC - 03:00:00 UTC (daily, 00:00:00 CDT - 22:00:00 CDT)
  613. 1 Sep 14:50:18 INFO Created session: FIX.4.4:DELTIX3/DELTIX3->ITGD/ITGD
  614. 1 Sep 14:50:18 INFO [QFixTradingServiceImpl] Created FIX session: FIX.4.4:DELTIX
  615. 3/DELTIX3->ITGD/ITGD
  616. 1 Sep 14:50:18 INFO [FIX] Connect Trading Service
  617. 1 Sep 15:40:18 INFO Initiated logon request
  618. 1 Sep 15:40:18 INFO Received logon request
  619. 1 Sep 15:40:18 INFO Responding to logon request
  620. 1 Sep 15:40:18 INFO [FIX] Logon has been established: FIX.4.4:DELTIX3/DELTIX3->I
  621. TGD/ITGD
  622.  
  623. 9. Trading Console: Deploying Strategy using FIX ITGDerivatives
  624. In this section, we will re-deploy existing strategy using live broker this time.
  625.  
  626. a. Re-deploy sample strategy:
  627.  
  628. i. Launch Trading Console.
  629.  
  630. ii. Highlight MktLmtStpESQN.4.0 strategy and select Context Menu - Edit Configuration Parameters:
  631.  
  632.  
  633.  
  634. iii. Edit Order Executor section and update Exchange to GLOBEX, which is the exchange used for futures trading with ITGDerivatives. Change Subscription from "FuturesTicks" to "IQFeed" so that strategy will receive correct market data. Save changes and exit window.
  635.  
  636.  
  637.  
  638.  
  639.  
  640. iv. Highlight strategy and select Start to deploy it again. Select OK. Strategy Runner window will appear charting live data for Future ESU0.
  641.  
  642.  
  643.  
  644. v. Adjust chart Range to "10 minutes" and enabled Details checkbox.
  645.  
  646.  
  647.  
  648. ITGDerivatives provides a client application called Matrix for all end users to monitor quotes, orders, etc. We use this client to verify order submissions made to our test account and also generate external orders, which should be seen within Trading Console. The next few steps will install this client.
  649.  
  650. b. Install Matrix client:
  651.  
  652. i. Download https://gw.deltixlab.com/download/matrix-4.0.56.0.exe.
  653.  
  654. ii. Accept all defaults when installing.
  655.  
  656. iii. Launch client from Windows Start menu- ITG Derivatives LLC - Matrix.
  657.  
  658. iv. Define username, password, and server and select Connect (password is same as specified in Architect).
  659.  
  660.  
  661.  
  662. Main menu should appear in the upper left corner of desktop. Select Risk - Order Status.
  663.  
  664.  
  665.  
  666.  
  667.  
  668. c. Submit manual market order from Trading Console and view status in Matrix client.
  669.  
  670. i. Select New Order - Market Order from Output section in Trading Console.
  671.  
  672.  
  673.  
  674. ii. Define Market Order properties:
  675.  
  676.  
  677.  
  678. iii. Select OK to submit Market Order.
  679.  
  680. iv. Review both Output section and Matrix client Order Status panel to ensure order was submitted properly.
  681.  
  682. v. Submit manual Limit Order from Trading Console using same process.
  683.  
  684. vi. Cancel any open orders that may exist in Matrix Order Status panel by selecting red "X" and confirm that their status is updated in Trading Console Output window.
  685.  
  686. vii. Stop strategy, close Strategy Runner window and exit Trading Console.
  687.  
  688. viii. Stop UHF server through Architect.
  689.  
  690.  
  691.  
  692. 10. Order Persistence
  693. In this section. we will configure order persistence using MS SQL Server 2008 at our database.
  694.  
  695. a. Download and install SQL Server 2008 R2 Express Edition. http://www.microsoft.com/express/database/
  696.  
  697. i. Once installed, follow steps to enable Remote Connections: http://www.linglom.com/2009/03/28/enable-remote-connection-on-sql-server-2008-express/
  698.  
  699. b. Create a dedicated SQL Server account under Security - Logins node within Management Studio tree.
  700.  
  701. c. Create a dedicated DB where above user is owner of the database.
  702.  
  703. d. Select Edit within Architect and highlight UHF block.
  704.  
  705. e. Select MS SQL from DB drop down list.
  706.  
  707. i. Define user, password and DB Name properties.
  708.  
  709.  
  710.  
  711. f. Enable Clean Start checkbox within properties is not already enabled. This will clear any existing strategy deployments (suspended strategies) when restarting UHF server. Most customers do not enable this field and is only used as a test case in this document.
  712.  
  713. g. Select Apply, Start and Done.
  714.  
  715. h. Restart UHF server.
  716.  
  717. Confirm that new DB schema is created upon startup (or as in this case that an existing schema is automatically upgraded to latest version):
  718.  
  719. 1 Sep 16:28:57 INFO Upgrading database schema from 6 to 7:
  720. 1 Sep 16:28:57 INFO Upgrading to version 7 ...
  721. 1 Sep 16:28:57 INFO SQL> ALTER TABLE ORDERS ADD CONSTRAINT FK_REPLACES_EXIST
  722. FOREIGN KEY (REPLACES_FK) REFERENCES ORDERS (ORDER_PK) ON DELETE NO ACTION
  723. 1 Sep 16:28:57 INFO SQL> ALTER TABLE ORDERS ADD CONSTRAINT FK_REPLACED_EXIST
  724. FOREIGN KEY (REPLACED_FK) REFERENCES ORDERS (ORDER_PK) ON DELETE NO ACTION
  725. 1 Sep 16:28:57 INFO SQL> UPDATE UHF_VERSION SET NUM = 7
  726.  
  727.  
  728. also confirm that any previous deployments have been cleared:
  729.  
  730. 1 Sep 16:29:02 INFO Clearing previous deployments (if any) ...
  731.  
  732.  
  733.  
  734. i. Launch Trading Console and re-deploy/start sample strategy again.
  735.  
  736. Confirm that all orders generated by strategy are being stored in DB:
  737.  
  738.  
  739.  
  740.  
  741.  
  742. 11. Additional Use Cases.
  743.  
  744. a. Import Intraday, Daily, and Fundamental Data. Access within QuantOffice.
  745.  
  746. b. Aggregator: Additional Processes (Batch, Purge, etc). Controlling starting/stopping of individual processes.
  747.  
  748. c. UHF: Integrating feed and trade provider price multiplier and FIX custom tags.
  749.  
  750. d. UHF: Playback Mode.
  751.  
  752. f. Chaining of Strategies (Playback/Live) - Consumer/Producer.
  753.  
  754. g. Client compatibility checks. Last 2 versions of software are compatible. For example, 17A server is compatible with 16B client and vice versa.
  755.  
  756. h. Upgrade from previous version. Re-run install check against it
  757.  
  758. i. UAC configuration.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement