UI

This page documents the command line and web user interface(UI) and interactions.

General Introduction

The program has three different modes:

Note: we have replaced replay mode with backtest mode, the latter is more useful.

Idle mode is the default mode when program is started. In idle mode, user can enter live mode or backtest mode by selecting from a menu.

In live mode, user can select a strategy, possibly configure parameters for the strategy, and start running. Live mode will continue running once started, display in real-time the transactions, statuses, etc in web UI. If user stops the live mode, the program will enter idle mode.

In backtest mode, user can select a strategy,  possibly configure parameters for the strategy, and possibly configure parameters for the running of current test. During the running of backtest, it displays in real-time the transactions, statuses, etc in web UI. After the running of backtest finishes, the program enters idle model.

Command Line Interface

When user starts the program from command line, the program enters in idle mode. In live mode, the command line displays following to user:

Please select one strategy to run from the following menu.

Live Mode

Backtest Mode

 

Enter the number of your selection: _

If user inputs L2 in idle mode, the program enters live mode. The program may ask the user for parameters that are required for running the strategy in a question-answer style via command line. After all inputs finish, the program automatically starts the system default web browser visiting the URL http://127.0.0.1:8888/live, where user can see in real-time the transactions, statuses(see detail in next section). User can end the live mode by clicking a button in the web page.

If user ends live mode in the web UI, the web page stops updating, and the command line enters idle mode and displays the initial menu.

If user inputs B1 in idle mode, the program enters backtest mode. The program may ask the user for parameters that are required for running the strategy in a question-answer style via command line. After all inputs finish, the program automatically starts the system default web browser visiting the URL http://127.0.0.1:8888/backtest, where user can see in real-time the transactions, statuses(see detail in next section). User can force ending the backtest mode when it's running.

If user kills the backtest job or it finishes naturally, the web page stops updating, and the command line enters idle mode and displays the initial menu.

Web Interface

The web UI for backtest mode basically looks the same as the backtest on Quantopian . One difference with Quantcon is that in the logs area, we show transaction history.

In the graph, it displays a lot of parameters. We only care about following parameters.

RETURNS - It's computed as (Money earned)/(Initial invest)

The x-axis means the time, the y-axis means the percentage of returns.

The live mode UI looks almost the same, except following:

The transaction log has following fields for each item: