예제 #1
0
    def __init__(self):
        self.wsetData = [
            "000001.SH", "399300.SZ", "000016.SH", "000905.SH", "000906.SH"
        ]  # 要获取数据的证券代码
        self.indexFieldName = [
            "open", "high", "low", "close", "volume", "amt", "chg", "pct_chg",
            "turn"
        ]  # 要获取的数据字段
        self.fundFieldName = ["nav", "NAV_acc", "sec_name"]
        self.monetaryFund = [
            "mmf_annualizedyield", "mmf_unityield", "sec_name"
        ]
        self.stockFieldName = [
            "open", "high", "low", "close", "volume", "amt", "turn",
            "mkt_cap_ard", "pe_ttm", "ps_ttm", "pb_lf"
        ]
        self.engine = MysqlCon().getMysqlCon(flag='engine')
        self.conn = MysqlCon().getMysqlCon(flag='connect')
        self.GetDataToMysqlDemo = GetDataToMysql()
        self.logger = mylog.logger
        # w.start()

        log_state = THS_iFinDLogin('zszq5072', '754628')
        if log_state == 0:
            self.logger.info("同花顺账号登录成功!")
        else:
            self.logger.error("同花顺账号登录异常,请检查!")
            return
예제 #2
0
 def __init__(self, data_resource='ifind'):
     self.logger = mylog.set_log()
     self.dic_init = {}
     self.dic_init['data_resource'] = data_resource
     self.dic_init['data_init_flag'] = self.log_init(data_resource)
     mysql_con_demo = MysqlCon()
     self.engine = mysql_con_demo.getMysqlCon(flag='engine')
     self.conn = mysql_con_demo.getMysqlCon(flag='connect')
     self.GetDataToMysqlDemo = GetDataToMysql()
 def __init__(self):
     self.wsetData = [
         "000001.SH", "399300.SZ", "000016.SH", "000905.SH", "000906.SH"
     ]  # 要获取数据的证券代码
     self.indexFieldName = [
         "open", "high", "low", "close", "volume", "amt", "chg", "pct_chg",
         "turn"
     ]  # 要获取的数据字段
     self.fundFieldName = ["nav", "NAV_acc", "sec_name"]
     self.monetaryFund = [
         "mmf_annualizedyield", "mmf_unityield", "sec_name"
     ]
     self.stockFieldName = [
         "open", "high", "low", "close", "volume", "amt", "turn",
         "mkt_cap_ard", "pe_ttm", "ps_ttm", "pb_lf"
     ]
     self.engine = MysqlCon().getMysqlCon(flag='engine')
     self.conn = MysqlCon().getMysqlCon(flag='connect')
     self.GetDataToMysqlDemo = GetDataToMysql()
     self.logger = mylog.logger
예제 #4
0
 def __init__(self):
     self.start_date = '2020-07-01'
     self.end_date = '2020-07-31'
     self.file_path = r"D:\\工作文件\\指数基金月报\\培训PPT\\0821\\"
     MysqlConDemo = MysqlCon()
     self.engine = MysqlConDemo.getMysqlCon('engine')
     self.name_dic = {
         'fund_code': '基金代码',
         'fund_type': '基金类型',
         'product_type': '产品类型',
         'fund_name': '基金名称',
         'establish_date': '基金成立日',
         'indx_sname': '跟踪指数',
         'class_classify': '跟踪指数类型',
         'index_code': '跟踪指数代码'
     }
     self.logger = mylog.set_log()
예제 #5
0
 def __init__(self):
     self.logger = mylog.set_log()
     mysql_con_demo = MysqlCon()
     self.engine = mysql_con_demo.getMysqlCon(flag='engine')
     w.start()
 def __init__(self):
     MysqlConDemo = MysqlCon()
     self.engine = MysqlConDemo.getMysqlCon('engine')
예제 #7
0
 def __init__(self):
     self.conn = MysqlCon().getMysqlCon(flag='connect')
     self.logger = mylog.logger
예제 #8
0
 def __init__(self):
     MysqlConDemo = MysqlCon()
     self.engine = MysqlConDemo.getMysqlCon('engine')
     self.GetDataTotalMainDemo = GetDataTotalMain(data_resource='wind')
     self.industry_trade_limit = 20000000