本文整理汇总了Python中BasicData.callTechInitProc方法的典型用法代码示例。如果您正苦于以下问题:Python BasicData.callTechInitProc方法的具体用法?Python BasicData.callTechInitProc怎么用?Python BasicData.callTechInitProc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BasicData
的用法示例。
在下文中一共展示了BasicData.callTechInitProc方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: init
# 需要导入模块: import BasicData [as 别名]
# 或者: from BasicData import callTechInitProc [as 别名]
def init(stock_code_163, stock_name, indicator):
stock_code = stock_code_sina = stock_code_163[1:]
end_date = date.today()
start_date = datetime.strptime("1990-01-01", "%Y-%m-%d")
bd.insertMasterData(stock_code, stock_name, stock_code_163, stock_code_sina, indicator)
data = bd.getStockData(stock_code_163, start_date, end_date)
bd.insertBasicData(stock_code, data)
logger.info("INSERT BASIC DATA COMPLETED")
bd.insertTechData(stock_code, data)
logger.info("INSERT TECH DATA COMPLETED")
bd.insertAnalysisData(stock_code, data)
logger.info("INSERT ANALYSIS DATA COMPLETED")
bd.updateMasterDate("LAST_UPDATED_DATE", data[0].split(",")[0], stock_code_163)
logger.info("LAST DATE UPDATED")
if indicator == "1":
rf = bd.getRecoveryFactor(stock_code_163, stock_code_sina, start_date)
bd.insertRecoveryFactor(stock_code, rf)
logger.info("INSERT RF DATA COMPLETED")
bd.callTechInitProc(stock_code)
logger.info("CALL PROC TO UPDATE TECH DATA")
logger.info("SLEEP FOR 20 MINUTES")
tm.sleep(20 * 60)
sa.analyze(stock_code, end_date)