Bitcoin price prediction
B
itcoin (BTC) price changes are volatile due to many reasons, such as its specially different perceived values by public and high profile losses. In this article, we focus on one of its major factor, BTC news articles’ influences. Due to the past momentum of BTC and a huge portion of BTC market among the cryptocurrency market, a massive group of BTC players have already existed. However, an analytically quantitative methodology to make decisions in this market is still lacking, so we endeavored to help with this situation based on machine learning algorithms here.Utilizing various vanilla supervised machine learning algorithms and exploring semi-supervised algorithms, we built a model to predict whether a certain news article will cause an apparent BTC price increase or decrease to help BTC players to make a more reasonable decision on selling or buying BTC.
Our project is roughly split into three major parts, financial data processing, news articles processing, and final prediction models. Can’t wait to go through the whole process now!
Financial Data processing
We scraped BTC second-by-second datasets from 01/01/2018 to 04/o1/2018 on Kaggle, which consists of the following information after being converted to a day-based dataset.
According to the stock market’s rule of thumb, an obvious change of stock price is defined as price fluctuation more than 2 standard deviations of past 30 days’ rolling average price, but there is no generally acknowledged definition of distinct BTC price change. And due to the dramatically and constantly changing BTC price, it is hard to test which number of standard deviations the most distinct one. Therefore, we use the same 2 standard deviations as in the stock market for BTC. The code is as the follows,
Based on the metric, we got and marked the dates with obvious BTC price change in our selected period. Then we divided the dates into three groups, first group with distinct price increases, which has namely positive markers (Date: 3/19/2018), and second with distinct price decreases and positive markers (Dates: 2/5/2019, 3/15/2019, 3/17/2019, 3/18/2019), and another trivial one with price changes within 2 standard deviations.
Now we move on to the second part, news articles’ data processing. The logic of these two parts’ connection will be elaborated at the third party
As the lead of news articles always contains the most important information, and there are many readers who only skim the introductory paragraph, so for the content column, we only extracted the lead of news articles.
![]() |
We regard the top 100 most frequently appearing words (the lemmatization and stemming are done and stop words are deleted at first) in all the extracted article’s introductory paragraphs as our corpora, and we deem them most relevant to BTC trading and price, so if a news article does not mention any of these keywords in the first 300 words, we deem this article irrelevant to BTC and then exclude it from our to-be-explored articles. (The first 300 words is the main idea of a news article concluded by empirical analysis and we do not choose introductory paragraph is because sometimes the lead is fewer than 300 words and we want to cover more articles),



Post a Comment