GithubHelp home page GithubHelp logo

felixnext / stock_trend_analysis Goto Github PK

View Code? Open in Web Editor NEW
22.0 22.0 5.0 9.83 MB

Forecasting & Recommender System for the Stock market that leverages information across various sources

License: MIT License

Jupyter Notebook 98.01% Python 1.90% HTML 0.09% Shell 0.01%

stock_trend_analysis's People

Contributors

dependabot[bot] avatar felixnext avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

stock_trend_analysis's Issues

Python version

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 'Symbol'

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.