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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user