mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-14 00:06:58 +08:00
fix: typo in integration documentation: 'userd' -> 'used' (#2034)
* Fix typo in integration docs: 'userd' -> 'used' * fix: pylint error in CI --------- Co-authored-by: Linlang <Lv.Linlang@hotmail.com>
This commit is contained in:
@@ -71,7 +71,7 @@ The Custom models need to inherit `qlib.model.base.Model <../reference/api.html#
|
|||||||
)
|
)
|
||||||
|
|
||||||
- Override the `predict` method
|
- Override the `predict` method
|
||||||
- The parameters must include the parameter `dataset`, which will be userd to get the test dataset.
|
- The parameters must include the parameter `dataset`, which will be used to get the test dataset.
|
||||||
- Return the `prediction score`.
|
- Return the `prediction score`.
|
||||||
- Please refer to `Model API <../reference/api.html#module-qlib.model.base>`_ for the parameter types of the fit method.
|
- Please refer to `Model API <../reference/api.html#module-qlib.model.base>`_ for the parameter types of the fit method.
|
||||||
- Code Example: In the following example, users need to use `LightGBM` to predict the label(such as `preds`) of test data `x_test` and return it.
|
- Code Example: In the following example, users need to use `LightGBM` to predict the label(such as `preds`) of test data `x_test` and return it.
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ def get_calendar_list(bench_code="CSI300") -> List[pd.Timestamp]:
|
|||||||
if bench_code.upper() == "ALL":
|
if bench_code.upper() == "ALL":
|
||||||
|
|
||||||
@deco_retry
|
@deco_retry
|
||||||
def _get_calendar(month):
|
def _get_calendar_from_month(month):
|
||||||
_cal = []
|
_cal = []
|
||||||
try:
|
try:
|
||||||
resp = requests.get(
|
resp = requests.get(
|
||||||
@@ -98,7 +98,7 @@ def get_calendar_list(bench_code="CSI300") -> List[pd.Timestamp]:
|
|||||||
month_range = pd.date_range(start="2000-01", end=pd.Timestamp.now() + pd.Timedelta(days=31), freq="M")
|
month_range = pd.date_range(start="2000-01", end=pd.Timestamp.now() + pd.Timedelta(days=31), freq="M")
|
||||||
calendar = []
|
calendar = []
|
||||||
for _m in month_range:
|
for _m in month_range:
|
||||||
cal = _get_calendar(_m.strftime("%Y-%m"))
|
cal = _get_calendar_from_month(_m.strftime("%Y-%m"))
|
||||||
if cal:
|
if cal:
|
||||||
calendar += cal
|
calendar += cal
|
||||||
calendar = list(filter(lambda x: x <= pd.Timestamp.now(), calendar))
|
calendar = list(filter(lambda x: x <= pd.Timestamp.now(), calendar))
|
||||||
|
|||||||
@@ -613,10 +613,6 @@ class YahooNormalize1min(YahooNormalize, ABC):
|
|||||||
def symbol_to_yahoo(self, symbol):
|
def symbol_to_yahoo(self, symbol):
|
||||||
raise NotImplementedError("rewrite symbol_to_yahoo")
|
raise NotImplementedError("rewrite symbol_to_yahoo")
|
||||||
|
|
||||||
@abc.abstractmethod
|
|
||||||
def _get_1d_calendar_list(self) -> Iterable[pd.Timestamp]:
|
|
||||||
raise NotImplementedError("rewrite _get_1d_calendar_list")
|
|
||||||
|
|
||||||
|
|
||||||
class YahooNormalizeUS:
|
class YahooNormalizeUS:
|
||||||
def _get_calendar_list(self) -> Iterable[pd.Timestamp]:
|
def _get_calendar_list(self) -> Iterable[pd.Timestamp]:
|
||||||
|
|||||||
Reference in New Issue
Block a user