We envision Lipschitz to be an efficient and precise system for quantitative trading. While being sophisticated in functionalities, Lipschitz remains to be clear, friendly, and robust in its architecture design.
Project description
The Lipschitz System
We envision Lipschitz to be an efficient and precise system for quantitative trading. While being sophisticated in functionalities, Lipschitz remains to be clear, friendly, and robust in its architecture design.
Lipschitz provides three high-level features:
Framework and scaffold template for implementing model-based quantitative strategies
Toolchains for provisioning and evaluating quantitative strategies, including data loaders and backtesting tools
Gateways to execute and monitor strategies on simulated and live trading platforms
Architecture Overview
Lipschitz categorizes essential system functionalities into the following two roles:
Core Components. Lipschitz currently have three types of core components, i.e., data loader, strategies, and gateways. Each type of core components is responsible for a specific type of tasks, interacting with the rest of the system using structuralized APIs.
Pipeline Managers. Built on top of core components, Pipeline managers are responsible for running end-to-end pipelines in quantitative trading. Depending on the actual pipeline it manages, pipeline managers may also include functionalities such as visualization (in evaluation pipeline), or anomaly detection (in production pipeline).
The illustration below depicts an overview of Lipschitz’s system architecture.
Installation & Quickstart
Follow the following step to install lipschitz:
Code clone:
git clone https://github.com/LipschitzProject/lipschitz.git cd lipschitz pip3 install -r requirements.txt
Running Quickstart example code:
cd /examples python example_backtest.py setting/one_product_test.json
You will find a file named demo.pdf in the current path that shows a backtest report.
For the strategy design, you could refer to the sample_strategy.py in the exmaples folder.
Alternatively, you could also install lipschitz from pypi (this version might not be up-to-date with the most recent commit on the master branch:
pip3 install lipschitz
Code Standards for Contribution
Environment
The minimum Python version supported is 3.8
Your code is expected to be executable in both MacOS and Linux
State Management
No global states or variables, all stateful operations should be implemented as classes
Limit the use of helper functions only to generic operations that are shared among multiple parts of the code
Avoid returning multiple values from a function, instead consider to returning a class instance
Name Conventions
Always use snake_case for variable, and use PascalCase for class names
Try at all costs to give a proper, clear name to your classes, functions, arguments, and variables, from which the user can directly understand their purposes
Class initialization and function calls should use named arguments
Documentation
For each publicly available class and functions, document their purpose, parameters, and returns in the docstring format along with your code. Read this guide
Keep the documentation simple and precise, no need to repeat what is already obvious in their names, no need to include implementation details (make in-line comments instead)
Code Commits
Create a branch for each functionality that you are working on. Submit a PR to master branch to merge
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.