felixnext / stock_trend_analysis Goto Github PK
View Code? Open in Web Editor NEWForecasting & Recommender System for the Stock market that leverages information across various sources
License: MIT License
Forecasting & Recommender System for the Stock market that leverages information across various sources
License: MIT License
Can you state which version of the python you used to run this environment?
With Python 3.9 while running 03-1_stocks_prediction.ipynb,
It's throwing up :
module 'base64' has no attribute 'decode string'
an issue related to python gsutil cp compilation
Also, it would be much appreciated if you can upload model weights you own for validation.
Thanks
KeyError Traceback (most recent call last)
~/stock_trend_analysis/ds/lib/python3.6/site-packages/pandas/core/indexes/base.py in get_loc(self, key, method, tolerance)
2656 try:
-> 2657 return self._engine.get_loc(key)
2658 except KeyError:
pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc()
pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc()
pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item()
pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item()
KeyError: 'symbol'
During handling of the above exception, another exception occurred:
KeyError Traceback (most recent call last)
in
19 return df_train, df_test
20
---> 21 df_train, df_test = train_test_data(10, 22, (-.5, .5), split=0.2, count=4000)
22 print(df_train.shape)
23 df_train.head()
in train_test_data(back, ahead, xlim, split, count, stocks, cache)
14
15 # generate sample data
---> 16 df_train = rcmd.learning.preprocess.create_dataset(sample_train, stocks, cache, back, ahead, xlim)
17 df_test = rcmd.learning.preprocess.create_dataset(sample_test, stocks, cache, back, ahead, xlim)
18
~/stock_trend_analysis/recommender/learning/preprocess.py in create_dataset(symbols, stocks, cache, back, ahead, xlim, num_cats, jump_size, smooth, sm, ti)
360 # load relevant statements
361 if sm is None: sm = FMPStatements()
--> 362 df_state = cache.load_statement_data(symbols, sm, limit=True)
363
364 # load relevant stocks
~/stock_trend_analysis/recommender/stocks/Cache.py in load_statement_data(self, symbols, statement, limit, cache, load_missing, load_data)
130 missing = symbols
131 else:
--> 132 missing = np.setdiff1d(symbols, df_state['symbol'].unique())
133
134 # load remaining data
~/stock_trend_analysis/ds/lib/python3.6/site-packages/pandas/core/frame.py in getitem(self, key)
2925 if self.columns.nlevels > 1:
2926 return self._getitem_multilevel(key)
-> 2927 indexer = self.columns.get_loc(key)
2928 if is_integer(indexer):
2929 indexer = [indexer]
~/stock_trend_analysis/ds/lib/python3.6/site-packages/pandas/core/indexes/base.py in get_loc(self, key, method, tolerance)
2657 return self._engine.get_loc(key)
2658 except KeyError:
-> 2659 return self._engine.get_loc(self._maybe_cast_indexer(key))
2660 indexer = self.get_indexer([key], method=method, tolerance=tolerance)
2661 if indexer.ndim > 1 or indexer.size > 1:
pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc()
pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc()
pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item()
pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item()
KeyError: 'symbol'
Not sure why it's missing 'Symbol'; any suggestions?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.