mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-10 14:26:56 +08:00
Modify the Feature to be case sensitive (#589)
This commit is contained in:
@@ -196,9 +196,9 @@ class Feature(Expression):
|
|||||||
|
|
||||||
def __init__(self, name=None):
|
def __init__(self, name=None):
|
||||||
if name:
|
if name:
|
||||||
self._name = name.lower()
|
self._name = name
|
||||||
else:
|
else:
|
||||||
self._name = type(self).__name__.lower()
|
self._name = type(self).__name__
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return "$" + self._name
|
return "$" + self._name
|
||||||
|
|||||||
@@ -670,7 +670,7 @@ class LocalFeatureProvider(FeatureProvider):
|
|||||||
|
|
||||||
def feature(self, instrument, field, start_index, end_index, freq):
|
def feature(self, instrument, field, start_index, end_index, freq):
|
||||||
# validate
|
# validate
|
||||||
field = str(field).lower()[1:]
|
field = str(field)[1:]
|
||||||
instrument = code_to_fname(instrument)
|
instrument = code_to_fname(instrument)
|
||||||
return self.backend_obj(instrument=instrument, field=field, freq=freq)[start_index : end_index + 1]
|
return self.backend_obj(instrument=instrument, field=field, freq=freq)[start_index : end_index + 1]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user