Stocks are possibly the most popular financial instrument invented for building wealth and are the centerpiece of any investment portfolio. The advances in trading technology has opened up the markets so that nowadays nearly anybody can own stocks. From last few decades, there seen explosive increase in the average person’s interest for stock market. In a financially explosive market, as the stock market, it is important to have a very accurate prediction of a future trend. Because of the financial crisis and recording profits, it is compulsory to have a secure prediction of the values of the stocks. Predicting a non-linear signal requires progressive algorithms of machine learning with help of Artificial Intelligence (AI). In our research, we are going to use Machine Learning Algorithm specially focus on Linear Regression (LR), Three month Moving Average(3MMA), Exponential Smoothing (ES) and Time Series Forecasting using MS Excel as best statistical tool for graph and tabular representation of prediction results. We obtained data from Yahoo Finance for Amazon (AMZN) stock, AAPL stock and GOOGLE stock after implementation LR we successfully predicted stock market trend for next month and also measured accuracy according to measurements.

Stock market is trading platform where different investors sale and purchase shares according to stock availability. Stock market ups and downs effects the profit of stakeholders. If market prices going up with available stock then stakeholders get profit with their purchased stocks. In other case, if market going down with available stock prices then stakeholders have to face losses. Buyers buy stocks with low prices and sell stocks at high prices and try to get huge profit. Similarly, sellers sell their products at high prices for profit purpose (

Data analysis (DA) in machine learning (ML) is a process of applying technical skills (ML Algorithms) on historical data to obtain statistical as well as tabular results about predictions. It also considered as technical process of data illustration and evaluation. Two authors (Shamoo

Stock market can be defined as combined platform of several markets and exchangers with regular process of buying and selling goods that shares issued publically (Comparison analysis performed at public platform). At this platform several situational financial performed for formal exchange process under defined rules and regulations (

Trend is considered as direction of stock movement that is totally based on stock market ups and downs. Continues movement of stock in any direction upward or downward for specified duration or time period can be considered as trend. In stock market prediction trend analysis at current stage support a lot in future trend prediction (

Everyone want to be rich in his life with low efforts and great advantages. Similarly, we want to look in our future with inner most desire as we do not want to take risks or we want to decrease risk factor. Stock market is a place where selling and purchasing can provide future aims of life (

If stock market trend predicted then we can avoid wastage of money. SMP is a process of predicting future on the base of past data. Prediction decreases the risk level to investors and increases the confidence level for investment. If they predicted goals before reach then they can avoid loss of money. All these consideration work as SMP. On the basis of historical data trends, we guess future trend that is called SMP (

AI is an intelligent field of latest research which is providing great help in solution of real time existing problems. AI supporting in each field of life as we use it in data processing in ATM machines, Bank accounts, Airways services, Reservation, X-RAYS, Auto door opening, recognition-based devices and weather forecasting. In other word we can say AI made our life easier and we can predict future. Earning money is major issue to face society and rick people considered as role models everywhere (

We will implement machine learning algorithms on above explained datasets and we will also analyses the trends of data manipulation as combined analysis of GOOGLE, FB,AMAZON,AAPLE data. Mostly data is obtained from yahoo finance (

AMZN considered as huge stock market that attracts investors to buy/sell its shares and its becoming a trendy business market in the world.

In this research we considered data from start of year as January 2019 to 25 July 2019 then we evaluated our approach with different prediction methodologies.

We obtained data from yahoo finance for AMZN stocks prediction. We applied normalization process on data and obtained values that are present in right corner of

Trends according to date can be checked about any product that is part of stock market. For this analysis we drawn graph between open/high/low/close prices. We can check how prices are moving day by day. Instead of complete study of data graph can give fully analytical view of market trends. Market alkways remain in changing process and statistical analysis give entire data outlook without any complexities.

Graph is representing a trend pattern where central dates of month showing high values. At start of month prices trend slow with central part of month it raises to high and at end of moth its showing medium rate of price changings

These algorithms can be understood easily and can be implemented easily. This algorithm runs into risky and over fitting environment easily. In some cases these algorithms are considered very much simple to solve complex problems. Linear regression runs under the relationship of two variables as one variable considered and dependent variable and other is considered as explanatory variable. A linear regression line has an equation of the form equation Y = a + bX, where X is the explanatory variable and Y is the dependent variable. The slope of the line is b, and a is the intercept (the value of y when x = 0) by (Vineet Maheshwari

Linear regression is used for predictions with data that has numeric target variable. During prediction we use some variables as dependent variables and few considered as independent variables. In situation when there is one dependent and one independent variable, we prefer to use linear regression methodologies. Regression can be single variable or multi variable, it depends upon situation named as single variable or multi variable regression (

In

R^{2} represents root mean square error that is considered as classification error, we can say 0.6% classification performed wrongly by linear regression and remaining working is correct and error free. In this processing data of closing prices from Jan 2019 to July 2019 used. We considered only date and closing prices for prediction. Equation 1 is our prediction with respect to actual values. By using this equation, we can predict next month closing prices that can be great beneficial to stockiest. Now let us consider predictions based on linear regression and generated data.

Now let’s consider

There can be different types of error present in our predictions that are explained by

Similarly, we can calculate other types of errors in our predictions

^{2}

^{rr}or:

As r-square is 0.6938, this represents root square value or it can be said as variability in closing prices of AMZN stock market.

R-value is –ve squawroot of r-square=r= -0.8329

When size of data increases the accuracy of results also increases. Here we used only seven months data for predictions on the basis of regression equation. If we check only one-month data on the basis of linear regression, there will be large amount of variability and all types of error will increase.

Here we used only June month data to draw linear regression curve, we can see all types of error values increases. We can say as SIMPLE size will be larger the prediction results will be accurate and vice versa.

Here we can compare the results of

If we want to improve accuracy in our predictions there are two more linear regression techniques that supportively work to decrease variability in actual and predicted values of closing prices. If we check

In this method we used previous three days average to predict next day price. If we compare

Here in

In this method we use an alpha value as alpha can be 0.4 or 0.8 then we consider first three close prices as seed values and from first three values central value considered as seed of prediction value, then we apply formula for prediction calculation.

Following formula work for exponential smoothing measurements

For prediction test we change values according to need, first we put alpha=0.4 and check the values of error measures, then we place alpha=0.8 and the changings in errors measurements considered. Whole processing, we did in MS excel, let us consider data below for further explanation.

Here in

In this previous study we considered 3 different methods for stock prediction, firstly we considered linear regression and results were presented with 24.31 average absolute error, secondly we used only one month sample for linear regression equation then the value of average absolute error was 72.43,

Thirdly we used 3-month average regression methodology and obtained 21.08 average absolute error value, at last we used exponential smoothing measurements based on linear regression methodology and obtained 16.62 average absolute error values that was most significant results that were predicted on the basis of AMZN stock market data from yahoo finance market. At last we can say exponential smoothing proved its prediction best as the value of average absolute error was smallest than all others.

After apply four different working methodologies we are able to predict next month prices of Amazon stock market, below is next month prediction as well as graphical representation of predicted prices. In linear regression equation we used seven months data as historical record and after generating equation we evaluated next month predictions.

From

For time series forecasting method, we used AAPL Stock market data from Jan 2019 to July 2019. The data was obtained from yahoo finance and before stock market prediction measurements; we applied some preprocessing to organize data for better prediction results. We converted each month into three quarters, one quarter was ten days and total thirty days for each month become equal to 1,2,3 values. Now we can say for seven months there was considered 21 days or 21 quarters. For each quarter, we obtained average of ten working stock market days.

Now let us examine the AAPL data before and after preprocessing.

Only dates and closing prices of stock market AAPL product was our actual need to predict future, then we considered stock values as follow

In

Now according to

For first value the required result for MA can be predicted with average of 1,2,3=2^{nd} value of the month, similarly we can find out all other patterns for whole data by using MS excel.

In

Let us now consider central moving average of three quarters of a month with CMA(3). CMA is considered as center of two MA values for first moth and it can be said as central value of MA values in three quarters of a month.

In

Now for further accuracy and other parameters finding we will do more steps. Next step is called smoothing, for this purpose we need two variables one is called sessional component(S_{t}) and other is called irregular component(I_{t}final result for smoothing can be considered by product of both of these variables(S_{t} I_{t}).

Let us consider

_{ce}s= Yt= St * It * Tt Eq4

Let us now conside_{r fu}ll output by linear regression before further consideration of Time series forecasting_{.}
_{ c}an be obtained by addition of coefficients present in Table 16.1, and then multiplying with T values as serial number of stock market.

Seasonality and irregularity components tell about the distance closeness or away position from actual price line of graph. S_{t} in Table 17 is sessional component, let us consider its method of working. Now let us consider depersonalize values for data, this can be done actual prices (Y_{t})/S_{t} that is also necessary for stock values prediction. Now for forecasting we can obtain results of our predictions by dividing sea_{so}nality with T_{t}, that is considered our actual prediction obtained from whole process. Below is the obtained components table that is obtained by methodology for stock values prediction of AAPL stock for next month that is represented by yellow color.

Stock market prediction is actual demand for beneficial business. Predictions always helpful to decrease risk factor in any business environment. Risk factor can be analyzed on the basis of historical data and previous business trends. This research based on several results and we used machine learning algorithm (ML) as Linear Regression (LR) with respect relations to business priority. Linear regression applied on different data sets that were obtained from stock market place (Yahoo finance). Yahoo Finance ever considered as best market place for obtaining stock market data about any product. In our research we used Amazon (AMZN) and Apple (AAPL) datasets for our practical approaches. Before applying ML on datasets, we analyzed stock market trends for both products. Trend analysis also provide predictions about future business plan. In next step first we used AMZN dataset and after analysis of stock market trend we applied linear regression with the help of Excel statistical graphs. Secondly, we applied three month moving average(3MMA) method to predict stock market prices of AMZN products. Thirdly we applied exponential smoothing (ES) for predictions. After comparing all results, we obtained hypothesis that exponential smoothing prediction results given less error and greater accuracy and we considered it best stock market predictor with general trend analysis. Similarly, we applied these three methods on AAPL data and obtained results about predictions. After applying these methodologies, we capable to predict one-month forward stock market trend and we presented August prices as founded throughput. At end of previous chapter, we applied Time Series Forecasting methodology and predicted AAPL stock prices for next month. Time Series Forecasting method also introduced new ways for stock market trend analysis. At last we can say by applying this research methodology we are able to predict future stock market trends easily. Several Machine learning algorithms can be used for stock market prediction but in this research we used few algorithms like Linear regression(LR), Three Months Moving Average(3MMA) and Exponential Smoothing and if we further consider many other algorithms can also be used for Stock Market Prediction(SMP).In Whole research we found Exponential Smoothing predictions results are best rather than Linear Regression(LR) and Three Months Moving Average(3MMA).