def get_us_adv(): switch_nysdaq_database() get_adv("nysdaq_recd") switch_nyse_database() get_adv("nyse_recd") switch_amex_database() get_adv("amex_recd")
def analyzer_us_day_cost_profit(): switch_nysdaq_database() analyzer_day_cost_profit() switch_amex_database() analyzer_day_cost_profit() switch_nyse_database() analyzer_day_cost_profit()
def __init__(self, market_id='0', *args, **kwargs): super(KLineSpider, self).__init__(*args, **kwargs) self.str_market_id = market_id if market_id == '0': switch_zh_database() elif market_id == '105': switch_nysdaq_database() elif market_id == '106': switch_nyse_database() elif market_id == '107': switch_amex_database() self.scode_list = StockBriefTable.get_stock_id_list()
def init_us_day_k_line(): print('start init day k line...') print('init nysdaq...') switch_nysdaq_database() init_day_k_line_with_arg(105) print('\ninit nyse...') switch_nyse_database() init_day_k_line_with_arg(106) print('\ninit amex...') switch_amex_database() init_day_k_line_with_arg(107) print('\ninit finished')
def init_us_database(): print('start init database...') print('init nysdaq stock brief...') switch_nysdaq_database() gt.save_tickers(NYSE=False, NASDAQ=True, AMEX=False, filename="./data/nysdaq_stock_list.csv") StockBriefTable.init_stock_brief_from_cvs("./data/nysdaq_stock_list.csv") print('init NYSE stock brief...') switch_nyse_database() gt.save_tickers(NYSE=True, NASDAQ=False, AMEX=False, filename="./data/nyse_stock_list.csv") StockBriefTable.init_stock_brief_from_cvs("./data/nyse_stock_list.csv") print('init AMEX stock brief...') switch_amex_database() gt.save_tickers(NYSE=False, NASDAQ=False, AMEX=True, filename="./data/amex_stock_list.csv") StockBriefTable.init_stock_brief_from_cvs("./data/amex_stock_list.csv") print('\ninit finished')