Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supporting Arctic Backend Provider & Orderbook, Tick Data Example #744

Merged
merged 36 commits into from
Jan 18, 2022

Conversation

luocy16
Copy link
Contributor

@luocy16 luocy16 commented Dec 13, 2021

Description

Motivation and Context

How Has This Been Tested?

  • Pass the test by running: pytest qlib/tests/test_all_pipeline.py under upper directory of qlib.
  • If you are adding a new feature, test on your own test scripts.

Screenshots of Test Results (if appropriate):

  1. Pipeline test:
  2. Your own tests:

Types of changes

  • Fix bugs
  • Add new feature
  • Update documentation

@ghost
Copy link

ghost commented Dec 13, 2021

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

❌ luocy16 sign now
You have signed the CLA already but the status is still pending? Let us recheck it.

@you-n-g
Copy link
Collaborator

you-n-g commented Dec 14, 2021

@luocy16 Please follow the instructions to format your code.
Ping me when you are ready.

Thanks

@@ -886,6 +955,7 @@ def dataset(
return_uri=False,
inst_processors=[],
):
#print("disk_cache {}".format(disk_cache))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the useless code after testing.

qlib/config.py Outdated
@@ -122,7 +131,7 @@ def set_conf_from_C(self, config_c):
# default 1 hour
"mem_cache_expire": 60 * 60,
# memory cache space limit, default 5GB, only in used client
"mem_cache_space_limit": 1024 * 1024 * 1024 * 5,
"mem_cache_space_limit": 1024 * 1024 * 1024,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it necessary to change the default memory size?

@@ -502,16 +505,18 @@ def parse_fields(fields):
return [ExpressionD.get_expression_instance(f) for f in fields]

@staticmethod
def dataset_processor(instruments_d, column_names, start_time, end_time, freq, inst_processors=[]):
def dataset_processor(instruments_d, column_names, start_time, end_time, freq, type="qlib", inst_processors=[]):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using constant string will be better.

from .ops import Operators
from .op_arctic import *
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import * is not encouraged

try:
arctic = Arctic_Connection_List[0]
#print("arctic example: {}, task_index:{}".format(arctic, task_index))
except Exception:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please catch specific exception instead of except Exception:

qlib/data/ops.py Outdated
elif self.func == 'ffill':
# TODO:
# Not sure why dropping duplicated element is necessary
series = series[~series.index.duplicated(keep='first')]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@luocy16 It's very kind of you if you could give any hints why ffill should be processed in such a special approach

@you-n-g you-n-g changed the title test version for arctic Supporting Arctic Backend Provider & Orderbook, Tick Data Example Jan 17, 2022
@you-n-g you-n-g merged commit 2bb8a4c into microsoft:main Jan 18, 2022
@you-n-g you-n-g added the enhancement New feature or request label Jan 18, 2022
qianyun210603 pushed a commit to qianyun210603/qlib that referenced this pull request Mar 23, 2023
…crosoft#744)

* change weight_decay & batchsize

* del weight_decay

* big weight_decay

* mid weight_decay

* small layer

* 2 layer

* full layer

* no weight decay

* divide into two data source

* change parse field

* delete some debug

* add Toperator

* new format of arctic

* fix cache bug to arctic read

* fix connection problem

* add some operator

* final version for arcitc

* clear HZ cache

* remove not used function

* add topswrappers

* successfully import data and run first test

* A simpler version to support arctic

* Successfully run all high-freq expressions

* Black format and fix add docs

* Add docs for download and test data

* update scripts and docs

* Add docs

* fix bug

* Refine docs

* fix test bug

* fix CI error

* clean code

Co-authored-by: bxdd <[email protected]>
Co-authored-by: wangwenxi.handsome <[email protected]>
Co-authored-by: Young <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants