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

Class Feature

qlib/data/base.py:238–263  ·  view source on GitHub ↗

Static Expression This kind of feature will load data from provider

Source from the content-addressed store, hash-verified

236
237
238class Feature(Expression):
239 """Static Expression
240
241 This kind of feature will load data from provider
242 """
243
244 def __init__(self, name=None):
245 if name:
246 self._name = name
247 else:
248 self._name = type(self).__name__
249
250 def __str__(self):
251 return "$" + self._name
252
253 def _load_internal(self, instrument, start_index, end_index, freq):
254 # load
255 from .data import FeatureD # pylint: disable=C0415
256
257 return FeatureD.feature(instrument, str(self), start_index, end_index, freq)
258
259 def get_longest_back_rolling(self):
260 return 0
261
262 def get_extended_window_size(self):
263 return 0, 0
264
265
266class PFeature(Feature):

Callers 1

test_case2Method · 0.85

Calls

no outgoing calls

Tested by 1

test_case2Method · 0.68