Quick Start guide tries to demonstrate
- It’s very easy to build a complete Quant research workflow and try users’ ideas with
- Though with public data and simple models, machine learning technologies work very well in practical Quant investment.
Users can easily intsall
Qlib according to the following steps:
Qlibfrom source, users need to install some dependencies:
Clone the repository and install
To known more about installation, please refer to Qlib Installation.
Load and prepare data by running the following code:
This dataset is created by public data collected by crawler scripts in
scripts/data_collector/, which have been released in the same repository. Users could create the same dataset with it.
To known more about prepare data, please refer to Data Preparation.
Auto Quant Research Workflow¶
Qlib provides a tool named
qrun to run the whole workflow automatically (including building dataset, training models, backtest and evaluation). Users can start an auto quant research workflow and have a graphical reports analysis according to the following steps:
- Quant Research Workflow:
qrunwith a config file of the LightGBM model workflow_config_lightgbm.yaml as following.
- Workflow result
The result of
qrunis as follows, which is also the typical result of
Forecast model(alpha). Please refer to Intraday Trading. for more details about the result.
risk excess_return_without_cost mean 0.000605 std 0.005481 annualized_return 0.152373 information_ratio 1.751319 max_drawdown -0.059055 excess_return_with_cost mean 0.000410 std 0.005478 annualized_return 0.103265 information_ratio 1.187411 max_drawdown -0.075024
To know more about workflow and qrun, please refer to Workflow: Workflow Management.
- Graphical Reports Analysis:
examples/workflow_by_code.ipynbwith jupyter notebook
- Users can have portfolio analysis or prediction score (model prediction) analysis by run
- Graphical Reports
- Users can get graphical reports about the analysis, please refer to Analysis: Evaluation & Results Analysis for more details.