def main(config): if config.validate: output_len = config.output_seq_length l = config.num_layers loss = config.loss sl = config.num_stochastic_layers config = pickle.load( open( 'saved_models/'+config.model_name+'/config.p', "rb" )) config.validate = True config.simulate = False config.output_seq_length = output_len config.num_layers = l config.num_stochastic_layers = sl config.loss = loss print(config) t1 = time.time() data_folder = os.path.abspath(os.path.abspath("../../../../"))+'/data/' dataset = load_data(data_folder, config) t2 = time.time() print('Finished loading the dataset: ' + str(t2-t1) +' sec \n') model = PricePredictor(config, dataset) if config.validate: # model._make_figs(steps = config.output_seq_length, epoch=200) # model._validate(steps = config.output_seq_length, epoch=160) model._backtest(epoch=160) else: model._train()
def main(config): if config.validate: output_len = config.output_seq_length file_path = config.file_path seed = config.seed loss = config.loss target = config.target config = pickle.load( open('saved_models/' + config.model_name + '/config.p', "rb")) config.validate = True config.file_path = file_path config.output_seq_length = output_len config.seed = seed config.loss = loss config.backtest_target = 'close' config.target = 'NDX' print(config) t1 = time.time() data_folder = os.path.abspath(os.path.abspath("../../../../")) + '/data/' dataset = load_data(data_folder, config) t2 = time.time() print('Finished loading the dataset: ' + str(t2 - t1) + ' sec \n') model = PricePredictor(config, dataset) if config.validate: model._backtest(epoch=150) # model._validate(steps = config.output_seq_length, epoch=150) else: model._train()
def main(config): if config.validate: output_len = config.output_seq_length config = pickle.load( open('saved_models/' + config.model_name + '/config.p', "rb")) config.validate = True config.output_seq_length = output_len config.num_layers = 6 print(config) elif config.backtest: config = pickle.load( open('saved_models/' + config.model_name + '/config.p', "rb")) config.backtest = True print(config) t1 = time.time() data_folder = os.path.abspath(os.path.abspath("../../../../")) + '/data/' dataset = load_data(data_folder, config) t2 = time.time() print('Finished loading the dataset: ' + str(t2 - t1) + ' sec \n') model = PricePredictor(config, dataset) if config.validate: model._validate(steps=config.output_seq_length, epoch=40) # model._make_figs(steps = config.output_seq_length, epoch=40) if config.backtest: model._backtest2(epoch=180) else: model._train()
def main(config): if config.validate: config = pickle.load( open('saved_models/' + config.model_name + '/config.p', "rb")) config.validate = True config.simulate = False print(config) t1 = time.time() data_folder = os.path.abspath(os.path.abspath("../../../")) + '/data/' dataset = load_data(data_folder, config) t2 = time.time() print('Finished loading the dataset: ' + str(t2 - t1) + ' sec \n') model = PricePredictor(config, dataset) if config.validate: # model._validate( epoch=70) # model._make_figs(epoch=70) model._make_figs2(epoch=70) elif config.tsne: model._tsne(epoch=70) else: model._train()
def main(config): if config.validate: output_len = config.output_seq_length file_path = config.file_path seed = config.seed loss = config.loss l = config.num_layers sl = config.num_stochastic_layers config = pickle.load( open('saved_models/' + config.model_name + '/config.p', "rb")) config.validate = True config.file_path = file_path config.output_seq_length = output_len config.seed = seed config.loss = loss config.num_layers = l config.num_stochastic_layers = sl config.backtest_target = 'close_btc' config.target = 'lr_btc' config.model_name = 'vaegan_mv_hour_' print(config) elif config.backtest: config = pickle.load( open('saved_models/' + config.model_name + '/config.p', "rb")) config.backtest = True config.validate = False print(config) t1 = time.time() data_folder = os.path.abspath(os.path.abspath("../../../../")) + '/data/' dataset = load_data(data_folder, config) t2 = time.time() print('Finished loading the dataset: ' + str(t2 - t1) + ' sec \n') model = PricePredictor(config, dataset) if config.validate: model._validate(steps=config.output_seq_length, epoch=500) # model._make_figs(steps = config.output_seq_length, epoch=200) # model._backtest(epoch=500) else: model._train()