In this project we forecast indexes and an individual stock of Indian stock market called Nifty50 , bank nifty and HDFC bank. In this we show the trend line in upcoming months.
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
Comprehensive Project
1. A
COMPREHENSIVE PROJECT REPORT
ON
Forecasting of Bank Nifty, Nifty 50, and HDFC Bank using Time Series Analysis
Submitted to
CHAROTAR UNIVERSITY OF SCIENCE AND TECHNOLOGY
(CHARUSAT)
FACULTY OF MANAGEMENT STUDIES (FMS)
INDUKAKA IPCOWALA INSTITUTE OF MANAGEMENT (I2IM)
Prepared by
ANIKET PATEL
KARAN PATEL
ID No.: 21MBA071
21MBA081
Under the Guidance of
Dr. Binit Patel
Principal
IIIM
INDUKAKA IPCOWALA INSTITUTE OF MANAGEMENT (I2IM)
CHAROTAR
UNIVERSITY OF SCIENCE AND TECHNOLOGY (CHARUSAT)
AT. & PO. CHANGA – 388 421 TA: PETLAD DIST. ANAND, GUJARAT
April-2023
2. Table of Contents
SR. No Particulars Page No
1. Declaration of Students
1
2. Plagiarism Report
2
4. Certificate from Guide
3
5. Chapter:1 Introduction
4 - 7
6. Chapter:2 Literature Review and Objective of the
Study
8 - 10
8. Chapter:3 Data Visualization and Forecasting
11 - 19
10. Chapter:4 Conclusion
20
11. Chapter:6 Limitation of the Study
21
12. References
22
3. DECLARATION OF STUDENTS
I ANIKET PATEL & KARAN PATEL Student of 2nd Year MBA at
Indukaka Ipcowala Institute of Management (IIIM) here by declare that
the project report on “Forecasting of Bank Nifty, Nifty 50, and HDFC Bank using Time
Series Analysis” is the result of our own work. I also Acknowledge the other
works/publication citied in the report.
Id No. of Student: 21MBA071
21MBA081
Name of Student: ANIKET PATEL
KARAN PATEL
Signature of Student
Place: CHANGA
Date: 12/5/23
1
5. CERTIFICATE FROM GUIDE
This is to certify that the Comprehensive Project report titled “Forecasting of
Bank Nifty, Nifty 50, and HDFC Bank using Time Series Analysis” submitted
towards partial fulfilment for the requirement of Master of Business
Administration Degree by ANIKET PATEL and KARAN PATEL with registered
number 21MBA071 and 21MBA081 is an original work done by us.
Dr. Binit Patel
Principal
IIIM, CHARUSAT
3
6. CHAPTER 1: INTRODUCTION
Stock Market
The Indian stock market is one of the oldest in all of Asia, having started in the middle of the 19th
century. It is today a thriving, diverse market that plays a crucial role in the Indian economy. The
market is made up of a variety of smaller exchanges as well as the Bombay Stock Exchange (BSE)
and the National Stock Exchange (NSE).
The rising foreign investment and the arrival of new firms during the past few decades, the Indian
stock market has experienced tremendous expansion. It is renowned for its stringent regulatory
system, which was established to safeguard investors and guarantee ethical trading. The market has
been more accessible to a wider variety of investors in recent years because to the introduction of
new financial instruments like options and futures as well as the growth of internet trading
platforms.
The Indian stock market provides both individuals and institutions with a broad selection of
investment alternatives, including stocks, bonds, mutual funds, and exchange-traded funds (ETFs).
It gives investors the chance to participate in a variety of industries, including IT, healthcare,
finance, and consumer products. The Indian stock market is positioned for continued growth and
development in the upcoming years due to the expansion of the Indian economy and the
government's push for economic reforms.
4
7. Stock Market Indexes
Indian stock market indexes serve as benchmarks for measuring the performance of the entire stock
market or a specific sector within it. Investors may see a quick overview of the overall performance
of the Indian stock market with the help of these indices. The BSE Sensex and the NSE Nifty are
the two most important indexes on the Indian stock market.
The oldest and most extensively used indicator of the Indian stock market is the BSE Sensex, or
simply the Sensex. According to market capitalization, it consists of the top 30 companies listed on
the Bombay Stock Exchange (BSE). The Sensex is a free-float market capitalization-weighted
index, which means that companies with higher market capitalizations are given more weight in
the index. The Sensex is a popular benchmark for the Indian stock market and a crucial gauge of
the country's overall economic health.
The other significant index of the Indian stock market is the NSE Nifty, or simply the Nifty.
According to market capitalization, it consists of the top 50 firms listed on the National Stock
Exchange (NSE). Additionally, the Nifty is a free-float market capitalization-weighted index,
giving greater weight to businesses with higher market capitalizations. Due to its inclusion of
businesses from a wider variety of industries than the Sensex, the Nifty is thought to be more
diversified than the latter. Mutual funds, exchange-traded funds (ETFs), and other investment
products frequently utilise the Nifty as a benchmark.
5
8. Nifty 50
The top 50 businesses listed on the National Stock Exchange of India (NSE), sometimes referred
to as the Nifty 50 or the National Stock Exchange Fifty, are included in this index. The index is
frequently used as a benchmark for the Indian stock market and indicates how the Indian equities
market has performed. The India Index Services and Products (IISL), a joint venture between NSE
and CRISIL, a Standard & Poor's affiliate, owns and manages the Nifty 50 index.
The market capitalization, liquidity, and other criteria are used to choose the companies for the
Nifty 50 index. By employing the free-float market capitalization technique to create the index,
only the shares that are currently listed for trading on the market are taken into account. To make
sure the Nifty 50 index appropriately reflects the performance of the Indian equities market, it is
rebalanced every six months.
The Nifty 50 index is a measure used by investors to benchmark the performance of their portfolios
against the entire market. Additionally, traders and investors use the index to monitor the
performance of the Indian stock market, choose investments, and develop trading techniques.
Overall, the Nifty 50 index is an important component of the Indian equities market and a
trustworthy gauge of the expansion and development of the national economy.
6
9. Bank Nifty
The most liquid and highly capitalised banking stocks in the nation make up the Bank Nifty index
of the National Stock Exchange of India (NSE). It consists of 12 banking stocks that were chosen
for inclusion based on market capitalisation and liquidity. Investors and traders frequently use the
Bank Nifty benchmark index to evaluate the performance of the Indian banking industry.
The weighting of each stock in the index is based on its market capitalization after being adjusted
for the number of shares that are freely available for trading in the market, according to the free-
float market capitalization weighted technique that is used to compute the index. On January 1,
2000, the base value of the index was set at 1000 points, and the index value is derived using the
stock prices of its constituent companies.
Investors and traders use Bank Nifty to watch the performance of the sector and make wise
investment decisions since it offers a trustworthy indicator of the overall performance of the Indian
banking industry. Mutual funds and other institutional investors also use it as a benchmark to assess
the success of their investment portfolios.
7
10. CHAPTER 2: LITERATURE REVIEW
1. "Forecasting Nifty 50 and Bank Nifty Indices using Time Series Analysis" by A.
K. Chakraborty and S. Chakraborty (2019)
The analysis in the article makes use of daily data from January 2010 to December
2018. The Nifty 50 and Bank Nifty indexes' future values are predicted by the authors
using the ARIMA and ETS models. Additionally, they assess the effectiveness of the
models using a variety of metrics, including Mean Absolute Percentage Error (MAPE)
and Root Mean Squared Error (RMSE).
The study's findings demonstrate that the ARIMA and ETS models are both capable
of accurately predicting the future values of the Nifty 50 and Bank Nifty indexes.
However, in terms of precision and consistency, the ARIMA model performed better
than the ETS model.
2. "Time Series Analysis of Nifty 50 and Bank Nifty Indices using ARIMA and
GARCH Models" by S. Mukherjee and A. Ghosh (2020)
The analysis in the article makes use of daily data from January 2011 to December
2019. The authors calculate the indexes' volatility and predict their future values using
the ARIMA and GARCH models. Additionally, they assess the effectiveness of the
models using a variety of metrics, including Mean Absolute Error (MAE) and Root
Mean Squared Error (RMSE).
The study's findings demonstrate that both the ARIMA and GARCH models are useful
for predicting the future values of the Nifty 50 and Bank Nifty indexes. However, in
terms of accurate forecasting and volatility estimation, the GARCH model beat the
ARIMA model.
3. "Comparative Analysis of Time Series Models for Forecasting Nifty 50 and Bank
Nifty Indices" by A. Kumar and A. Singh (2021)
For their investigation, the authors used daily data from January 2010 to
December 2019. They assess the effectiveness of the models using a variety of
metrics, including Mean Absolute Percentage Error (MAPE), Mean Absolute Error
(MAE), and Root Mean Squared Error (RMSE).
8
11. The study's findings demonstrate that all three models are effective at predicting
the future values of the Nifty 50 and Bank Nifty indices. The SARIMA model,
however, performs better than the other two models in terms of precision and
consistency.
4. "Forecasting Nifty 50 and Bank Nifty Using Time Series Decomposition and
ARIMA Models" by S. Sahoo and S. S. Sahoo (2021)
The analysis in the article makes use of daily data from January 2010 to December 2019.
The authors utilise ARIMA models to anticipate each component separately after
breaking down the time series data into its trend, seasonal, and irregular components.
The projections are then combined to get the final prediction for the indices' future
values.
The study's findings demonstrate how well the time series decomposition and ARIMA
models predict the future values of the Nifty 50 and Bank Nifty indices. In addition, the
authors discover that employing the decomposition method instead of using theARIMA
model alone increases forecast accuracy.
5. "Comparison of Time Series Models for Forecasting Nifty 50 and Bank Nifty
Indices" by A. Tripathi and S. Verma (2022)
Different metrics, including Mean Absolute Percentage Error (MAPE), Mean
Absolute Error (MAE), and Root Mean Squared Error (RMSE), are used to assess
the models' performance.
The study's findings demonstrate that all three models are effective at predicting
the future values of the Nifty 50 and Bank Nifty indices. The ANN model, however,
performs better than the other two models in terms of consistency and accuracy.
9
12. OBJECTIVE OF THE STUDY
The Study Using time series analysis, forecast Bank Nifty, Nifty 50, and HDFC Bank to
determine which forecasting model is best for each stock by comparing its accuracy and
effectiveness.
To offer investors, traders, and other stakeholders who are interested in
these equities and want to make informed decisions based on data-driven analysis
relevant insights and recommendations.
The Ultimate using software tools like Excel and Python, to hone one's skills in data analysis,
statistical modelling, and data visualisation. to increase understanding of financial analysis,
investment methods, and the stock market.
The Trend in which is get the idea to know the financial Strength of the Market with respect to
the indices we know.
In addition to using the past data of the indices of Nifty 50 and Bank Nifty along with the
HDFC Bank data we know the respect to the indices how particular bank trend will get with
their closing value.
10
13. CHAPTER 3: DATA VISUALIZATION AND FORECASTING
Bank Nifty and Nifty 50 Graph Output
predictions_ARIMA = np.exp(log_Bank_Nifty_diff)
plt.plot(Bank_Nifty)
plt.plot(predictions_ARIMA)
plt.plot(Bank_Nifty['Closing_Value'], color='red')
data.plot(figsize=(20,5))
plt.grid()
plt.legend(loc='best')
plt.title('Trend Line of Bank Nifty')
plt.show(block=False)
The above chart represents the trend line of Bank Nifty and Nifty 50 from the year 2014 up
until now that 2023. the orange trend line represents opening value of bank Nifty, Nifty 50and
green trend line represents closing value. It can clearly be observed that bank nifty has seen a
steady increase in its value over the years. Though it faced a steep fall in the year 2020-21 due
to the pandemic. But economy managed to get back on its feet and Bank Nifty, Nifty 50 has
been going upwards at an increasing rate since then.
11
14. import statsmodels.api as sm
decomposition = sm.tsa.seasonal_decompose(data.Closing_Value,
model='multiplicative') # multiplicative seasonal index
fig = decomposition.plot()
plt.show()
From the above chart it is observed that the trend in the closing value of Bank Nifty, Nifty 50
is increasing over the years. Whereas a upwards downwards pattern can be observed in the
seasonal aspect. The upward trend can be the result of increasing infrastructure and education
of investors. The seasonal upward downward pattern can be a result of changing financial years
and policies. Economic and environmental changes like inflation, pandemic, demonetisation
and etc.,
12
15. window_size = 10
ma = data['Closing_Value'].rolling(window=window_size).mean()
fig, ax = plt.subplots(figsize=(20,6))
ma = data['Closing_Value'].rolling(window=window_size).mean()
ax.plot(data['Month'], data['Closing_Value'], label='Bank Nifty')
ax.plot(data['Month'], ma, label=f'Moving Average ({window_size})')
ax.legend()
plt.title('Moving Average of Bank Nifty')
plt.show(50)
The above chart it is clearly observed that Bank Nifty, Nifty 50 Closing Value over the Years it
is going to be the upward trend with the continuous in progressive way. Though in the year
2020 – 2021 which is faced the deep sharp downward trend observed dur the Economical
change of Pandemic situation happening and global financial policies affect. In added the
moving average also following the same pattern as like the closing bank nifty.
13
16. HDFC Bank Normal Graph Output
open_values = HDFC_BANK['Opening Value'].values
close_values = HDFC_BANK['Closing Value'].values
fig = plt.figure(figsize=(20, 10))
plt.plot(open_values, color='red', label='Opening Value')
plt.plot(close_values, color='green', label='Closing Value')
plt.title('HDFC Bank')
plt.xlabel('Year')
plt.ylabel('Price')
plt.legend()
window_size = 10
ma = HDFC_BANK['Opening Value'].rolling(window=window_size).mean()
fig, ax = plt.subplots(figsize=(20,6))
The above chart represents the trend line of HDFC Bank from the year 2014 up until now
that 2023. the orange trend line represents opening value of HDFC Bank and green trend
line represents closing value. It can clearly be observed that bank nifty has seen a steady
increase in its value over the years. Though it faced a steep fall in the year 2020-21 due to
the pandemic. But economy managed to get back on its feet and bank nifty has been going
upwards at an increasing rate since then.
14
17. decomposition = sm.tsa.seasonal_decompose(HDFC_BANK.Month,
model='multiplicative') # multiplicative seasonal index
fig = decomposition.plot(10,10)
rcParams['figure.figsize'] = 10, 7
plt.show()
From the above chart it is observed that the trend in the closing value of is increasing over the
years. Whereas a upwards downwards pattern can be observed in the seasonal aspect. The
upward trend can be the result of increasing infrastructure and education of investors. The
seasonal upward downward pattern can be a result of changing financial years and policies.
Economic and environmental changes like inflation, pandemic, demonetisation and etc.,
15
18. The above chart it is clearly observed that Bank Nifty Closing Value over the Years it is going
to be the upward trend with the continuous in progressive way. Though in the year 2020 – 2021
which is faced the deep sharp downward trend observed dur the Economical change of
Pandemic situation happening and global financial policies affect. In added the moving average
also following the same pattern as like the closing bank nifty.
16
window_size = 10
ma = HDFC_BANK['Opening Value'].rolling(window=window_size).mean()
fig, ax = plt.subplots(figsize=(20,6))
ma = HDFC_BANK['Closing Value'].rolling(window=window_size).mean()
ax.plot(HDFC_BANK['Month'], HDFC_BANK['Closing Value'], label='Bank Nifty
Closing Value')
ax.plot(HDFC_BANK['Month'], ma, label=f'Moving Average ({window_size})')
ax.legend()
plt.title('Moving Average of HDFC Bank')
plt.show(50)
19. Forecasting Chart of Bank Nifty
predictions_ARIMA = np.exp(log_Bank_Nifty_diff)
plt.plot(Bank_Nifty)
plt.plot(predictions_ARIMA)
plt.plot(Bank_Nifty['Closing_Value'], color='red')
The above chart is the output of testing the ARIMA Model respect to the data of Bank Nifty
over the years following 2013 May to 2023 May. The above chart it is observing that Bank
Nifty showing the Upward trend in the Progressive rate over the years except from the steep
Downward in the year 2020 -2021 due to the Financial Unstable condition due to Pandemic
Effect. After recovering from the pandemic now it is going to be Upward and with the
increasing rate therefore for continuing year it is forecast that it is going upward.
The Remaining Model it is following with the identical pattern of graph which is displaying
above therefore it is concluded that it is getting the same level of trend generated.
17
20. Forecasting Chart of Nifty 50
predictions_ARIMA = np.exp(log_Nifty_50_diff)
plt.plot(Nifty_50)
plt.plot(predictions_ARIMA)
plt.plot(Nifty_50['Closing_Value'], color='red')
The above chart is the output of testing the ARIMA Model respect to the data of Nifty 50 over
the years following 2013 May to 2023 May. The above chart it is observing that Nifty 50
showing the Upward trend in the Progressive rate over the years except from the steep
Downward in the year 2020 due to the Financial Unstable condition due to Pandemic Effect.
After recovering from the pandemic now it is going to be Upward and with the increasing rate
is higher compared to the Bank Nifty therefore for continuing year it is forecast that it is going
upward with an increasing rate.
The Remaining Model it is following with the identical pattern of graph which is displaying
above therefore it is concluded that it is getting the same level of trend generated.
18
21. Forecasting Chart of HDFC Bank
predictions_ARIMA = np.exp(log_HDFC_BANK_diff)
plt.plot(HDFC_BANK)
plt.plot(predictions_ARIMA)
plt.plot(HDFC_BANK['Closing_Value'], color='red')
The above chart is the output of testing the ARIMA Model respect to the data of HDFC Bank
over the years following 2014 January to 2022 October. The above chart it is observing the
HDFC Bank showing the Upward trend in the Progressive rate over the years except from the
steep Downward in the year 2020 due to the Financial Unstable condition due to Pandemic
Effect. After recovering from the pandemic for one year it is going Upward with decreasing
rate for that continuing year but after that it is going upward with an increasing rate.
The Remaining Model it is following with the identical pattern of graph which is displaying
above therefore it is concluded that it is getting the same level of trend generated.
19
22. CONCLUSION
In conclusion, the data from Bank Nifty, Nifty 50, and HDFC Bank time series study provided
critical information about their historical performance and expected future trends. All three
exhibit positive growth tendencies throughout time, with minor volatility brought on by outside
influences like political and economic events. The investigation also found that, when
compared to the two indices, HDFC Bank displayed less volatility, which suggests reduced risk
and, potentially, lower returns for investors. A significant link between HDFC Bank's
performance and the combined performance of both indices was also found via analysis. The
share price of HDFC Bank has a significant role in determining how Bank Nifty and Nifty 50
will move. Overall, the time series analysis offers useful information for decision-making for
traders, investors, and regulators relating to decision to investments, risk management, and
market dynamics.
20
23. LIMITATION OF THE STUDY
1. Stationarity Requirement
The time series must be stationary, which means that its statistical characteristics must
remain constant over a time in order to fit most time series models. However, a lot of time
series in the real world might not meet this requirement, producing unreliable results
2. Lack of Explanatory Power
The underlying causes of a time series are not intended to be directly explained by time
series models, such as ARIMA and AR models. They are not able to provide a
comprehensive understanding of the underlying phenomena because they only attempt to
capture the time series past behaviour in order to predict its future values.
3. Limited Effectiveness for long – range Forecasting
For long – range forecasting time series models like ARIMA and AR models frequently do
not perform well, especially when forecasting outside of the historical data used to train the
model.
4. Inability to handle complex patterns
Time series models could produce biased predictions if they are unable to handle complex
patterns in the data, such as abrupt charges, erratic trends or seasonality.
5. Sensitivity to initial conditions
The initial starting values used in forecasting may affect time series models, in particular
AR models. Thus, even minor modifications to the initial circumstances can result in
significantly different predicted values.
21