From 429cfd3b9a18f7803506ce3c104d71e107c89b91 Mon Sep 17 00:00:00 2001 From: D-X-Y <280835372@qq.com> Date: Mon, 1 Mar 2021 19:19:44 +0800 Subject: [PATCH] Update QLIB --- .gitmodules | 2 +- README.md | 3 - notebooks/Q/qlib-data-play.ipynb | 120 +++++++++++++++++++++++++++++++ qlib-git | 1 - 4 files changed, 121 insertions(+), 5 deletions(-) create mode 100644 notebooks/Q/qlib-data-play.ipynb delete mode 160000 qlib-git diff --git a/.gitmodules b/.gitmodules index 991c20b..3027337 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "qlib-git"] - path = qlib-git + path = .latent-data/qlib url = git@github.com:microsoft/qlib.git diff --git a/README.md b/README.md index a1e45ef..6cbf758 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,6 @@ This project implemented several neural architecture search (NAS) and hyper-para - All algorithms are in the same codebase - Active maintenance - -`git clone --recursive git@github.com:D-X-Y/Auto-Qlib.git` - ## AutoDL-Projects Capabilities At this moment, this project provides the following algorithms and scripts to run them. Please see the details in the link provided in the description column. diff --git a/notebooks/Q/qlib-data-play.ipynb b/notebooks/Q/qlib-data-play.ipynb new file mode 100644 index 0000000..5d6e580 --- /dev/null +++ b/notebooks/Q/qlib-data-play.ipynb @@ -0,0 +1,120 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "[24128:MainThread](2021-03-01 12:58:36,399) INFO - qlib.Initialization - [config.py:276] - default_conf: client.\n", + "[24128:MainThread](2021-03-01 12:58:36,402) WARNING - qlib.Initialization - [config.py:291] - redis connection failed(host=127.0.0.1 port=6379), cache will not be used!\n", + "[24128:MainThread](2021-03-01 12:58:37,535) INFO - qlib.Initialization - [__init__.py:46] - qlib successfully initialized based on client settings.\n", + "[24128:MainThread](2021-03-01 12:58:37,536) INFO - qlib.Initialization - [__init__.py:47] - data_path=/Users/xuanyidong/.qlib/qlib_data/cn_data\n" + ] + } + ], + "source": [ + "import os\n", + "import sys\n", + "import qlib\n", + "qlib.init(provider_uri='~/.qlib/qlib_data/cn_data')" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + } + ], + "source": [ + "from qlib.data import D" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(1897,)\n", + "[Timestamp('2010-01-04 00:00:00') Timestamp('2010-01-05 00:00:00')\n", + " Timestamp('2010-01-06 00:00:00') ... Timestamp('2017-12-27 00:00:00')\n", + " Timestamp('2017-12-28 00:00:00') Timestamp('2017-12-29 00:00:00')]\n" + ] + } + ], + "source": [ + "calendar = D.calendar(start_time='2010-01-01', end_time='2017-12-31', freq='day')\n", + "print(calendar.shape)\n", + "print(calendar)" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "LocalProvider\n", + "\n", + "\n" + ] + } + ], + "source": [ + "from qlib.config import C\n", + "from qlib.\n", + "print(type(C))\n", + "# print(C)\n", + "print(C.provider)\n", + "print(type(D))\n", + "print(type(D._provider))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.3" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/qlib-git b/qlib-git deleted file mode 160000 index fa8f1cb..0000000 --- a/qlib-git +++ /dev/null @@ -1 +0,0 @@ -Subproject commit fa8f1cba06ba511744a0625afdf2cc3ac05302d0