1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-13 07:46:53 +08:00

MVP for Indian Stocks in qlib using yahooquery

This commit is contained in:
Gaurav
2021-07-14 19:54:55 +05:30
parent 6d91f28474
commit 3c740fc2de
2 changed files with 65 additions and 0 deletions

View File

@@ -34,6 +34,7 @@ from data_collector.utils import (
get_calendar_list,
get_hs_stock_symbols,
get_us_stock_symbols,
get_in_stock_symbols,
generate_minutes_calendar_from_daily,
)
@@ -279,6 +280,28 @@ class YahooCollectorUS1min(YahooCollectorUS):
pass
class YahooCollectorIN(YahooCollector, ABC):
def get_instrument_list(self):
logger.info("get INDIA stock symbols......")
symbols = get_in_stock_symbols()
logger.info(f"get {len(symbols)} symbols.")
return symbols
def download_index_data(self):
pass
def normalize_symbol(self, symbol):
return code_to_fname(symbol).upper()
@property
def _timezone(self):
return "Asia/Kolkata"
class YahooCollectorIN1d(YahooCollectorIN):
pass
class YahooNormalize(BaseNormalize):
COLUMNS = ["open", "close", "high", "low", "volume"]
DAILY_FORMAT = "%Y-%m-%d"