mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-06 20:41:09 +08:00
Add DataPathManager to QlibConfig && modify inst_processors to supports list only
This commit is contained in:
@@ -4,9 +4,8 @@ import pandas as pd
|
||||
from qlib.data.inst_processor import InstProcessor
|
||||
|
||||
|
||||
class ResampleProcessor(InstProcessor):
|
||||
def __init__(self, freq: str, hour: int, minute: int):
|
||||
self.freq = freq
|
||||
class Resample1minProcessor(InstProcessor):
|
||||
def __init__(self, hour: int, minute: int):
|
||||
self.hour = hour
|
||||
self.minute = minute
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@ qlib_init:
|
||||
day: "~/.qlib/qlib_data/cn_data"
|
||||
1min: "~/.qlib/qlib_data/cn_data_1min"
|
||||
region: cn
|
||||
dataset_cache: null
|
||||
maxtasksperchild: 1
|
||||
market: &market csi300
|
||||
benchmark: &benchmark SH000300
|
||||
data_handler_config: &data_handler_config
|
||||
@@ -16,10 +18,9 @@ data_handler_config: &data_handler_config
|
||||
label: day
|
||||
feature: 1min
|
||||
# with label as reference
|
||||
sample_benchmark: label
|
||||
sample_config:
|
||||
inst_processor:
|
||||
feature:
|
||||
- class: ResampleProcessor
|
||||
- class: Resample1minProcessor
|
||||
module_path: features_sample.py
|
||||
kwargs:
|
||||
freq: 1d
|
||||
|
||||
Reference in New Issue
Block a user