MCPcopy
hub / github.com/microsoft/qlib / features

Method features

qlib/data/data.py:1162–1190  ·  view source on GitHub ↗

Parameters ---------- disk_cache : int whether to skip(0)/use(1)/replace(2) disk_cache This function will try to use cache method which has a keyword `disk_cache`, and will use provider method if a type error is raised because the DatasetD insta

(
        self,
        instruments,
        fields,
        start_time=None,
        end_time=None,
        freq="day",
        disk_cache=None,
        inst_processors=[],
    )

Source from the content-addressed store, hash-verified

1160 return Inst.list_instruments(instruments, start_time, end_time, freq, as_list)
1161
1162 def features(
1163 self,
1164 instruments,
1165 fields,
1166 start_time=None,
1167 end_time=None,
1168 freq="day",
1169 disk_cache=None,
1170 inst_processors=[],
1171 ):
1172 """
1173 Parameters
1174 ----------
1175 disk_cache : int
1176 whether to skip(0)/use(1)/replace(2) disk_cache
1177
1178
1179 This function will try to use cache method which has a keyword `disk_cache`,
1180 and will use provider method if a type error is raised because the DatasetD instance
1181 is a provider class.
1182 """
1183 disk_cache = C.default_disk_cache if disk_cache is None else disk_cache
1184 fields = list(fields) # In case of tuple.
1185 try:
1186 return DatasetD.dataset(
1187 instruments, fields, start_time, end_time, freq, disk_cache, inst_processors=inst_processors
1188 )
1189 except TypeError:
1190 return DatasetD.dataset(instruments, fields, start_time, end_time, freq, inst_processors=inst_processors)
1191
1192
1193class LocalProvider(BaseProvider):

Callers 15

_compareMethod · 0.80
load_qlib_dataMethod · 0.80
fill_1min_using_1dFunction · 0.80
_get_old_dataMethod · 0.80
__init__Method · 0.80
__init__Method · 0.80
test_queryMethod · 0.80
test_no_exist_dataMethod · 0.80
test_exprMethod · 0.80
test_unlimitMethod · 0.80
test_expr2Method · 0.80
test_pref_operatorMethod · 0.80

Calls 1

datasetMethod · 0.45

Tested by 15

test_queryMethod · 0.64
test_no_exist_dataMethod · 0.64
test_exprMethod · 0.64
test_unlimitMethod · 0.64
test_expr2Method · 0.64
test_pref_operatorMethod · 0.64
test_0_qlib_dataMethod · 0.64
test_3_dump_featuresMethod · 0.64
test_settingMethod · 0.64
test_caseMethod · 0.64