diff --git a/market_trade/core/CoreTraidMath.py b/market_trade/core/CoreTraidMath.py index 8ed0114..a8c36e5 100644 --- a/market_trade/core/CoreTraidMath.py +++ b/market_trade/core/CoreTraidMath.py @@ -128,7 +128,7 @@ class CoreMath: window=self.params['actionOptions']['window'] ans=np.asarray([]) for i in range(len(self.col)-window+1): - ans=np.append(ans,np.std(self.col[i:i+window], ddof=1)) + ans=np.append(ans, np.std(self.col[i:i+window], ddof=1)) except: #window = len(self.col) diff --git a/market_trade/notebooks/autogen/Make unified candlesticks data import.py b/market_trade/notebooks/autogen/Make unified candlesticks data import.py index 0dca64f..1e407ec 100644 --- a/market_trade/notebooks/autogen/Make unified candlesticks data import.py +++ b/market_trade/notebooks/autogen/Make unified candlesticks data import.py @@ -6,9 +6,9 @@ # In[1]: -import market_trade.constants +import market_trade.core.constants -candlesticks_filepaths = [filepath for filepath in market_trade.constants.CANDLESTICK_DATASETS_PATH.iterdir()] +candlesticks_filepaths = [filepath for filepath in market_trade.core.constants.CANDLESTICK_DATASETS_PATH.iterdir()] candlesticks_filepath = candlesticks_filepaths[0] candlesticks_filepath @@ -69,7 +69,7 @@ a.analiz # In[5]: -test_candlesticks = pd.read_csv(market_trade.constants.TEST_CANDLESTICKS_PATH) +test_candlesticks = pd.read_csv(market_trade.core.constants.TEST_CANDLESTICKS_PATH) test_candlesticks['date'] = test_candlesticks['timestamp'] test_candlesticks.drop(['timestamp'], axis=1, inplace=True) test_candlesticks.head() diff --git a/market_trade/tests/test_dataloader.py b/market_trade/tests/test_dataloader.py index a0d82de..894742d 100644 --- a/market_trade/tests/test_dataloader.py +++ b/market_trade/tests/test_dataloader.py @@ -1,13 +1,13 @@ -import market_trade.dataloader -import market_trade.constants +import market_trade.core.dataloader +import market_trade.core.constants def test_dataloader(data_path): - duka_interface = (market_trade.dataloader.DukaMTInterface(data_path)) + duka_interface = (market_trade.core.dataloader.DukaMTInterface(data_path)) print(duka_interface.ask_candlesticks) if __name__ == '__main__': - candlesticks_filepaths = [filepath for filepath in market_trade.constants.CANDLESTICK_DATASETS_PATH.iterdir()] + candlesticks_filepaths = [filepath for filepath in market_trade.core.constants.CANDLESTICK_DATASETS_PATH.iterdir()] candlesticks_filepath = candlesticks_filepaths[0] test_dataloader(candlesticks_filepath) \ No newline at end of file