From e927c0646c2537f6ee9f4beb6e02c9600c95d71c Mon Sep 17 00:00:00 2001 From: Sabuj Pattanayek Date: Wed, 24 Feb 2021 20:31:53 -0800 Subject: [PATCH 01/10] fix config_terminal.txt -> config_terminal.py fix typo .txt -> .py --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d2174ecf9fd..1aee0bac9ce 100644 --- a/README.md +++ b/README.md @@ -228,7 +228,7 @@ These are the ones where a key is necessary: * Reddit: https://www.reddit.com/prefs/apps * Twitter: https://developer.twitter.com -When these are obtained, don't forget to update [config_terminal.txt](/config_terminal.py) +When these are obtained, don't forget to update [config_terminal.py](/config_terminal.py) ## Disclaimer From ef011b4bbc5a44bcf5ca9d2fec30bd04ccb13020 Mon Sep 17 00:00:00 2001 From: Nick ODell Date: Wed, 24 Feb 2021 21:50:53 -0700 Subject: [PATCH 02/10] Fix spelling --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d2174ecf9fd..eb6da9a0e13 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,7 @@ financing cash flow financing activities of the company Yahoo Finance API info information scope of the company -shrs hareholders of the company +shrs shareholders of the company sust sustainability values of the company cal calendar earnings and estimates of the company @@ -219,7 +219,7 @@ Note: The libraries specified in the [requirements.txt](/requirements.txt) file ## API Keys -The project is build around several different API calls, whether it is to access historical data or finantials. +The project is build around several different API calls, whether it is to access historical data or financials. These are the ones where a key is necessary: * Alpha Vantage: https://www.alphavantage.co From 32af94046158b12ce3466c783c86a913298bc4ff Mon Sep 17 00:00:00 2001 From: danielorf Date: Wed, 24 Feb 2021 20:57:04 -0800 Subject: [PATCH 03/10] Update requirements.txt to include TimeSeriesCrossValidation and python-Levenshtein --- requirements.txt | 148 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 122 insertions(+), 26 deletions(-) diff --git a/requirements.txt b/requirements.txt index 7d5a5a8aca4..db73485b1f1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,29 +1,125 @@ -matplotlib==3.1.1 -flair==0.7 -finviz==1.3.4 -praw==7.1.4 -pandas_ta==0.2.23b0 -numpy==1.19.2 -iso8601==0.1.14 -config==0.5.0.post0 -prettytable==2.0.0 -pandas==1.1.5 -yahoo_fin==0.8.4 -pmdarima==1.8.0 -holidays==0.10.5.2 -fuzzywuzzy==0.18.0 -psaw==0.0.12 -alpha_vantage==2.3.1 -pytrends==4.7.3 -requests>=2.7.0 -Quandl==3.6.0 -pytz==2019.3 -xlwings==0.16.4 -statsmodels==0.12.2 -XlsxWriter==1.2.7 -yfinance==0.1.55 +absl-py==0.11.0 +aiohttp==3.7.3 +alpha-vantage==2.3.1 +appscript==1.1.2 +astunparse==1.6.3 +async-timeout==3.0.1 +attrs==20.3.0 beautifulsoup4==4.9.3 +bpemb==0.3.2 +cachetools==4.2.1 +certifi==2020.12.5 +chardet==3.0.4 +click==7.1.2 +cloudpickle==1.6.0 +config==0.5.0.post0 +convertdate==2.3.1 +cssselect==1.1.0 +cycler==0.10.0 +Cython==0.29.17 +decorator==4.4.2 +Deprecated==1.2.11 +filelock==3.0.12 +finviz==1.3.4 +flair==0.7 +flatbuffers==1.12 +ftfy==5.9 FundamentalAnalysis==0.2.6 -python_dateutil==2.8.1 -scikit_learn==0.24.1 +future==0.18.2 +fuzzywuzzy==0.18.0 +gast==0.3.3 +gdown==3.12.2 +gensim==3.8.3 +google-auth==1.27.0 +google-auth-oauthlib==0.4.2 +google-pasta==0.2.0 +grpcio==1.32.0 +h5py==2.10.0 +hijri-converter==2.1.1 +holidays==0.10.5.2 +hyperopt==0.2.5 +idna==2.10 +importlib-metadata==3.7.0 +inflection==0.5.1 +iso8601==0.1.14 +Janome==0.4.1 +joblib==1.0.1 +Keras-Preprocessing==1.1.2 +kiwisolver==1.3.1 +konoha==4.6.2 +korean-lunar-calendar==0.2.1 +langdetect==1.0.8 +lxml==4.6.2 +Markdown==3.3.4 +matplotlib==3.1.1 +more-itertools==8.7.0 +mpld3==0.3 +multidict==5.1.0 +multitasking==0.0.9 +networkx==2.5 +numpy==1.19.2 +oauthlib==3.1.0 +opt-einsum==3.3.0 +overrides==3.0.0 +packaging==20.9 +pandas==1.1.5 +pandas-ta==0.2.23b0 +patsy==0.5.1 +pmdarima==1.8.0 +praw==7.1.4 +prawcore==1.5.0 +prettytable==2.0.0 +protobuf==3.15.2 +psaw==0.0.12 +psutil==5.8.0 +pyasn1==0.4.8 +pyasn1-modules==0.2.8 +PyMeeus==0.4.2 +pyparsing==2.4.7 +PySocks==1.7.1 +python-dateutil==2.8.1 +python-Levenshtein==0.12.2 +pytrends==4.7.3 +pytz==2019.3 +Quandl==3.6.0 +regex==2020.11.13 +requests==2.25.1 +requests-oauthlib==1.3.0 +rsa==4.7.2 +sacremoses==0.0.43 +scikit-learn==0.24.1 +scipy==1.6.1 +segtok==1.5.10 +sentencepiece==0.1.91 +six==1.15.0 +smart-open==4.2.0 +soupsieve==2.2 +sqlitedict==1.7.0 +statsmodels==0.12.2 +tabulate==0.8.9 +tensorboard==2.4.1 +tensorboard-plugin-wit==1.8.0 tensorflow==2.4.1 +tensorflow-estimator==2.4.0 +termcolor==1.1.0 +threadpoolctl==2.1.0 +TimeSeriesCrossValidation @ git+https://github.com/DidierRLopes/TimeSeriesCrossValidation@1e29d393204abb3bde23ff3f15258ed85d3b263e +tokenizers==0.9.3 +torch==1.7.1 +tqdm==4.57.0 +transformers==3.5.1 +typing-extensions==3.7.4.3 +update-checker==0.18.0 +urllib3==1.26.3 +user-agent==0.1.9 +wcwidth==0.2.5 +websocket-client==0.57.0 +Werkzeug==1.0.1 +wrapt==1.12.1 +XlsxWriter==1.2.7 +xlwings==0.16.4 +yahoo-fin==0.8.4 +yarl==1.6.3 +yfinance==0.1.55 +zipp==3.4.0 +git+https://github.com/DidierRLopes/TimeSeriesCrossValidation@master From 5e5741ed943259456b83d70350ec4aa5de05e679 Mon Sep 17 00:00:00 2001 From: danielorf Date: Wed, 24 Feb 2021 21:08:16 -0800 Subject: [PATCH 04/10] Removed dup TimeSeriesCrossValidation in requirements.txt --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index db73485b1f1..2c2ffc3b5c9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -122,4 +122,3 @@ yahoo-fin==0.8.4 yarl==1.6.3 yfinance==0.1.55 zipp==3.4.0 -git+https://github.com/DidierRLopes/TimeSeriesCrossValidation@master From 15afc39c4eff6f2967b6e7e0c3ca403329a52226 Mon Sep 17 00:00:00 2001 From: danielorf Date: Wed, 24 Feb 2021 21:18:10 -0800 Subject: [PATCH 05/10] Added basic .gitignore --- .gitignore | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000000..4c9037be7c4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +__pycache__/ +*.pyc +.DS_Store +.env +.venv +env/ +venv/ From dabc46e908048fd84892ed8327913175c11b77f7 Mon Sep 17 00:00:00 2001 From: Sabuj Pattanayek Date: Wed, 24 Feb 2021 21:21:27 -0800 Subject: [PATCH 06/10] add missing py packages to requirements.txt fbprophet was missing (this also requires lunarcalendar). levenshtein added to get rid of the another warning at startup. --- requirements.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/requirements.txt b/requirements.txt index 7d5a5a8aca4..853268f11ab 100644 --- a/requirements.txt +++ b/requirements.txt @@ -27,3 +27,6 @@ FundamentalAnalysis==0.2.6 python_dateutil==2.8.1 scikit_learn==0.24.1 tensorflow==2.4.1 +lunarcalendar +fbprophet +levenshtein From a4cafdc989058db4a594fc10c984734a908b591c Mon Sep 17 00:00:00 2001 From: danielorf Date: Wed, 24 Feb 2021 21:22:39 -0800 Subject: [PATCH 07/10] Updated README.md to match --- README.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/README.md b/README.md index d2174ecf9fd..2b6880768f9 100644 --- a/README.md +++ b/README.md @@ -208,12 +208,6 @@ In order to install all libraries used by this repository, you must run ``` pip install -r requirements.txt ``` -and then: -``` -pip install git+https://github.com/DidierRLopes/TimeSeriesCrossValidation -``` -where the latest is a library that I made to split the time-series data for training, validation and testing. See more information at https://github.com/DidierRLopes/TimeSeriesCrossValidation. - Note: The libraries specified in the [requirements.txt](/requirements.txt) file have been tested and work for the purpose of this project, however, these may be older versions. Hence, it is recommended for the user to set up a virtual python environment previous to install these. This allows to keep dependencies required by different projects in separate places. From 426a6b217685ab22aef46d21bbabd6cb65fd2b5f Mon Sep 17 00:00:00 2001 From: danielorf Date: Wed, 24 Feb 2021 21:35:41 -0800 Subject: [PATCH 08/10] Added environment variable option to config_terminal vars --- README.md | 6 +++++- config_terminal.py | 24 +++++++++++++----------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index d2174ecf9fd..a0e6cee8a7b 100644 --- a/README.md +++ b/README.md @@ -228,7 +228,11 @@ These are the ones where a key is necessary: * Reddit: https://www.reddit.com/prefs/apps * Twitter: https://developer.twitter.com -When these are obtained, don't forget to update [config_terminal.txt](/config_terminal.py) +When these are obtained, don't forget to update [config_terminal.py](/config_terminal.py). Alternatively, you can also set them to the following environment variables: GT_API_KEY_ALPHAVANTAGE, GT_API_KEY_FINANCIALMODELINGPREP, GT_API_KEY_QUANDL, GT_API_REDDIT_CLIENT_ID, GT_API_REDDIT_CLIENT_SECRET, GT_API_REDDIT_USERNAME, GT_API_REDDIT_USER_AGENT, GT_API_REDDIT_PASSWORD, GT_API_TWITTER_KEY, GT_API_TWITTER_SECRET_KEY, and API_TWITTER_BEARER_TOKEN. + +``` +export GT_API_KEY_ALPHAVANTAGE="some_api_key" +``` ## Disclaimer diff --git a/config_terminal.py b/config_terminal.py index 4584e641471..86d757881b6 100644 --- a/config_terminal.py +++ b/config_terminal.py @@ -1,20 +1,22 @@ +import os + # https://www.alphavantage.co -API_KEY_ALPHAVANTAGE = "REPLACE_ME" +API_KEY_ALPHAVANTAGE = os.getenv("GT_API_KEY_ALPHAVANTAGE") or "REPLACE_ME" # https://financialmodelingprep.com/developer -API_KEY_FINANCIALMODELINGPREP = "REPLACE_ME" +API_KEY_FINANCIALMODELINGPREP = os.getenv("GT_API_KEY_FINANCIALMODELINGPREP") or "REPLACE_ME" # https://www.quandl.com/tools/api -API_KEY_QUANDL = "REPLACE_ME" +API_KEY_QUANDL = os.getenv("GT_API_KEY_QUANDL") or "REPLACE_ME" # https://www.reddit.com/prefs/apps -API_REDDIT_CLIENT_ID = "REPLACE_ME" -API_REDDIT_CLIENT_SECRET = "REPLACE_ME" -API_REDDIT_USERNAME = "REPLACE_ME" -API_REDDIT_USER_AGENT = "REPLACE_ME" -API_REDDIT_PASSWORD = "REPLACE_ME" +API_REDDIT_CLIENT_ID = os.getenv("GT_API_REDDIT_CLIENT_ID") or "REPLACE_ME" +API_REDDIT_CLIENT_SECRET = os.getenv("GT_API_REDDIT_CLIENT_SECRET") or "REPLACE_ME" +API_REDDIT_USERNAME = os.getenv("GT_API_REDDIT_USERNAME") or "REPLACE_ME" +API_REDDIT_USER_AGENT = os.getenv("GT_API_REDDIT_USER_AGENT") or "REPLACE_ME" +API_REDDIT_PASSWORD = os.getenv("GT_API_REDDIT_PASSWORD") or "REPLACE_ME" # https://developer.twitter.com -API_TWITTER_KEY = "REPLACE_ME" -API_TWITTER_SECRET_KEY = "REPLACE_ME" -API_TWITTER_BEARER_TOKEN = "REPLACE_ME" +API_TWITTER_KEY = os.getenv("GT_API_TWITTER_KEY") or "REPLACE_ME" +API_TWITTER_SECRET_KEY = os.getenv("GT_API_TWITTER_SECRET_KEY") or "REPLACE_ME" +API_TWITTER_BEARER_TOKEN = os.getenv("GT_API_TWITTER_BEARER_TOKEN") or "REPLACE_ME" From c5111e53ca606460305e1883d0b24c71875a0995 Mon Sep 17 00:00:00 2001 From: danielorf Date: Wed, 24 Feb 2021 21:39:40 -0800 Subject: [PATCH 09/10] fix readme format --- README.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a0e6cee8a7b..d17d44329aa 100644 --- a/README.md +++ b/README.md @@ -228,11 +228,18 @@ These are the ones where a key is necessary: * Reddit: https://www.reddit.com/prefs/apps * Twitter: https://developer.twitter.com -When these are obtained, don't forget to update [config_terminal.py](/config_terminal.py). Alternatively, you can also set them to the following environment variables: GT_API_KEY_ALPHAVANTAGE, GT_API_KEY_FINANCIALMODELINGPREP, GT_API_KEY_QUANDL, GT_API_REDDIT_CLIENT_ID, GT_API_REDDIT_CLIENT_SECRET, GT_API_REDDIT_USERNAME, GT_API_REDDIT_USER_AGENT, GT_API_REDDIT_PASSWORD, GT_API_TWITTER_KEY, GT_API_TWITTER_SECRET_KEY, and API_TWITTER_BEARER_TOKEN. - -``` -export GT_API_KEY_ALPHAVANTAGE="some_api_key" -``` +When these are obtained, don't forget to update [config_terminal.py](/config_terminal.py). Alternatively, you can also set them to the following environment variables: + * GT_API_KEY_ALPHAVANTAGE + * GT_API_KEY_FINANCIALMODELINGPREP + * GT_API_KEY_QUANDL + * GT_API_REDDIT_CLIENT_ID + * GT_API_REDDIT_CLIENT_SECRET + * GT_API_REDDIT_USERNAME + * GT_API_REDDIT_USER_AGENT + * GT_API_REDDIT_PASSWORD + * GT_API_TWITTER_KEY + * GT_API_TWITTER_SECRET_KEY + * GT_API_TWITTER_BEARER_TOKEN. ## Disclaimer From db148a2a28b38e8d6ebd817b294c0bb7713dab50 Mon Sep 17 00:00:00 2001 From: Breck Yunits Date: Wed, 24 Feb 2021 20:20:53 -1000 Subject: [PATCH 10/10] DS_Store finds a way --- fundamental_analysis/.DS_Store | Bin 6148 -> 0 bytes technical_analysis/.DS_Store | Bin 6148 -> 0 bytes 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 fundamental_analysis/.DS_Store delete mode 100644 technical_analysis/.DS_Store diff --git a/fundamental_analysis/.DS_Store b/fundamental_analysis/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0