-
Hello, This is the repository for our model for cs210 in which we've trained a Financial Sentiment Analysis model using Bert for Borsa Istanbul. Knowing live alternatives cost more than 750 TL for a month this project will be further upgraded as a live open-source alternative to its rivals. Please Star the project for further upgrades :))
-
Here you can find the code of the data gathering, parsing, model training and visualizations in different folders.
All the documentation is public and open-source.
This sheet will be updated, but for the moment
let's get a good grade :)
Below are quick explanation about what every code does,
the workings of the python code could be understood more by looking at the comments in each code.
This explanations can also be found in our repository
-
akbank_link_download.py
Downloads links to PDFs in the specified url until 04.01.2021 using selenium to traverse interactive page in akbank website
-
gedik_link_download.py
Downloads links to PDFs in the specified url using requests and BeautifulSoup to sequentially take links from gedik website
-
download_links_yk_garan
Downloads links to PDFs in the specified url using requests, BeautifulSoup and Selenium to sequentially take links from Garanti and YapıKredi website
-
akbank_PDF_download.py
Gets .txt file of links and downloads PDFs from it and saves them to /data/akbank_PDF, folders need to be created beforehand
-
garanti_PDF_download.py
Gets .txt file of links and downloads PDFs from it and saves them to /data/garanti_PDF, folders need to be created beforehand
-
gedik_PDF_download.py
Gets .txt file of links and downloads PDFs from it and saves them to /data/gedik_PDF, folders need to be created beforehand
-
yapikredi_PDF_download.py
Gets .txt file of links and downloads PDFs from it and saves them to /data/yapikredi_PDF, folders need to be created beforehand
-
pypdfium2_akbank.py
Using pypdfium2 to get necessary text from gedik pdfs located in data/yapikredi_PDF
put all extracted text into a list of dictionaries where date, count, paragraph are keys
put the combined dictionaries into .json file
-
pypdfium2_garanti.py
Using pypdfium2 to get necessary text from garanti pdfs located in data/garanti_PDF
put all extracted text into a list of dictionaries where date, count, paragraph are keys
put the combined dictionaries into .json file
-
pypdfium2_gedik.py
Using pypdfium2 to get necessary text from gedik pdfs located in data/gedik_PDF
put all extracted text into a list of dictionaries where date, monthAgo, count, paragraph are keys
put the combined dictionaries into .json file
-
pypdfium2_yapikredi.py
Using pypdfium2 to get necessary text from gedik pdfs located in data/yapikredi_PDF
put all extracted text into a list of dictionaries where date, count, paragraph are keys
put the combined dictionaries into .json file
After text extraction the output .json files were processed by dividing them by BIST-100 values such that,
if a text was published while BIST-100 had a negative change the processed text was put into the negative folder
else it was put into the positive folder, these folders would serve as the labeled data for our machine learning model
-
json_sorter.py
In this program received data is a json file containing list of dictionary with keys date, count, and paragraph.
The date of each element will be compared with XU100 excel sheet where changes in BIST-100 value are located.
The dates of dictionaries will be found in XU100 and will be sorted into negative folder if value is negative
or into positive folder if value is positive.
-
json_sort_haberler.py
In this program received data is a json file containing list of dictionary with keys date, count, and paragraph.
The date of each element will be compared with XU100 excel sheet where changes in BIST-100 value are located.
The dates of dictionaries will be found in XU100 and will be sorted into negative folder if value is negative
or into positive folder if value is positive.
-
json_sort_tweet.py
In this program received data is a json file containing dictionary of dictionary with id as keys and
date, tweet, views as values. The date of each element will be compared with XU100 excel sheet where
changes in BIST-100 value are located. The dates of dictionaries will be found in XU100 and will be
sorted into negative folder if value is negative or into positive folder if value is positive.