and (code[:2] == '60' \ or code[:2] == '00' \ or code[:2] == '30'): if code[:2] == '60': stock_list.append("sh" + code) else: stock_list.append("sz" + code) from DataProviders.DailyFullMarket2D import DailyFullMarket2D as Provider from Models.ModelChange_AE import ModelChange as Model low, high, step, samples = -9.5, 9.5, 1, 3500 data_segment = 'today_full' result_cols = ['nextday_close'] provider = Provider(start_date, end_date, []) model = Model() cond = " `{0}` > {1} AND `{0}` < {2} ".format(result_cols[0], low, high) results = provider.fetch_resultset(result_cols, cond) results = provider.balance_result(result_cols[0], low, high, step, samples) results = results[result_cols].as_matrix() results = results[:, 0] data = provider.fetch_dataset(data_segment) # results = results * 0.1 # data = data[:10000] # results = results[:10000] count = data.shape[0]
and (code[:2] == '60' \ or code[:2] == '00' \ or code[:2] == '30'): if code[:2] == '60': stock_list.append("sh" + code) else: stock_list.append("sz" + code) from DataProviders.DailyFullMarket2D import DailyFullMarket2D as Provider from Models.ModelCNN_NDC_relu import Model_CNN_NDC_relu as Model low, high, categories, step, samples = -5, 5, 3, 1, 2000 data_segment = 'today_full' result_cols = ['nextday_close'] provider = Provider(start_date, end_date, stock_list) model = Model(low, high, categories) cond = " `{0}` > {1} AND `{0}` < {2} ".format(result_cols[0], low, high) results = provider.fetch_resultset(result_cols, cond) results = provider.balance_result(result_cols[0], low, high, step, samples) results = results[result_cols].as_matrix() results = results[:, 0] data = provider.fetch_dataset(data_segment) # results = results * 0.1 # data = data[:10000] # results = results[:10000] count = data.shape[0]