nvleft.blogg.se

Google trends data time series
Google trends data time series





google trends data time series

We can see that the sentiment seems plausible. We can look at the sentiment analysis for the Apple company:Īn example of some of the sentiment scores is shown below:Ĭramer solves the great Apple mystery: How it faked out everyone on Wall Street The method uses a sentiment dictionary developed in the Nebraska Literary Lab to determine the specific valuecorresponding with words in the title. The sentiment analysis iterates over the news titles and returns sentiment values corresponding to the date the news article was published. To overome this I will use the Google News API to gather news from various News sources such as Yahoo finance, Reuters, and Seeking Alpha, among other, and perform a sentiment analysis on the news titles that acts as an indicator of the stock market returns, and signal for my model.

google trends data time series

Google trends may see this as equivalent, but obviously our buy-sell position may be different dependent on the sentiment. For example, people may be entering "How to I sell all of my Apple stock", or "How do I buy buckets and buckets of Apple stock". While google trends may be able to tell us when peple are interested in a company, it does not tell us peoples' sentiment about the company. The p-value is within machine precision indicating that the relationship is statistically very significant, so should act as a good predictor of stock market returns and signal for my model. To determine this, we can look at a t-test between the returns and the google trend index.ĭata: tot_df$AAPL.Adjusted and tot_df$indexĪlternative hypothesis: true difference in means is not equal to 0 But the important question is whether it is a good predictor of stock market returns. There appears to be some time-dependence, with spikes roughly twice per year. We can see that there is a clear time-dependent trend in the data, with some seasonality. To get a feel of what we are trying to predict we can plot the adjusted stock price of Apple as a function of time.

The time series model I will use is an autoregressive intergrated moving average (ARIMA) model, this model will take \(x\) number of days of time series data and use it to forecast a given number of days ahead. I will quantify these inputs and use them as signals to increase the performance of my model. I test the hypothesis on the Apple stock since it is very popular and often searched term on google, and news stories are plentiful. I will use google trends since it gathers the total number of searches relative to the total search volume in google, and text-mine google news headlines for the sentiment as my "signals" to indicate buy-sell positions. Here I hypothesize that trends in stock market returns can be predicted by the relative changes in amount terms related to the stock index is searched on search engines, and by sentiment derived by news headlines realted to publicy-traded companies.







Google trends data time series