Giter Site home page Giter Site logo

nlp's Introduction

NLP: Sentiment Analysis and Bitcoin Return Prediction Using FinBERT

PREREQUISITES

  • Basic knowledge on Deep Learning and Natural Language
  • Exposure to Pytorch

BERT VS FinBERT

BERT is a popular natural language processing (NLP) pre-trained model developed by Google, which is widely used for sentiment analysis. By further training the BERT language model in the finance domain, FinBERT is created. It is trained on a large financial corpus and fine-tuned for financial sentiment classification.

FinBERT

DATASET

  • S&P 500 Constitutents from Wiki
  • Stock and Bitcoin Daily Price from Yahoo Finance API
  • Daily Financial News for 6000+ Stocks (~4m articles for 6,000 stocks from 2009-2020)
  • Over 10,000 Twitter tweets (55% non-disaster, 45% disaster) for testing
  • Over 3 million Twitter tweets on Bitcoin

PROJECT DESCRIPTION

First, we compare the performance of FinBERT with base-BERT model on both financial and non-financial text data. The results show that FinBERT performs better on financial text data as expected but performs worse on non-financial text data in sentiment analysis task.

Second, we use FinBERT in sentiment analysis to obtain sentiment score on tweets. Then we use the obtained score to predict future Bitcoin return and price movements. We find that adding the sentiment score as a feature could improve the prediction of Bitcoin’s next-day return, but the performance improvement hinges on the machine learning model adopted.

REFERENCES

[1] Devlin, Jacob, et al., Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805 (2018).

[2] GregoryW. Eaton, T. Clifton Green, Brian S. Roseman, and Yanbin Wu. Retail Trader Sophistication and Stock Market Quality: Evidence from Brokerage Outages. Working paper, 2021.

[3] Basant Agarwal and Namita Mittal. Machine Learning Approach for Sentiment Analysis. Springer International Publishing, 2016

[4] Oscar Araque, Ignacio Corcuera-Platas, J. Fernando Sánchez-Rada, and Carlos A. Enhancing deep learning sentiment analysis with ensemble techniques in social applications. Expert Systems with Applications, 2017

[5] Jeremy Howard and Sebastian Ruder. Universal Language Model Finetuning for Text Classification. arXiv, 2018

nlp's People

Contributors

lchencc avatar

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.