1. Introduction
The stock market behavior and its pattern have remained a mystery for mathematicians and scientists for decades. However, there has been a significant amount of successful studies for developing models for short-term prediction in the stock market (see the works of
Gottschlich and Hinz (
2014);
Liao et al. (
2012) and the references therein).
Altay and Satman (
2005) used an artificial neural network and linear regression for stock market forecasting. An interesting survey of stock market prediction was carried out by
Atsalakis and Valavanis (
2009), and
Baralis et al. (
2017) developed stock portfolios with the help of weighted frequent item sets.
Almost after a year, when the pandemic seemed to be in control, the economy started to get back on track. However, then, the second wave of COVID-19 hit and cast a cloud of uncertainty on the stock markets. In such a situation, the investors and retailers are very fearful and confused as to when and where to invest their funds. It therefore becomes very important and essential to develop some mathematical model, which can address these investment queries during a global crisis. The objective is to prepare for the worst case scenario and still stay invested and procure capital gains.
In this paper, we develop a portfolio consisting of five sectors, including pharmaceuticals, petroleum, bank, software (IT) and metal.
This research will help new as well as seasoned investors to manage their own portfolio and generate better returns than mutual funds. Roughly around only 4.5% of the population of India invests directly in the stock market as compared to 54% in the U.S.A. and 10% in China, as of 2020. Such low retail investment in India is partly because of the lack of financial awareness and partly because of the deep risk that stock market investment involves. Our aim is to build a sustainable portfolio consisting of fundamentally strong sectors and companies, which perform well, even in toughest time and minimize the risk of financial loss. At the same time, the retailers can limit their dependence on mutual funds.
2. Methodology
We develop our model based on data from 1 January 2020 to 31 December 2020. We predict and compare our experimental results with popular mutual funds in the period of 1 January 2021 to 21 May 2021. The main reason for selecting such periods is to study the effect and impact of COVID-19 on stock market behavior and to create a portfolio that can encounter such global hazards and sustain in normal situations as well. In India, the first wave of COVID-19 hit the country in the month of January 2020 and started to decline by the end of the year. Hence, this period is considered to generate our initial data set. The second wave hit in the month of January 2021, reached its peak in April–May 2021 and started to decline at the end of May 2021. Thus, we use the period January–May 2021 for evaluation and comparison.
First, we find a curve of best fit for each of the companies by the method of least squares, using the data from 1 January 2020 to 31 December 2020. With the help of this best-fit curve, we predict the stock price closing value at the end of our evaluation and comparison period to justify the validity of our model. However, this prediction is crude, as we do not apply error estimation or correction.
Next, we cluster the top 4 companies within each sector with a positive growth rate in the specified period for diversified fund allocation. We cannot simply allocate all the funds to the top performing company or equally among all the companies. Hence, a mathematical formulation for the allocation is proposed.
Next, the growth rate of each company is calculated. Weights are set for the previous period stock prices. Further, the mean growth rates of the companies are calculated and then the net growth rate of all the sectors are obtained. The idea is to allocate a larger amount of funds to a sector with high growth and a lesser amount to the sectors next to it in terms of growth.
Given below is the step-by-step formulation of our methodology:
Cluster sector wise:
- (i)
Cluster list companies into different industry sectors manually.
- (ii)
Associate each company to the sector to which it belongs.
Company growth estimate:
- (i)
Find the estimated growth rate of the company using historical data.
- (ii)
Rank all companies with a positive growth rate.
- (iii)
For each sector, consider the top 4 companies.
Sector growth estimate:
- (i)
Find the mean growth rate of the top 4 companies in the sector.
- (ii)
Rank all sectors with a positive growth rate.
- (iii)
Top 5 sectors are considered for fund allocation.
Fund allocation:
- (i)
Fund is allocated among the selected top 5 sectors, proportional to their average growth rate.
- (ii)
Each sector-wise fund is again divided among companies, proportional to their growth rate.
3. Algorithm for Diversified Fund Allocation across Sectors and Companies
In the proposed methodology, the prediction of the current stock price is done on the basis of data from previous
s months (in our case,
). The month-wise weight (
) is used for predicting the stock price. It is to be mentioned that the weighting scheme uses linearly decreasing weights; the highest weight belongs to the last observation, the one preceding the value to be forecast. Then,
with the smallest weight is the oldest observation. For the
i-th month, it is calculated as follows:
The top performing sectors are identified by analyzing the results of these sectors from NSE web portal in the specified period. Top performing and fundamentally strong companies are then selected within each sector in a similar manner so that all companies are listed in the NIFTY 50 index during this period. All historical data of the stock prices were collected from the NSE (web portal:
www.nseindia.com (accessed on 22 May 2021)).
We now present below the algorithm, step by step.
- Step 1
Prediction of stock closing prices.
- (a)
Identifying the curve of best fit.
- (i)
Collect the historical data of stock closing prices of a company for the specified period of 12 months. This is the initial data set for our model.
- (ii)
Find the curve of best fit using the method of least squares for the collected 12 month data.
- (iii)
The curve of best fit is chosen for which the root mean square error (RMSE) is minimal.
- (iv)
Predict the stock closing price for the end of the comparison period (i.e., when we would be interested in withdrawing the fund—in this case, after 5 months) as decided in the model.
- (v)
Repeat steps (i)–(iv) for each of the selected companies.
- Step 2
Selection of companies within sectors.
- (a)
Choose a company from a particular sector.
- (b)
Find the percentages of the growth rate of the company of different time periods with respect to the month immediately prior. Suppose the growth rate between the i-th previous month and (i−1)-th previous month is , where . Thus, is the growth rate of the (i−1)-th time period with respect to the month immediately prior. Suppose that the growth rates of a company are for the selected period of 12 months.
- (c)
Calculate company net growth rate (CNGR) by the following formula:
, where to m (for m number of companies within each sector).
- (d)
Repeat steps (a)–(c) for each company within the sector.
- (e)
Consider only the companies having a positive growth rate and discard the ones with a negative growth rate.
- (f)
Calculate the net growth rate of a particular sector by finding the mean of the growth rates of the companies within the sector.
- (g)
Repeat all the steps of step 2 for each sector.
- Step 3
Allocation of funds.
- (a)
Sector-wise.
- (i)
Find the sector multiplying factor (SMF) as follows:
, where is the growth rate of sector , and n is the number of sectors (here ).
- (ii)
Find the sector-wise fund to be invested by the mathematical formula given by , where denotes sector-wise % allocation. Thus, the sector-wise allocation is given by , where F denotes the total fund.
- (iii)
Repeat steps (i)–(ii) for all the selected sectors.
- (b)
Company-wise: let each sector consist of m number of companies with growth rates of respectively.
- (i)
Determine the company multiplying factor (CMF) by the formula
.
- (ii)
Find the company-wise fund allocation by the formula for company , where denotes company-wise allocation %. Thus, company-wise allocation is given by .
- (iii)
Repeat step (ii) for all the companies.
4. Results and Discussion
In our experiment, we have collected the historical data of closing stock prices for 20 companies from 5 different sectors (4 companies from each sector). These data were collected from NSE for each of the 20 companies between 1 January 2020 and 31 December 2020. Similar data from 1 January 2021 to 21 May 2021 were used for validation, evaluation and comparison of the proposed portfolio with the performance of other popular mutual funds.
In this research, the currency unit is Indian rupees (INR). For simplified calculations, we have considered our total fund as F = INR 100,000. Such a fund will be useful for a new retail investor. Additionally, for a large fund, suitable scaling of this amount can be very easily done.
In our experiment, first we perform regression on every company’s closing stock price from our initial data set and select the curve of best fit.
As an example, in
Figure 1, we show the different trend lines fitted with the closing stock prices of Dr. Reddy’s Lab (Pharma sector).
The equation of the fitted trend line, R-squared error, RMS Error were calculated and are presented in
Table 1. The same process was carried out for all the 20 companies, but for the sake of brevity, we display only one.
Our initial data are based on the closing stock price of all the selected companies from 1 January 2020 to 31 December 2020, which comprises a total of 252 working days in the Indian stock market. Further, our evaluation and comparison period for the experiment is from 1 January 2021 to 21 May 2021, which comprises 94 days. Thus, we find our predicted stock price for the 346th day (252 + 92 = 346) using regression. The best fit curve for each company along with its CNGR and predicted stock price are listed in
Table 2.
Next, we perform the allocation of funds into multiple sectors by taking the mean of CNGR computed in
Table 2 for each sector. This allocation is presented in
Table 3.
In
Table 4, we provide the allocation of funds to each company based on their expected returns.
We assume that the allocated funds remain invested throughout the period from 1 January 2021 to 21 May 2021.
We further assume that no stocks were bought or sold during this entire period.
In
Table 5, we present the absolute percentage return from each company, which in turn gives us the absolute percentage return from each sector. This table is used for our evaluation and further comparison of performance with popular mutual funds.
5. Conclusions
In conclusion, we compared, quantitatively, the performance of our proposed portfolio with some popular mutual funds that have rendered high returns over the years (presented in
Table 6 and
Figure 2). The performance data of the mutual funds in the said period were collected from their respective web portals. The absolute percentage return by our proposed portfolio was found to be
, which is the average of the ‘average sector absolute % return’ as given in
Table 5.
We can observe that our proposed portfolio performs quite well during the global pandemic and gives much higher returns as compared to many in-demand mutual funds.
The fact that this research does not cover a longer time frame, such as 3 or 5 years, and the performance is evaluated and compared for only 5 months of investment may be contemplated as a limitation. However, our main idea is that, if this model can sustain in this current global pandemic situation, it has a very high plausibility of sustaining when normalcy is restored. Our experimental results indicate that the proposed portfolio generates higher returns than most of the well-established mutual funds. Although this research was carried out in the context of the Indian stock market, such a sector-wise model and methodology is likely to be compatible with the global market as well since stock markets around the world behaved quite uniformly during this pandemic.
Finally, we can conclude that a well-researched and scientifically generated portfolio is capable of surviving the global pandemic situation and provide better returns, even though the market is very sensitive. It is to be noted that the return could further be maximized by the expert investors if they sold certain shares in their peaks and bought the same at dips. In our experiment, we avoided such practices for simplicity. All the details of the calculation are submitted as supplementary materials. Additionally, it is to be noted that in our proposed portfolio, we did not include any company which deals in alcohol or tobacco products. It is observed that the second wave of COVID-19 was not as damaging as the first wave, as the countries were better prepared this time to counter the situation. It will be a very interesting future study to extend this research further by covering a longer time frame to measure the impact of the expected third wave of COVID-19 and also validate this portfolio when normalcy is restored.