Skip to content

Term paper developed by Guilherme Montico and Ivan Raphael for Computer Engineer graduation at Universidade São Francisco, Itatiba-SP

License

Notifications You must be signed in to change notification settings

nascimentorapha/term-paper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Term Paper - Computer Engineer


📌 Table of Contents


🌐 Technologies


📜 Resume

The present works proposes analyze and study through Artificial Intelligence and Linear Regression the relationship between the new's sentiment analysed through Twitter and the stock exchange variation value


🛠️ Prerequisites

We suggest you to use Google Colab to run the codes and ajust to companys that you prefer

First step

# Clone this repository
$ git clone https://github.com/nascimentorapha/term-paper.git

Install APIs and import libs

#Alpha Vantage API
!pip install alpha_vantage

# import libraries
from alpha_vantage.timeseries import TimeSeries
import matplotlib.pyplot as plt
import pandas as pd
from pandas import DataFrame
from sklearn.preprocessing import StandardScaler
from sklearn.linear_model import LinearRegression
import tensorflow as tf

ℹ️ Tutorial

  • 1 Search Intraday - In path codes, run 1_get-intraday.ipynb to search the intraday company that you want and change the company code on Stock Market. E.g. Petrobras = PBR. Here we'll export the intraday data to csv.

  • 2 Search Tweets - Search tweets with Twitter API. We suggest to use the code made by Jefferson Henrique on this link (https://github.com/Jefferson-Henrique/GetOldTweets-python). We'll export to a csv here too;

  • 3 Proccess data - Run 3_adjustTweetsDatetime.ipynb to properly process tweet data for later concatenate with intraday;

  • 4 Sentiment Analyze - Run 4_vader_analyzer.ipynb to read and process tweets that we get on step 3

  • 5 Start Linear Regression - In this step we'll process


📈 Results

In test development with Petrobras company on his Stock Market Values and tweets analisys, the results after a Linear Regression was satisfatory and the prediction line on chart is visible and regular as we can see below on red points.

The correlationship between the stock market value variation and the sentiment generated by tweets was 55,02%.


👓 Upgrades

Feel free to aprimorate this project. We can too review pull requests with respective informations on the repository. Best regards, and thank you.


📝 License

This project is under the MIT license. See the LICENSE for more information.


Made with 💙 by Raphael Nascimento and Guilherme Montico 🚀

About

Term paper developed by Guilherme Montico and Ivan Raphael for Computer Engineer graduation at Universidade São Francisco, Itatiba-SP

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published