GabrielDeza / Twitter-Adversarial-Finance

2 stars 2 forks source link

Questions and Suggestions #1

Open CMobley7 opened 3 years ago

CMobley7 commented 3 years ago

GabrielDeza, I reviewed your code and have a few suggestions which might make things easier. I'm not sure if you are choosing not to use the following, but I'd consider using the yfinance repo, https://github.com/ranaroussi/yfinance, to pull daily stock data. For additional features, I'd suggest adding technical indicators via the ta repo, https://github.com/bukosabino/ta. The add_all_ta_features function makes this simple. Also, out of curiosity, why are you using NRCLex instead of regular sentiment analysis? Did you find NRCLex produced better results than knowing whether people were more bullish than bearish and vice versa? If not, I'd suggest using FinBert, which it looks like you may already be, though there is now a Hugging Face transformers' implementation, https://huggingface.co/ProsusAI/finbert. Also, Hugging Face's transformers' pipeline feature makes this really easy, https://github.com/huggingface/transformers/blob/master/notebooks/03-pipelines.ipynb. I'd also suggest trying out additional time series models from gluonts, https://github.com/awslabs/gluon-ts. Also, if you wanted to do hyperparameter tuning, optuna, https://github.com/optuna/optuna, or maybe dask_optuna, https://github.com/jrbourbeau/dask-optuna, is fairly easy to set up. If you go this route, I've found that the HyperbandPruner performs much better than the default. You could use Ray's tune library instead, https://docs.ray.io/en/master/tune/index.html, but I've found setting up optuna to be much easier. Great work so far! I hope this helps!

GabrielDeza commented 3 years ago

Hi @CMobley7, thank you for the suggestions. I will answer each one below:

CMobley7 commented 3 years ago

Thank you for such a thorough and prompt response.

I actually found your codebase when I was looking through glounts's issues. I was planning on using gluonts to write a similar forecasting pipeline but wanted to see what code I could find in the space. I hadn't found a reliable/free way to get historical tweets; so, that I could utilize NLP. So, finding snscrape through your repo was a blessing; so, I felt led to provide any help I could. Hopefully, my suggestions thus far will prove helpful. If you know of any historical sources of news, please let me know. Have a great rest of the day. God bless.

GabrielDeza commented 3 years ago

@CMobley7 Hey, I was looking at some of your messages in the gluon-TS issues page and noticed that your case was M:1 forecasting (ie: you have 1 target and M-1 features and want to predict target in the future without knowing the M-1 features in the future). It seems that Gluon-TS does not really support this. Have you found other libraries or models that do perform M:1 forecasting that are actually strong?