def test_strategy2(self): neural = NeuralNetwork(**stratify_parts(['AAPL', 'MSFT'], [0.25] * 3, '2017-01-01', '2018-01-01'), options_list=get_options_list(['sma', 'ema']), days=7, tolerance=0.01) Strategy(neural=neural, start='2018-04-01', end='2018-05-01', symbol='MSFT', threshold=0.7)
def test_strategy1(self): neural = NeuralNetwork(**stratify_parts(['AAPL', 'MSFT'], [0.5, 0.1, 0.3], '2015-01-01', '2018-01-01'), options_list=get_options_list( ['sma', 'ema', 'macd']), days=3, tolerance=0.05) Strategy(neural=neural, start='2018-01-01', end='2018-03-01', symbol='AAPL')
def test_neural1(self): log('\n\nTesting neural network...\n\n') NeuralNetwork(**stratify_parts(['AAPL'], [0.25] * 3, '2017-01-01', '2018-01-01'), options_list=get_options_list(['sma', 'ema']))
def test_neural2(self): NeuralNetwork(**stratify_parts(['AAPL', 'MSFT'], [0.5, 0.1, 0.3], '2017-01-01', '2018-01-01'), options_list=get_options_list(['sma']), days=5, tolerance=0.05)
def test_preprocess2(self): NeuralNetworkData(**stratify_parts(['AAPL', 'MSFT'], [0.5, 0.3, 0.1], '2017-01-01', '2018-01-01'), options_list=get_options_list(['sma']), days=5)