From 3a911bc09ba5136cd7c61c2c8dcca8a63339e738 Mon Sep 17 00:00:00 2001 From: Chia-hung Tai Date: Tue, 8 Mar 2022 23:48:27 +0800 Subject: [PATCH] Add REG_TW. (#955) --- qlib/config.py | 7 ++++++- qlib/constant.py | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/qlib/config.py b/qlib/config.py index d831a3ad2..50b430bb4 100644 --- a/qlib/config.py +++ b/qlib/config.py @@ -22,7 +22,7 @@ from pathlib import Path from typing import Callable, Optional, Union from typing import TYPE_CHECKING -from qlib.constant import REG_CN, REG_US +from qlib.constant import REG_CN, REG_US, REG_TW if TYPE_CHECKING: from qlib.utils.time import Freq @@ -257,6 +257,11 @@ _default_region_config = { "limit_threshold": None, "deal_price": "close", }, + REG_TW: { + "trade_unit": 1000, + "limit_threshold": 0.1, + "deal_price": "close", + }, } diff --git a/qlib/constant.py b/qlib/constant.py index c3ad11dbf..fa014a295 100644 --- a/qlib/constant.py +++ b/qlib/constant.py @@ -4,6 +4,7 @@ # REGION CONST REG_CN = "cn" REG_US = "us" +REG_TW = "tw" # Epsilon for avoiding division by zero. EPS = 1e-12