Predicting Stock Prices
Abstract
Google is a worldwide company whose stock price data appeals to a vast majority of people across the world. By using the Markov Chains calculations and applying moving average, we forecast Google’s stock prices for the immediate future. The moving averages are grouped into four varied states of states of results. The Markov Chain calculations are applied to the data to give a 4×4 transitional probability matrix that solves a system of equations. This gives four steady states (variables) representing the probability that a stock price for a particular day would fall into one of them. Actual data is applied to this information and achieve predictions of the following stock prices for the immediate future. In general, the Markov Chain method enables us to reliably forecast the stock prices for the next several days.
Introduction
A lot of research has been done to understand and predict both short and long-term price movements. Attempts in developing risk-based models to accurately predict these changes in price have largely been unsuccessful (Cooper et al 2003). However, various theories have been developed to help explain, understand and predict possible price movements. One such theory DeBondt and Thaler (1985) and Jegadeesh and Titman (1993) developed as a behavioral model explain the anomalies that occur in the market and result in prices changes. Therefore, the theory attempts to explain an investor reaction to new information in the market.
However, in this proposal Markov –switching model was used. Therefore, using this approach has two advantages in trying to explain this market phenomenon. First, data will be used to classify the market and second, accountability of the possible movements in the market both prior and during the holding period. Therefore, empirical studies can be carried out.
Purpose of the study
This project aims to analyze a year’s worth of stock portfolio for Google using moving average and Markov Chains so to predict the company’s stock prices for the immediate future. Google was the best choice for this study because its popularity owing to its stature as the largest multinational corporation that offers Internet-related products and services.
Literature Review
The Markov chain, named after its proprietor Andrey Markov, refers to a mathematical system that transition from one state to another, between a countable or finite number probable state. It is a random process where the next state depends purely on the present state as opposed to the sequence of events that came before it. In other words, the method has the property that, considering the present, the future is largely conditionally independent of the past.
Methods
The data set chosen was for the project was Google Inc one year’s stock price. The data was collected as from 2nd September 2009 (closing price) and on 3rd September bring the total to 263 days of price changes. Afterwards, the moving averages were calculated. The moving averages are used as lagging indicators. Therefore, are used to forecast and actual prices in future of the stock. The moving averages used were both at the opening and closing price intervals of 3, 5 and 10 days. Observations of the differences were made to determine the price patterns. However, the moving average of the closing price was the primary focus due to the fact that the closing price is the opening price for the next day. Regardless, both were used and calculated.
Once the moving averages were calculated for the stock price the difference between the actual and moving average price was determined on each day. Consequently, this information would be used to determine the future stock prices. Once the price differences were determine, the prices were binned into four intervals. Histograms were used to determine the four bin intervals.
The prices were sorted and labeled depending on the interval it’s associated with: P1, P2, P3 and P4. Therefore, each price was labeled according to the interval it fell. Afterwards, the number of transition for each to the next preceding price interval was counted. Once this was established and information recorded, one-step transition matrix developed. As a result, the information was used to determine probability of transition from one state to another help in predicting the next price movements.
Expected Results
With moving average the interval 3 and 5, the price differences between the actual and forecasted were minimal, however the interval of 10 showed a great difference in price. Therefore, revealed that the interval 3 and 5 predicted the price with more accuracy. However, this can be argued that the increments of 3 and 5 are smaller consequently therefore their results will be calculated with smaller increments which will be less from the variation of the actual price rather than larger increments. Moreover, regardless moving average used it revolved around 25% of the actual price. Therefore, cannot be used as an accurate measure of probabilities of the divergence prices for the future
Discussions and Conclusions
The data set of stock prices presented here are one year’s worth of prices for Google, Inc. The data was readily available online from the company’s website. It is worth noting that Google stock were picked at random and thus the company’s stock do not hold any particular personal interest to us except for academic reasons in this project. The opening and closing prices utilized begin on September 2, 2009 and end on September 3, 2010, giving a total of 263 days of prices used for this project. Within this period, Google’s shares dropped about 4 percent even though it was the company’s strongest performance in a year. Google’s woes in China can be attributed to the falling of the stock, which was down almost 12 percent. This could be as a result of the company’s announcement that it may shut down its China operations following a cyber attack together with the move to quit censoring search results.
However, additional studies are needed to ascertain the stock prices for the near future considering the rapid growth that Google Company is experiencing on a daily basis. From the results, it is clear that there is need for Google to invest heavily in the following year if it is to stay ahead of its competitors and expand into new markets.
References
Cooper, M., Gutierrez, R., and Hameed, A. (2003), “Market States and Momentum”, Working
paper, forthcoming in Journal of Finance 2004.
Daniel, K., Hirshleifer, D. and Subrahmanyam, A., (1998), “Investor Psychology and Security
Market Under- and Overreactions”, Journal of Finance, Vol. LIII, No. 6. December 1998.
Maheu, J.M., and McCurdy, T., (2000), “Identifying bull and bear markets in stock returns”,
Journal of Business & Economic Statistics, Jan 2000, 18, 1, 100-112
