Exclusive: Microsoft AI quantitative investment platform Qlib video tutorial 3: Download market data

The previous video introduced how to install Qlib. This video demonstrates downloading market data from the Internet to the local.

Click here for the video address

You can use Qlib's machine learning with another more mature python-based open source quantitative backtesting framework backtrader. For the backtrader technical tutorial, please download the sample book and source code in the QQ group 1125384417.

===============

Background information:

The AI ​​artificial intelligence quantitative investment platform Qlib released by Microsoft Research, which integrates various machine learning algorithms, can be used for quantitative backtesting of trading strategies.

From the perspective of the application layer, it mainly includes three loosely coupled blocks (each block can be independent):

1 data

Get market data from the outside and store it in the efficient format inside Qlib

2 machine learning

Use a variety of machine learning algorithms to make predictions. The amount of prediction is called a label. As for the specific prediction, it is up to you to predict, such as predicting the stock return of tomorrow. The following machine learning algorithms are currently built-in. Users can also plug in their own machine learning algorithms.

GBDT based on LightGBM (Guolin Ke, et al.)
GBDT based on Catboost (Liudmila Prokhorenkova, et al.)
GBDT based on XGBoost (Tianqi Chen, et al.)
MLP based on pytorch
GRU based on pytorch (Kyunghyun Cho, et al.)
LSTM based on pytorcn (Sepp Hochreiter, et al.)
ALSTM based on pytorcn (Yao Qin, et al.)
GATs based on pytorch (Petar Velickovic, et al.)
SFM based on pytorch (Liheng Zhang, et al.)
TFT based on tensorflow (Bryan Lim, et al.)

3 Backtesting of trading strategies

Use the aforementioned market data and forecast data to write trading strategies and conduct strategy backtests. His backtesting engine is not as concise, easy to understand and mature as the backtrader, so it can actually send its market data and forecast data (also line) to the backtrader for backtesting. This will combine the strengths of the two.

In summary, the entire research process of machine learning and backtesting in Qlib is actually very simple, essentially the same as the combination of backtrader and machine learning in my article. The characteristics of Qlib are: First, the efficiency of data storage and processing is greatly improved, because it has designed its own dedicated format and caching mechanism, and the second is that its machine learning has made some auxiliary functions for time series, which is more direct than you. Using machine learning methods to predict, you can reduce the amount of code.

 

In the future, we will continue to track and introduce Qlib usage methods and technologies, so stay tuned.

Guess you like

Origin blog.csdn.net/qtbgo/article/details/111709375