def __init__(self, account): self.account = account self.diff = dict() self.dbq = dbq.DbQueries() self.hf = hf.HelperFunctions(self.account.asset_pairs, self.dbq) # Get Configuration Values for Trader from JSON File # This is required in case, we want ot optimize the algorithms later on. trader_name = 'MaDBTrader' self.constant = hf.get_trader_config()[trader_name]
def __init__(self, k, account): self.k = k self.account = account self.pairs = account.asset_pair.keys() #self.pred = dict() self.diff = dict() self.price = dict() # Get Configuration Values for Trader from JSON File # This is required in case, we want ot optimize the algorithms later on. trader_name = 'mas_trader' self.constant = hf.get_trader_config()[trader_name] #Calculate the predicted change self.run_trader()
def __init__(self, conn, k, account): self.conn = conn self.k = k self.pairs = account.asset_pair.keys() self.pred = dict() self.diff = dict() self.price = dict() self.simulate = True # Get Configuration Values for Trader from JSON File # This is required in case, we want ot optimize the algorithms later on. trader_name = hf.get_tader_name(self) self.constant = hf.get_trader_config()[trader_name] #Calculate the predicted change self.predict_change()
def __init__(self, account): self.account = account self.queries = db_queries.DbQueries() self.pairs = account.asset_pair.keys() self.diff = dict() self.price = dict() # Get Configuration Values for Trader from JSON File # This is required in case, we want ot optimize the algorithms later on. trader_name = hf.get_tader_name(self) self.constant = hf.get_trader_config()[trader_name] self.keep = min(0.01, self.constant["delta"]) # Calculate the predicted change self.run_trader() self.keep_back(dt.datetime.strptime("2016-01-01", "%Y-%m-%d"))
def __init__(self, account): self.account = account self.queries = db_queries.DbQueries() self.pairs = account.asset_pair.keys() self.diff = dict() self.price = dict() # Get Configuration Values for Trader from JSON File # This is required in case, we want ot optimize the algorithms later on. trader_name = hf.get_tader_name(self) self.constant = hf.get_trader_config()[trader_name] self.keep = min(0.01,self.constant["delta"]) # Calculate the predicted change self.run_trader() self.keep_back(dt.datetime.strptime("2016-01-01","%Y-%m-%d"))