Forecasting Nestle Stock Price by using Brownian Motion Model during Pandemic Covid-19

— In the modern financial market, investors have to make quick and efficient investment decisions. The problem arises when the investor does not know the right tools to use in investment decision making. Different tools can be implemented in trading strategies to predict future stock prices. Therefore, the primary objective of this paper is to analyse the performance of the Geometric Brownian Motion (GBM) model in forecasting Nestle stock price by assessing the performance evaluation indicators. To analyse the stocks, two software were used, namely Microsoft Excel and Python. The model is trained for 16 weeks (4 months) of data from May to August 2019 and 2020. The simulated sample is for four weeks (1 month) which is for September 2019 and 2020. The findings show that during the Pandemic Covid-19, short-term prediction using GBM is more efficient than long-term prediction as the lowest Mean Square Error (MSE) value is at one week period. In addition, the Mean Absolute Percentage Error (MAPE) for all GBM simulations is highly accurate as it shows that MAPE values are less than 10%, indicating that the GBM method can be used to predict Nestle stock price during an economic downturn.


I. INTRODUCTION
The year 2020 was the year that most, if not all, will remember throughout their lifetime. That was the year starting from March, where the Covid-19 pandemic spread like wildfire. The earth stood still when the governments around the world imposed lockdowns to limit movements to contain the spread of the virus. In most countries, the stock market crashed as a result of panic selling among retail investors. As sectors such as tourism and services are halted, employers in these sectors needed to take drastic measures such as cutting wages and imposing furlough on their employees. While some move on to find other jobs to support their livelihood, some jump the bandwagon on stock trading. Given that most of the stocks have had their price drop significantly during the initial few weeks of the lockdown due to uncertainties, retail investors sees this as an opportunity to make investments, albeit short term or long term ones.
On July 15th, 2020, there is an increase in local retail participation from 24% in mid-June last year to 41.44%, as shown by statistics taken from Bursa Malaysia [10]. Consequently, this has progressed the FTSE Bursa Malaysia KLCI Index, which helped recuperate the losses from sell-off in March due to the Movement Control Order (MCO) executed by the Malaysian government [3]. On July 20th, 2020, Bursa also had continued to raise the stock trading volume to its highest level in history of 12.5 billion. The high trading volume is an unusual market activity despite the International Monetary Fund (IMF) statement that the Covid-19 pandemic has been the worst financial crisis after the 1930s Great Depression crisis [1]. Bursa Malaysia recorded a 62% increase of its Profit After Tax to RM151.0 million from RM93.2 million in 2019. The value is the highest first-half financial performance since its listing in 2005. Thus, this situation indicates the ongoing efforts in growing the stock market vibrancy and liquidity during the challenging pandemic situation.
Even though the recent vast trading volume marked an alltime peak of 27.8 billion on August 11th 2020 [11], Bursa Malaysia has expressed their concern over the retail investors, especially the beginners. The first-time investors need to have a proper assessment and analysis from a fundamental and technical perspective to make informed investment decisions and understand that their investments complemented their investment goals and risk appetite. In fact, the first seven months of 2020 revealed that 78 per cent of investors are aged 45 years and below. Thus, investor education and literacy is an equally significant agenda to be elevated as getting retail investors into the stock market has always been a priority for the local bourse.
Regarding the above matter, this study suggests that the millennial investors in the stock market need to be knowledgeable in expanding the assort of digital trading platforms, stimulating many types of decision-making and analytical Artificial Intelligence (AI) powered tools and leveraging digital technology [13]. This effort could inspire retail investors to fully utilise the available sources to have a sustainable market in the long term. As a result, stock investment has been the interest of researchers in the academic field, financial experts and investors. Various models can be implemented in their trading strategy to predict the stock price direction, for example, geometric Brownian Motion model, Fuzzy Time Series model and artificial neural network. Each model has its advantages and disadvantages.
Nonetheless, not only in Malaysia, but the whole world could experience losses due to wrong decision making in investment. Many different reasons could lead to a bad investment decision. One of the reasons is that the investors have a preconceived notion on investment which results in favouritism when making an investment decision by not considering other information and knowledge [8]. Thus, it is essential to understand the model used in trading strategy to fulfil the investor's objective when trading.
Given all the statements above, the primary objective of this study is to evaluate the efficiency of the geometric Brownian Motion model used in trading strategy by assessing the performance evaluation indicators. This paper is organised as follows; Section 2 outlines the geometric Brownian Motion model in financial time series forecasting and its recent works, while Section 3 displays the study's conceptual framework. Section 4 gives details on data and methodology. Following, Section 5 offers a discussion on the findings, and the final part concludes the results and offers future recommendations.

A. Background on Geometric Brownian Motion
Geometric Brownian Motion (GBM) is one of the models of a continuous-time stochastic process. In GBM, the logarithm of the randomly varying quantity of a continuous-time stochastic process follows a Brownian motion, also known as the Weiner process with a drift [6]. It is also known as exponential Brownian motion. The Weiner process is a mathematical property of one-dimensional Brownian motion. It is wellrecognised as the stochastic process with attractive properties such as stationarity and independent increments and represents the integral of the white noise Gaussian function [7]. Hence, it is applied in many fields, not just in the financial field. GBM is a perfect example of stochastic processes that satisfy stochastic differential equation (SDE), as shown in equation (1), which is vastly used in mathematical finance to the model stock price in the Black-Scholes model. where: : stock price at time t, : drift value, : time steps, : volatility value, : Weiner process, and : any random number from a standard normal distribution. The Brownian motion or Weiner process, , is the uncertainty portion of the equation. As shown in equation (2), each Brownian increment is generated by multiplying any random number from a standard normal distribution of mean zero and standard deviation of one by the square root of time increment [9]. Thus, the cumulative sum of Brownian increments represents the Brownian path, as shown in Figure 1 above.
By substituting equation (2) into (1), it gives a general standard GBM, as shown in equation (3), where is the sum of a general trend (also known as drift) and a term representing uncertainty.
In solving the SDE, for an arbitrary initial stock price at time 0, the analytical solution under Ito's interpretation is as follows in equation (4). where: : stock price at time t, 0 : initial stock price at time 0, : drift value, : volatility value, and : any random number from a standard normal distribution.

B. Related Works
Most recent papers showed positive findings in the performance of GBM in predicting stock price. A recent paper by [2] found that conventional statistical model autoregressive integrated moving average (ARIMA) and stochastic model-GBM model have better performance than artificial neural network models. The analysis was on the S&P500 index for short term next day stock price prediction. On the other hand, a study on the forecast accuracy found that Australian companies listed in the S&P/ASX 50 index have low MAPE values in all periods [5]. However, the listed Australian companies have the lowest MAPE value when forecasting stock prices one week, two weeks, and one month. It is noteworthy that as the period progress longer, the error tends to increase.
Similarly, a study by [12] on predicting the stock price of seven Indonesian companies using the GBM method found that the MAPE of a forecasted short-term stock price is less than 20 per cent. At the same time, the MAPE value is not satisfactory for long term stock price forecasting. The findings are consistent with [4] that shows in predicting Apple stock price using the GBM method, which revealed the Mean Square Error (MSE) increases as the estimation sample size increase. On the other hand, findings in [7] that forecast a Malaysian stock using the GBM model and Fuzzy Time Series (FTS) model demonstrated that GBM is less accurate in predicting stock price than FTS. However, GBM does show it has high accuracy in predicting future stock prices. The study indicates that the GBM model is a powerful tool to be used in a trading strategy.
Regarding the related works on the GBM method in forecasting stock price, this research is relevant in comparing the accuracy of the GBM method in predicting the stock price given economic fluctuation. In that sense, the study will compare the accuracy of the GBM forecasting method before and during pandemic Covid-19. This study will use the stock price from Nestle Berhad, one of the largest companies in the food and beverages sector.

III. CONCEPTUAL FRAMEWORK
The general framework of forecasting the future stock price based on Geometric Brownian Motion is demonstrated in Figure 2. This section is structured from data acquisition; next is stationarity stochastic test, geometric Brownian Motion model, and performance evaluation. Firstly, for data acquisition, the daily stock data is obtained from the website, and the software used is Microsoft Excel and Python. Next, for the Geometric Brownian Motion model, the stock return is calculated, drift value and volatility value are generated, and the forecasted stock price is computed as the output for the model. Lastly, the performance is evaluated using Mean Square Error (MSE) and Mean Absolute Percentage Error (MAPE).  There is two software used in the paper to generate stock price by using Geometric Brownian Motion. The software used is Excel and Python. For Excel, the data is downloaded manually from the website. The information is in a CSV file is converted to an XSLX file for easier access to computing the data for simulations. For Python, the data is automatically downloaded and used in the Python Notebook in the IPYNB file.

B. Geometric Brownian Motion model
In this model, the training dataset is the data for the duration of 16 weeks (4 months) from May to August for each of the year 2019 and 2020, while the test dataset is the data for the duration of 4 weeks (1 month) which is the September for each of the year 2019 and 2020. The model is used in both Excel and Python. It is to demonstrate the efficiency of the geometric Brownian Motion model in forecasting stock price. Therefore, the steps as follows below are generated in both Excel and Python.
Following Geometric Brownian Motion, the first step is to calculate the return from the training dataset by using the following stock return equation (5).
where: : stock return at time t, : adjusted close stock price at time t, and −1 : adjusted close stock price at time t-1.
In addition, a density plot of Normalized Return of before and after Covid19 for May to September for the year 2019 and 2020 are charted by using Python. The next step is to generate the drift and volatility value. The drift and volatility values are a constant stock parameter that is used to forecast the stock price. The drift value, μ, also known as the drift coefficient, is defined as the mean of return rate where the asset price increases as time increases. The drift value is calculated by using the following equation (6).
where: : drift value, : stock return at time t, : amount of stock return, and : time steps.
The time step, is the incremental change in time to solve the equation. It is set to equal the approximate number of 1/252, which is a reciprocal of one trading year of 252 trading days.
The volatility value, also known as diffusion coefficient, is defined as the fluctuation of the stock price or decreases. In other words, the volatility value is the sample standard deviation of the stock return with the time step. The drift value is calculated by using the following equation (7).
where: : volatility value, : stock return at time t, ̅ : mean of stock return, : amount of stock return, and : time steps.
The last step is to compute the forecasted stock price based on the Geometric Brownian Motion model using the following equation (8), which is discretised based on equation (4).
where: : forecasted stock price at time t, 0 : initial stock price at time 0, : drift value, : volatility value, and : any random number from the standard normal distribution.
The initial stock price is the final stock price of the training dataset. In Excel, the random number, is generated by using the function "=NORMSINV(RAND())". It computes a random number with a zero-valued mean and one-valued standard deviation. Similarly, in Python, the random number is generated using the function "numpy.random.normal()". Results are remarked then plotted as graphs to be analysed and discussed.

C. Performance Evaluation
In this paper, the test dataset (stock price), which consisted of actual and forecasted stock prices, are evaluated using two performance evaluation indicators which are Mean Absolute Percentage Error (MAPE) and Mean Square Error (MSE). The performance evaluation indicators are calculated by using the following equation (9) and (10).
where: : actual stock price at time t, : forecasted stock price at time t, and : number of stock price data.
In analysing the MAPE and MSE, a low value is preferred because it indicates a good result. For MAPE in particular, it is evaluated based on the judgment scale of forecast accuracy in the table below.   To further the assessment on the mean, variance, and the covariance of the prices is analysed. Figures 3 and 4 below show that the average for data points in May to September of 2019 (circle) and 2020 (triangle) are constant over time. For May to September 2019, the average is around MYR 143, while for May to September 2020, the average value is around MYR 138.60, which implies a decrease in stock price over the year from 2019 to 2020 that is may be due to the pandemic. Meanwhile, the variance and the covariance does not change over time if excluding few outliers. The variance and the covariance are constant at the value of 4 and 1 for the year 2019 and 2020, respectively.

B. Geometric Brownian Motion
Previously, it showed that Nestle Berhad stock prices are stationarity before and after Covid-19. It is significant to note this as the objective is to analyse the efficiency of the GBM model in predicting stock price. Below are the results obtained when the GBM model is simulated by using Excel and Python. Figures 6 and 7, it can be seen the forecasted stock price are volatile compared to the actual stock price. The training dataset used 16 weeks of stock price to predict four weeks of the stock price, as shown in the figures below. The test dataset is evaluated using MSE and MAPE values, and the values are shown in Table 2 below. It can be seen that the MSE and MAPE value increases as the number of weeks of the sample increases. It is also worth noting that the MAPE values are less than 10% which implies it is highly accurate. The lowest MSE value is on one week, which means that short-term prediction is better than the long term.   2) Phython: Figure 8 demonstrates the density plot of the normalised return of Nestle for before and after Covid19. The graph of normalised price return against trading days shows that the normalised return fluctuates at high frequency at zero value for both years of 2019 and 2020. It can be seen to have properties of stationarity. The graph of density against normalised price return demonstrates that normalised return accumulates at high density at zero in particular for year 2019. Compared with the Gaussian distribution, the normalised price return may appear to follow the Gaussian distribution, but it has high peaks.

1) Excel: From
From Figures 9 and 10, we can see a similar trend as presented from the simulation of GBM using Excel that shows the forecasted stock price is volatile compared to the actual stock price. The training dataset used 16 weeks of data to predict four weeks of the stock price, as shown in the figures below. The test dataset is evaluated using MSE and MAPE values, and the values are shown in Table 3 below. It can see that the MSE and MAPE value increases as the number of weeks of the sample increases. It is also worth noting that the MAPE values are less than 10% which implies it is highly accurate. The lowest MSE value is on one week period, which means that short term prediction is better than the long term.

V. CONCLUSION AND FUTURE RECOMMENDATION
The main objective of this paper is to analyse the efficiency of the geometric Brownian Motion (GBM) model in predicting the stock price of Nestle before and during Pandemic Covid 19. The analysis has been done by evaluating the performance evaluation indicators of the company. The daily stock data are from May to September of the year 2019 and 2020. To analyse the stocks, two software is used to demonstrates the GBM model, namely Microsoft Excel and Python.
For simulating the Geometric Brownian Motion model, the model is trained for 16 weeks (4 months) of data from May to August of the year 2019 and 2020. The simulated sample is for four weeks (1 month) which is for September 2019 and 2020. The steps for GBM is as follows: the stock return is calculated, drift value and volatility value are generated, and the forecasted stock price is computed as the output for the model. Lastly, the performance is evaluated by using Mean Square Error (MSE) and Mean Absolute Percentage Error (MAPE). The finding shows that the performance of short-term prediction by using GBM are better than long term prediction. This can be proven as the lowest Mean Square Error (MSE) value is at one week period followed by second week period and so on. The Mean Absolute Percentage Error (MAPE) for all GBM simulations is highly accurate as it shows that MAPE values are less than 10%. Hence, this paper suggests that GBM can be used to predict Nestle stock price during economic fluctuation since the forecasted value before and during the pandemic Covid 19 are accurate. This indicates that Nestle stock price behaviour does not change during the economic downturn. However, it points to ponder that Nestle is the least affected company during pandemic Covid-19 since the company produces essential products. Hence, for comparison purposes, this study suggests that analysis needs to be done on another company that is most affected during the pandemic Covid 19, such as hotel and tourism. In addition, it is best to increase the number of stock data because it will improve the performance of the model. Lastly, it is recommended to do more models for comparison of different tools used in trading strategy so that the finding would be more consistent.