Esempio n. 1
0
 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)
Esempio n. 2
0
 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')
Esempio n. 3
0
 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']))
Esempio n. 4
0
 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)
Esempio n. 5
0
 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)