NAV
  • Getting Started Guide
  • EPAM Systems all rights reserved, 2022

    Getting Started Guide

    This tutorial is a step-by-step guide on how to get started with QuantOffice. In each step you can find a link to the related documentation where you can learn more about the systems and it's components.

    Here is what we are going to do to get you started:

    Having setup a secure client server connection, you will login to the Landing page from where you can access all the system components. We will explain how to configure trading venues, instruments, trading and market data connectors that you are going to use in your trading algorithms. For demonstration purposes we have created a sample EMACrossOver strategy, which we are going to use in this tutorial. You will run it in the back-testing mode on the historical market data and test it on live data using our trade Simulator. After that, we will demonstrate how you can monitor your algorithm and orders execution using our monitoring applications. Once you are ready, you can go ahead and trade in the live mode with your real account credentials.

    Please be prepared to dedicate up to a few hours to go through all the getting started steps.

    1. Connect

    We are going to use a Pritunl to establish a secure client server connection before accessing other system components.

    1. Install a Pritunl client on the machine that is going to connect to QuantOffice Cloud services.
    2. Open https://(public IP of server):4443 to create a Pritunl user.
    3. Type Pritunl Server Username and Password.
    4. Open Users page.
    5. Click Add User. This user is gong to log into QuantOffice Cloud services.
    6. Specify Name and Pin.
    7. Download a User Profile - a special configuration file that will be imported to the Pritunl client on your computer.
    8. Run Pritunl and Import a User Profile you have downloaded in the previous step.
    9. Click Connect and type-in your Pin.
    10. Run QuantOffice Cloud landing page http://(internal IP server).

    Landing page displays the QuantOffice Cloud ecosystem and gives access to all the system components. Click any component to go directly to the corresponding application. Click Documentation to navigate to the knowledge base portal.

    2. Setup Trading Instruments

    Start with setting up your trading environment.

    1. Navigate to Domain Configurator from QuantOffice Cloud landing web page.
    2. In Securities tab use filter to select trading instruments your strategy will get access to. Add them to stored symbols and save. For the sample EMACrossOver strategy we have configured KRAKEN exchange connector and BTCUSD trade instrument.

    Please refer to Domain Configurator user guide to learn more.

    3. Setup Data Connectors

    To receive market data and place trade orders you need to set up Data and Trade connectors to trading venues. Use credentials from your account at a particular trading venue to set Trade Connectors. Later, the system will use them for live trading. In Data Connectors tab you may find a pre-configured active market data connector to KRAKEN exchange.

    NOTE: setting up Trade Connectors is optional unless you are going to trade in a live mode. For paper trading and back-testing we will use a simulator account.

    In the Domain Configurator you can as well monitor your account balances for each exchange and configure system and trade notifications.

    Please refer to Configurator user guide to learn more.

    4. Monitor Data

    Once you have your trade environment ready, go to TimeBase Web Administrator Application. Here in the list of streams you can select KRAKEN exchange that you have added in the previous step and monitor incoming data in live mode. This way we make sure data connectors are established properly and we have market data coming to TimeBase database.

    Please refer to TimeBase Web Admin user guide to learn more.

    5. Load Historical Prices

    You can load historical prices of popular cryptocurrencies from Deltix Server into your server. This way you do not need to collect historical data yourself and can start testing your strategy almost immediately on the extensive dataset. Use the link from the Landing page to load data to QuantOffice Server. If you are logging to the QuantOffice Server for the first time, you will be prompted to sign-in with Keycloack. After the login, open replicate_stream.ipynb notebook which is located in Utilities folder.

    Default version of this script copies 2.5 years worth of data from KRAKEN_BBO_TINYLIQ stream. To load a different dataset, change a time range or a stream name in the first cell of the script. Provide username and password to access historical data and then execute the script to load data into TimeBase. To do that, execute Run All cell command from the menu. See more details in the script comments.

    During the data loading, the notebook shows progress bar with the loading status. Open TimeBase Web Administrator Application to view data that has been loaded into a stream, once the loading is completed.

    6. Back-Test Sample Strategy

    In Strategy Server you can create and run trade strategies in Jupyter Notebook. For demonstration purposes we have prepared a simple EMACrossOver strategy. To run this strategy open backtesting.ipynb from folder Strategies/EMACrossOver.

    This sample strategy consists of following main components:

    In this step we will run the EMACrossOver sample strategy in a back-testing mode using backtesting.ipynb notebook. Strategy will use historical market data from TimeBase that we have loaded earlier.

    Run all cells to execute strategy in the backtesting mode. During the data loading, the notebook shows progress bar with the loading status. Charts and reports with the backtesting results will be displayed after the execution is finished:

    Please refer to Strategy Server documentation to learn more. Find more details about this strategy in README.md in the strategy folder in Jupyter.

    7. Run Paper Trading

    In Jupyter Notebook you can also test the sample strategy on live data in paper trading mode using simulator. In a paper trading mode, strategy works with live data connectors and sends orders to Execution Server for execution. The difference between paper trading and live trading is that orders in paper trading mode are routed to a simulated SIM destination, whereas in live trading to KRAKEN exchange.

    1. Run sample strategy from live_trading.ipynb notebook.
    2. In case your configurations are correct and the strategy has started properly, you will see message indicating that strategy is running live and command to stop it.

    Please refer to Strategy Server documentation to learn more.

    8. Monitoring

    Once you have your sample strategies running, you can navigate to other monitoring applications from the landing page to check server information, strategy telemetries, active trade orders, open positions and many more.

    Strategy Monitor

    In Strategy Monitor you can view and manage all running strategies, undeploy any strategy, view strategy statistics, monitor and manage open orders and positions. On the monitor you can see your sample strategies running on the server.

    Please refer to Strategy Monitor user guide to learn more.

    Execution Server Monitor

    In Execution Server Monitor you can monitor open positions and orders placed by your strategies. Here you have emergency controls you can use to stop all trading activity in case of any failure or an unexpected behavior. Execution Server Monitor also allows configuring custom risk rules on various levels. You should be able to see your sample strategy on the Statistics screen and orders placed on the Orders screen.

    Please refer to Execution Server Monitor user guide to learn more.

    9. Live Trading

    Having tested your strategy in back-testing and paper trading mode, you are ready to go live. In the live mode, your trading strategy will work with your real account instead of a simulator. In a live mode, all orders placed by the strategy will be routed to KRAKEN exchange to the account specified in Trade Connector settings. In Execution Server Monitor you may check the connection status to KRAKEN exchange and make sure the connection has been established properly.

    Please refer to Developer guide to learn more.

    10. Next Steps

    You can find other strategies in Strategy Server/Strategies folder:

    Please refer to README.md files in strategies' folders to get more details about each strategy and how to run them.