lqr

LucisQR or simply LQR, is a data engineering suite that collects, transforms and captures financial data from several exchanges and stores them in a variety of media, including flat files (CSV, JSON, YAML), databases (ODBC/relational, NO-SQL) and specialized tick data warehouses (KDB,etc).

LQR is meant to operate and switch seamlessly between historical and realtime operation modes, meaning that trading strategies created with the backtesting feature can be put into production without any additional development effort, making time-to-market, the transition from QT (Quantitative Trader) testing and production a matter of hours if not minutes.

Note

LQR is currently in ALPHA stage so you might experience an array of issues but also grow and influence the development of the product.

In a trading firm, LQR is the middleware that connects all the pieces of your trading puzzle: the exchanges, traders, your QR team and bots/trading strategies.

LQR believes that market data is data ready, delivered to your trading strategy or backtest no matter where it resides. The source can be in the same process, same machine, same network, same datacenter or across the ocean. Data will be delivered to your application seamlessly, that is our pledge.

Other commercial products excel at specific tasks as capture of data, translation of messages, leaving your desk the task to hire expensive C++ developers to fill in all the gaps. We pledge to provide all, front to back.

Supported Operating Systems

LQR supports Ubuntu (18.04,20.04,21.04,22.04) and Redhat OS (7,8).

Note

Our main application repository is located at https://www.vitorian.com/repo/lucisqr/latest/

Pricing

LQR Basic is available in alpha for a Starbucks-sized fee, which goes towards our AWS costs.

Once payment is received, you will receive an email with a license file that will unlock the software. The license is valid from 6 months to 1 year.

The easiest way to send payment is through Chase’s Zelle using the identifier payments@vitorian.com. Once through, please send a message (Contact Page) to the cited email with a note that a Zelle payment has been posted.

Note

We also accept international credit cards but the process is currently manual. Please call us and provide the credit card number Contact Page.

Running the main executable

Running the lqr command displays the subset of commands available

$ lqr

This is the entry point to all the LightQR utilities.
Explore more on each section below.
Usage:
    lqr cert ...
    lqr mdp3 ...
    lqr erf ...
    lqr module ...
    lqr capture ...
    lqr lua ...
    lqr config ...

Running the command again with the subcommand will display the help screen specific for that subcommand.

Note

lqr is the only binary in the LQR suite. It works with multiple subcommands pretty much as the AWS client, for example.

lqr cert

These commands set up and verify license files.

License files are collections of authorized features together with version and date limits. The license file below contains a license for the free version of lqr. It states when the license was generated, for which user and company as long as proper license notes. Finally the line “Entitlement” describes the type of license, date and version limits.

# This license file was automatically generated by Vitorian LLC
# By using this software you agree to abide to the license terms stated on the software package
# a copy which can be found at http://vitorian.com/lightqr_license.txt
LicenseID,9C5F965B-6DF13583-4D99DACB-33BD1515-6277F2C5
Generated,20220709
Company,Vitorian LLC
User,Henrique Bucher
Notes,By using this software you agree to abide by the license terms
Notes,License published at http://vitorian.com/lightqr.txt
Entitlement,BASIC,,20230101,0,5

Running the command lqr cert will list all possible options for this subcommand.

$ apps/lqr cert
Usage:
    lqr cert debug
        lists all entitlements currently active
    lqr cert check <filename> [<filename>...]
        verify license file for correctness
    lqr cert install <filename> [<filename>...]
        copies license files into canonical folder

lqr cert debug

This command lists all the entitlements currently active.

$ lqr cert debug
Current Date: 20220718
Current Version: 0.1
Entitlement BASIC satisfied by file /home/hbucher/.lqr.d/admin.txt
Entitlement BASIC satisfied by file /home/hbucher/.lqr.d/basic.txt
Entitlement ADMIN satisfied by file /home/hbucher/.lqr.d/admin.txt

Note

Entitlement files are typically installed in the directory $HOME/.lqr.d

lqr cert check

To verify if a license file is valid and current, run the check subcommand

$ lqr cert check /tmp/basic.txt
  File /tmp/basic.txt contains a valid license

lqr cert install

Copies license file into canonical folder

$ lqr cert install /tmp/basic.txt
File /home/hbucher/.lqr.d/basic.txt copied successfully from /tmp/basic.txt

lqr config

The config subcommand will manage the common environmental settings that are constant for a user so they do not need to be passed to the application every time. Works like a git configuration.

$ lqr config
Usage:
    lqr config set <key=value> [<key=value>]
        sets the given key-value pairs in the configuration
    lqr config print
        prints the current configuration
    lqr config clear
        clears all the current configuration
    lqr config import <filename>
        imports the given configuration file
    lqr config help
        prints all possible configuration values
    lqr profile [ <profile> ]
        with no arguments, prints the current profile
        with one argument, changes current profile

Note

The configuration under Linux is typically stored under $HOME/.lqr. It is a YAML file that can be directly read and edited.

lqr config print

Prints the current configuration set or part of it

$ lqr config print

    default: {Logging: INFO, Remote: {IP: 192.168.10.49, Type: Linux, LastUsed: 20220429}}

If an argument is passed, it has to be a key or a combination of keys, in which case only the configuration under that key will be printed.

$ lqr config print Remote

    {IP: 192.168.10.49, Type: Linux, LastUsed: 20220429}

$ lqr config print Remote.Type

    Linux

Note

Configuration keys are in the form <key1>[.<key2>.<key3>...].

lqr config set

When run without arguments, prints all possible parameters to be set.

$ lqr config set
Possible values:
    ... (depends on your version) ...

When passed with arguments, each has to be a name-value pair as for example:

$ lqr config set Logging=INFO
$ lqr config print

    default: {Logging: INFO, Remote: {IP: 192.168.10.49, Type: Linux, LastUsed: 20220429}}

Note

The set command provides no output, unless there is an error.

lqr config clear

Clears all the profiles and configuration values and initializes an empty file.

$ lqr config print
default: {Logging: INFO, Remote: {IP: 192.168.10.49, Type: Linux, LastUsed: 20220429}}

$ lqr config clear

$ lqr config print
default: {}

lqr config import

Imports an external configuration file. This has the same effect to replacing the file manually but it also verifies the validity of the config file prior to copying.

Warning

This option will NOT merge the contents of the given file

$ lqr config print
default: {Logging: INFO, Remote: {IP: 192.168.10.49, Type: Linux, LastUsed: 20220429}}

$ mv ~/.lqr /tmp/config

$ lqr config print
default:
{}

$ lqr config import /tmp/config
Config imported from /tmp/config with success

$ lqr config print
default: {Logging: INFO, Remote: {IP: 192.168.10.49, Type: Linux, LastUsed: 20220429}}

lqr config profile

So far all the examples above use the “default” profile. There are cases where the user might want to switch to different settings while keeping the original ones for later use.

To display the current profile, just run the command without arguments

$ lqr config profile
    Current profile: default

To change the current profile, enter one single argument as the name of such profile

$ lqr config profile europe
$ lqr config profile
    Current profile: europe

Once it is changed, all set commands will be reflected in that profile

$ lqr config set Country=Italy
$ lqr config print
    default: {Logging: INFO, Remote: {IP: 192.168.10.49, Type: Linux, LastUsed: 20220429}}
    europe:
        Country: Italy
$ lqr config print Country
    Italy

lqr lua

Warning

The lua scripting feature is currently experimental and under heavy development.

lqr mdp3

This subcommand deals with the CME Market Data Protocol version 3 (MDP3).

lqr mdp3 download

Downloads configuration and archived metadata from the CME FTP website.

$ lqr mdp3 download [config] [secdef] :
    -h [ --help ]                         This help
    -v [ --verbose ]                      Verbose operation. Default is [false]
    -d [ --dated ]                        Produces dated files. Default is
                                            [false]
    -e [ --environments ] arg (=production)
                                            Comma-separated list of environments to
                                            download. Valid values:production,cert,
                                            nrcert,nrautocertplus,certautocertplus.
    --files arg                           One of [config] or [secdef].

In the simplest case, donwload the production configuration, which will be used in the following commands as an example.

$ lqr mdp3 download config
    Downloading ftp://ftp.cmegroup.com/SBEFix/Production/Configuration/config.xml into config-Production.xml

$ head config-Production.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration environment="PROD" updated="2022/07/17-14:12:03">
    <channel id="310" label="CME Globex Equity Futures">
        <products>
        <product code="ES">
            <group code="ES"/>
        </product>
        <product code="0ES">
            <group code="$E"/>

If you want to download files only for a certain environment and timestamp it, follow the example below.

$ lqr mdp3 download config -d -e cert
    Downloading ftp://ftp.cmegroup.com/SBEFix/Cert/Configuration/config.xml into config-Cert-20220718-145727.xml

lqr mdp3 capture

This is a helper feature that allows for the instant capture of MDP3 packets given a CME configuration file.

The general command form is:

lqr mdp3 capture [channel [channel]...] :
-h [ --help ] arg (=0)           this help message
-c [ --config ] arg              XML config file name. Use `lqr mdp3 download
                                -f config` to fetch the xml config from the
                                CME website.
--channels arg                   Comma-separated list of channels to listen.
-e [ --environment ] arg (=prod) Environment, one of: prod,cert,newcert.
                                Default [prod]
-v [ --verbose ] arg (=0)        Verbose operation
-i [ --interface ] arg           Interface to listen. Defaults to all.

As an example, to capture all streams from the channel 310 use the command below.

$ lqr mdp3 capture -c config-Production.xml 310
    Creating socket IP:224.0.31.1 Port:14310 Type:I Side:A
    Creating socket IP:224.0.32.1 Port:15310 Type:I Side:B
    Creating socket IP:224.0.31.43 Port:14310 Type:N Side:A
    Creating socket IP:224.0.32.43 Port:15310 Type:N Side:B
    Creating socket IP:224.0.31.22 Port:14310 Type:S Side:A
    Creating socket IP:224.0.32.22 Port:15310 Type:S Side:B
    Creating socket IP:233.72.75.1 Port:23310 Type:SMBO Side:A
    Creating socket IP:233.72.75.64 Port:22310 Type:SMBO Side:B
    Enabling channel 310 socket SnapshotMBOB
    Enabling channel 310 socket SnapshotMBOA
    Enabling channel 310 socket SnapshotB
    Enabling channel 310 socket SnapshotA
    Enabling channel 310 socket SymbologyB
    Enabling channel 310 socket SymbologyA
    Enabling channel 310 socket IncrementalB
    Enabling channel 310 socket IncrementalA

Note

In the previous example we used the config-Production.xml file obtained with the lqr mdp3 download command.