Ejemplo n.º 1
0
    def __init__(self, FilePath):

        self.writeLog = Log.Logger('TdxDataEngine.txt')

        self.DataPath = FilePath  # file path for stock data

        self.STR_CATEGORY = "CategoryName"
        self.STR_CONTENT = "Content"

        self.MongoHandler = MongoDB.Mongo()

        # An example for all of data  Header + Body
        self.HeaderEx = {
            "_id": "880301",  # it's for mongodb, avoid duplication
            "Name": "煤炭",
            "Type": "Day",
            "Rehab": "Front",
            "Data": []  # it's list for BodyEx
        }

        self.BodyEx = {
            "2005/06/07": {
                "Opening": 159.89,
                "Maximum": 164.31,
                "Minimum": 157.22,
                "Close": 158.69,
                "Volume": 489895,
                "Turnover": 339753952.00
            }
        }
Ejemplo n.º 2
0
 def __init__(self):
     self.TYPING_NULL = 0        # 无顶底分型
     self.TYPING_TOP = 1         # 顶分型
     self.TYPING_BTM = -1        # 底分型
     self.SummaryData1 = 0       # 统计数据1存在标识, 0为不存在,1为存在。
     self.SummaryData2 = 0       # 统计数据2存在标识, 0为不存在,1为存在。
     self.SeqNum = 0
     self.SeqDate = pandas.date_range('2000/1/1','2020/1/1', freq = '1D')
     self.writeLog = Log.Logger('TrendAnalyzer.txt')
Ejemplo n.º 3
0
    def __init__(self):

        self.writeLog = Log.Logger('mongodb.txt')

        # connect DB
        self.ConnectDB()