Scinovex

Research article · 2018 · Full text

International Journal of Statistics and Applied Mathematics

Stock market prediction using time series analysis

N ViswamG Satyanarayana Reddy

Volume 3(1) · Pages 465–469

Research areasStock Market Forecasting MethodsTime Series Analysis and ForecastingForecasting Techniques and Applications

↓ Read full-text PDF24 citations

Abstract

Author-written

Stock market is a market that enables seamless exchange of buying and selling of company stocks. Every Stock Exchange has their own Stock Index value. Index is the average value that is calculated by combining several stocks. This helps in representing the entire stock market and predicting the market’s movement over time. The Equity market can have a profound impact on people and the country’s economy as a whole. Therefore, predicting the stock trends in an effective manner can minimize the risk of investing and maximize profit. In our paper, we are using the Time Series Forecasting methodology for predicting and visualizing the predictions. Our focus for prediction will be based on the technical analysis using historic data and ARIMA Model. Autoregressive Integrated Moving Average (ARIMA) model has been used extensively in the field of finance and economics as it is known to be robust, efficient and has a strong potential for short-term share market prediction.

Summary

Source-checked

Plain-language reading of the full paper, prepared with AI and checked against the text. Each point links to the authors' own words.

  1. Why it matters

    • Predicting stock market trends is important because the equity market significantly impacts individuals and the national economy, and effective forecasting can reduce investment risk while increasing profit. View evidence ↗

      Why it matters

      Predicting stock market trends is important because the equity market significantly impacts individuals and the national economy, and effective forecasting can reduce investment risk while increasing profit.

      In the paper's own words

      “The Equity market can have a profound impact on people and the country’s economy as a whole. Therefore, predicting the stock trends in an effective manner can minimize the risk of investing and maximize profit.”

      Page 1

      Found in: Introduction

      Read it in the full textOpen PDF at page 1 ↗
    • Forecasting stock trends is considered one of the most challenging tasks in finance due to the intricate nature of the stock market. View evidence ↗

      Why it matters

      Forecasting stock trends is considered one of the most challenging tasks in finance due to the intricate nature of the stock market.

      In the paper's own words

      “Stock trend forecasting is one of the most difficult tasks to achieve in finance market because of the difficulty in the highly intricate world of stock market.”

      Page 1

      Found in: Introduction

      Read it in the full textOpen PDF at page 1 ↗
    • The ARIMA model is widely used in finance and economics because it is robust, efficient, and effective for short-term share market predictions. View evidence ↗

      Why it matters

      The ARIMA model is widely used in finance and economics because it is robust, efficient, and effective for short-term share market predictions.

      In the paper's own words

      “Autoregressive Integrated Moving Average (ARIMA) model has been used extensively in the field of finance and economics as it is known to be robust, efficient and has a strong potential for short-term share market prediction.”

      Page 1

      Found in: Introduction

      Read it in the full textOpen PDF at page 1 ↗
  2. The question

    • The study aims to evaluate the accuracy of forecasting stock values across various sectors to help new investors make informed investment decisions. View evidence ↗

      The question

      The study aims to evaluate the accuracy of forecasting stock values across various sectors to help new investors make informed investment decisions.

      In the paper's own words

      “In this paper, we have mainly focused on the amount of accuracy of forecasting stock values for various sectors which will aid new investors understand the market and make a wise decision to invest in the stock market.”

      Page 1

      Found in: Introduction

      Read it in the full textOpen PDF at page 1 ↗
  3. What they did

    • The researchers used technical analysis based on historical data and the ARIMA model for their predictions. View evidence ↗

      What they did

      The researchers used technical analysis based on historical data and the ARIMA model for their predictions.

      In the paper's own words

      “Our focus for prediction will be based on the technical analysis using historic data and ARIMA Model.”

      Page 1

      Found in: Introduction

      Read it in the full textOpen PDF at page 1 ↗
    • The study utilized the R programming language and R-Studio environment to implement the ARIMA model. View evidence ↗

      What they did

      The study utilized the R programming language and R-Studio environment to implement the ARIMA model.

      In the paper's own words

      “R is a programming language and environment for statistical processing and graphics. ... R-Studio is a free and powerful integrated development environment for R language which allows the user to implement ARIMA model.”

      Page 1

      Found in: Introduction

      Read it in the full textOpen PDF at page 1 ↗
    • The QuantMod package in R was used to retrieve stock data, specifically for Apple (AAPL), for the period from 2016-01-01 to 2017-01-01. View evidence ↗

      What they did

      The QuantMod package in R was used to retrieve stock data, specifically for Apple (AAPL), for the period from 2016-01-01 to 2017-01-01.

      In the paper's own words

      “install. packages (quantmod’) ... library (“quantmod”) ... get Symbols (“AAPL”) AAPL For retrieving data of a particular period Get Symbols (“AAPL”, from=2016-01-01”, to=”2017-01-01”)”

      Page 2

      Found in: Forecasting using stl()

      Read it in the full textOpen PDF at page 2 ↗
    • The analysis used closing prices from October 2015 to October 2017, converted into a time series using the ts() function. View evidence ↗

      What they did

      The analysis used closing prices from October 2015 to October 2017, converted into a time series using the ts() function.

      In the paper's own words

      “In our data the closing prices are listed in the 5th column, we use the ts() function to create time series. We have taken data from October 2015 to October 2017.”

      Page 4

      Found in: Creating a time series function

      Read it in the full textOpen PDF at page 4 ↗
    • The forecast package was used to predict stock prices for the next 2 years (h=24) using the ARIMA model with a 95% confidence level. View evidence ↗

      What they did

      The forecast package was used to predict stock prices for the next 2 years (h=24) using the ARIMA model with a 95% confidence level.

      In the paper's own words

      “We use the forecast package to predict the stock price over the next 2 years. Prediction method=ARIMA Model h=24 (Predict 2 years into the future) level =95 (95% confidence level)”

      Page 4

      Found in: Forecasting using stl()

      Read it in the full textOpen PDF at page 4 ↗
  4. What they found

    • Referencing prior research, the authors note that the ARIMA model has achieved over 85% accuracy in predicting stock prices for various Indian stock sectors. View evidence ↗

      What they found

      Referencing prior research, the authors note that the ARIMA model has achieved over 85% accuracy in predicting stock prices for various Indian stock sectors.

      In the paper's own words

      “The authors [Prapanna Mondal] [Labani Shit] [Saptarsi Goswami] [6] have conducted a study to predict amount of accuracy for various sectors of Indian stocks using ARIMA model. As a result it has been found that accuracy of in predicting stock prices using ARIMA model is above 85%.”

      Page 2

      Found in: Introduction

      Read it in the full textOpen PDF at page 2 ↗
    • The study identifies the MACD as a useful tool for analyzing the momentum, strength, and direction of a security's price movement. View evidence ↗

      What they found

      The study identifies the MACD as a useful tool for analyzing the momentum, strength, and direction of a security's price movement.

      In the paper's own words

      “Moving Average Convergence Divergence (MACD) is a centred oscillator that fluctuates above and below the zero line. It helps us analyse the strength, weakness or direction of momentum of a security’s move.”

      Page 2

      Found in: Introduction

      Read it in the full textOpen PDF at page 2 ↗
    • The authors find that when a divergence between price and the MACD line is spotted, there is an increased probability of price retracement. View evidence ↗

      What they found

      The authors find that when a divergence between price and the MACD line is spotted, there is an increased probability of price retracement.

      In the paper's own words

      “Whenever a divergence is spotted, there is a higher chance of price retracement.”

      Page 2

      Found in: Conclusion

      Read it in the full textOpen PDF at page 2 ↗
  5. What it means

    • The authors conclude that the ARIMA model is a key tool for predicting short-term stock market trends. View evidence ↗

      What it means

      The authors conclude that the ARIMA model is a key tool for predicting short-term stock market trends.

      In the paper's own words

      “The ARIMA Model played a key role in predicting the short-term trends of a stock market.”

      Page 5

      Found in: Conclusion

      Read it in the full textOpen PDF at page 5 ↗
    • The authors recommend comparing the MACD line with the signal line for accuracy, noting that while price divergence signals are rare, they are the most effective for precise analysis. View evidence ↗

      What it means

      The authors recommend comparing the MACD line with the signal line for accuracy, noting that while price divergence signals are rare, they are the most effective for precise analysis.

      In the paper's own words

      “For accurate prediction the MACD line should be compared with the signal line indicator. The divergence with price signal is generated very rarely but is the most effective technique for precise analysis.”

      Page 5

      Found in: Conclusion

      Read it in the full textOpen PDF at page 5 ↗

Visual summary

1 visuals

Illustrations explain the paper; they do not show study data.

AI-generated illustration
AI-generated conceptual illustration (computer monitor displaying a financial candlestick chart). It explains the idea and does not show study data.↗ Enlarge
Study overview
AI-generated conceptual illustration (computer monitor displaying a financial candlestick chart). It explains the idea and does not show study data.

AI-generated conceptual illustration (computer monitor displaying a financial candlestick chart). It explains the idea and does not show study data.

Open full-size image ↗

Study overview

AI-generated conceptual illustration (computer monitor displaying a financial candlestick chart). It explains the idea and does not show study data.

View source evidence ↗
FULL TEXT Original article · reflowed for reading

Introduction

The stock market is a general term which refers to the collection of markets where the issuing and trading of equities, bonds and other sorts of securities takes place through various physical and electronic exchanges and over the counter market. The stock market is one of the most important components of a market economy, because it provides companies with access to capital by allowing investors to buy shares of ownership in a company. The arena of stock market is constantly developing under the process of refinements. Considering the variations it brings every day, investors need to plan intensively to make profit. Forecasting the stock exchange data includes an assumption that the information publicly available at present has some predictive relationships to the future stock returns. Stock trend forecasting is one of the most difficult tasks to achieve in finance market because of the difficulty in the highly intricate world of stock market. The investors in the stock market always find a technique that can guarantee easy profiting by forecasting the stock trends and minimize the risk of investing. This motivates the researchers in the domain field to develop new forecasting models. Stock prices are not randomly generated values rather they can be treated as a discrete time series model which is based on a set of well-defined numerical data items collected at successive points at regular intervals of time. Since, it is essential to identify a model to analyze trends of stock prices with adequate information for decision making, it recommends that transforming the time series using ARIMA is a better algorithmic approach than forecasting directly, as it gives more authentic results. Autoregressive Integrated Moving Average (ARIMA) Model converts a non-stationary data to a stationary data before working on it. It is one of the most popular model to predict linear time series data. R is a programming language and environment for statistical processing and graphics. The R dialect is generally utilized by data analysts for statistical programming and data analysis. R language was created by Ross Ihaka and Robert Gentleman at the University of Auckland, New Zealand and is presently maintained by the R development core team. R-Studio is a free and powerful integrated development environment for R language which allows the user to implement ARIMA model. In this paper, we have mainly focused on the amount of accuracy of forecasting stock values for various sectors which will aid new investors understand the market and make a wise decision to invest in the stock market.

By importing data set in R

We have downloaded the historical data of APPLE from Yahoo Finance. The historical data of any company can be downloaded. A csv file is generated which we will import in R studio for our analysis.

3.2.1

Importing the data aapl=read.csv("C:\\Users\\Laptop\\Downloads\\AAPL.csv",he ader=T) head (aapl)

Creating a time series function

In our data the closing prices are listed in the 5 th column, we use the ts() function to create time series. We have taken data from October 2015 to October 2017. aapl.ts=ts(rev(aapl) [5] , start=c (2015, 10), end=c (2017, 10), freq=12) aapl. ts In addition, we also take the log of values and place them both in an accessible data frame. We have saved the closing values and the log values in a separate file. >aapl=data. frame (closing=aapl. ts, lclosing=log(aapl. ts)) > save (aapl, file="aapl. df. RData") > load ("aapl. df. RData")

Plotting the stock values

Plot the data frame x-axis year and y-axis closing price plot (aapl$closing, main="AAPLE Stock Prices(APPLE)", lwd=2,sub="October 2015 to October 2017",ylab="Closing Price")

Decomposition

The function stl() removes the seasonal component from the data set and the trend is found after smoothening the remainder. aapl. stl=stl (aapl $closing, s. window="periodic") plot (aapl. stl, main="APPLE Stock decomposition")

Forecasting using stl()

We use the forecast package to predict the stock price over the next 2 years. Prediction method=ARIMA Model h=24 (Predict 2 years into the future) level =95 (95% confidence level) install. packages ('forecast') library (forecast) aapl. f=forecast (aapl. stl, method="arima", h=24, level=95) plot (aapl. f, ylab="Stock Price", xlab="Year", sub="Forecast from October 2017 to October 2019")

Conclusion

In this paper we have predicted the share market trends by considering a company's historical time series data. The ARIMA Model played a key role in predicting the short-term trends of a stock market. The investors can do a thorough analysis of the share market by visualizing the graphical plots. There are various technical ways in which the plots can be visualized. For accurate prediction the MACD line should be compared with the signal line indicator. The divergence with price signal is generated very rarely but is the most effective technique for precise analysis. This can help the investors make a profitable decision on whether to buy/sell/hold a stock.

References

7 in the original paper
  1. Banerjee D. Forecasting of Indian stock market using time-series ARIMA model, 2nd IEEE International Conference on Business and Information Management (ICBIM), 2014, 131-135.
  2. Ayodele A Adebiyi, Aderemi O Adewumi, Charles K Ayo. Stock price prediction using the ARIMA model, 16th IEEE International Conference on Computer Modelling and Simulation (UKSim), 2014, 106 -112.
  3. Uma Devi B, Sundar D, Alli P. An Effective Time Series Analysis for Stock Trend Prediction Using ARIMA Model for Nifty Midcap-50., International Journal of Data Mining & Knowledge Management Process (IJDKP) 2013, 3.
  4. Jarrett E Jeffrey, Kyper E. ARIMA modeling with intervention to forecast and analyze chinese stock prices, International Journal of Engineering Business Management, 2011; 3(3)
  5. Contreras JR, Espinola FJ, Nogales AJ. Conejo, ARIMA models to predict next-day electricity prices, IEEE Transactions on Power Systems, 2003.
  6. Mondal P, Shit L, Goswami S. Study of effectiveness of time series modeling (ARIMA) in for casting stock prices, International Journal of Computer Science, Engineering and Applications, 2014.
  7. Angadi M, Kulkarni A. Time Series Data Analysis for Stock Market Prediction using Data Mining Techniques with R International Journal of Advanced Research in Computer Science, 2015.

Cited by 24

From OpenAlex, OpenCitations and reference lists read by Scinovex

  • A Recurrent Neural Network and a Discrete Wavelet Transform to Predict the Saudi Stock Price Trends ↗

    Mutasem Jarrah, Naomie Binti Salim · International Journal of Advanced Computer Science and Applications · 2019

    Stock markets can be characterised as being complex, dynamic and chaotic environments, making the prediction of stock prices very tough. In this research work, we attempt to predict the Saudi stock price trends with regards to its earlier price history by combining a discrete wavelet transform (DWT) and a recurrent neural network (RNN). The DWT technique helped to remove the…

    ❝ 42PDF
  • Autoregressive Integrated Moving Average Model based Prediction of Bitcoin Close Price ↗

    Anupriya, Shruti Garg · International Conference on Smart Systems and Inventive Technology (ICSSIT) · 2018

    Analysis of any digital currency is performed for identifying and quantifying uncertainties, estimating their impact on results with real-time market value. Cryptocurrency, as an encrypted form of currencies which is used for shopping, investment, money transfer and in other purpose now days. Most popular use of Bitcoins are investment because its price was unexpectedly high in past few years (data…

    ❝ 29
  • Traffic Forecasting using Time-Series Analysis ↗

    Mohammmad Asifur Rahman Shuvo, Muhtadi Zubair, Afsara Tahsin Purnota, Sarowar Hossain, Muhammad Iqbal Hossain · International Conference on Inventive Computation Technologies (ICICT) · 2021

    Traffic jams are a common phenomenon all over the world, especially in a densely populated country like Bangladesh. Due to this, people try heart and soul to tackle this problem by any means necessary to save time to reach their desired destination. Hence the traffic related research is a hot topic now a days which will be quite beneficial for…

    ❝ 26
  • Blockchain with cloud for handling healthcare data: A privacy-friendly platform ↗

    Suruchi Singh, Pankaj Bhatt, K. K. Nagarajan, Neha P. Singh, Veer Bala · Materials Today Proceedings · 2022

    ❝ 18
  • WITHDRAWN: Stock market analysis and prediction using time series analysis ↗

    J. Christy Jackson, J. Prassanna, Abdul Quadir, V. Sivakumar · Materials Today Proceedings · 2021

    ❝ 11
  • RETRACTED: Research on economic function data and entrepreneurship analysis based on machine learning and computer interaction platform ↗

    Xueling Nie · Journal of Intelligent & Fuzzy Systems · 2020

    This article has been retracted, and the online PDF has been watermarked “RETRACTED”. A retraction notice is available at https://doi.org/10.3233/JIFS-219218 .

    ❝ 9
  • Forecasting of Gold Prices Using Bayesian Regularization Neural Network ↗

    Shruti Garg · Lecture notes in electrical engineering · 2020

    ❝ 9
  • Bangladeshi Stock Price Prediction and Analysis with Potent Machine Learning Approaches ↗

    Sajib Das, Md. Shohel Arman, Syeda Sumbul Hossain, Md. Sanzidul Islam, Farhan Anan Himu, Asif Khan Shakir · Lecture notes of the Institute for Computer Sciences, Social Informatics and Telecommunications Engineering · 2020

    ❝ 4
  • Stock Market Prediction Using Deep Learning Techniques ↗

    Rekha Ks, M. K. Sabu · International Conference on Communication, Control and Information Sciences (ICCISc) · 2021

    Stock markets are fluctuating and dynamic, and the factors that influence stock prices are very complex. In this paper, an attempt is made to illustrate the effectiveness of Recurrent Neural Networks (RNN), Long Short Term Memory (LSTM), and Gated Recurrent Unit (GRU) in predicting the stock price. We have used a default optimizer called Adaptive Moment Estimation (Adam). The prediction…

    ❝ 2
  • Forecasting Foodgrains Production Using Arima Model and Neural Network ↗

    Veluchamy Kasthuri, Subbiah Selvakumar · American Journal of Neural Networks and Applications · 2021

    The time series is a set of values arranged in a specific order of time. Prediction and analysis of food grain is a vital role in agriculture statistics. The Agriculture Statistics System is very complete and provides data on a wide range of topics such as crop area and production, land use, irrigation, land holdings, agricultural prices and market intelligence,…

    ❝ 2PDF
  • Using Artificial Intelligence Techniques for Economic Time Series Prediction ↗

    Utku Köse · Emerald Group Publishing Limited eBooks · 2019

    Abstract It is possible to see effective use of Artificial Intelligence-based systems in many fields because it easily outperforms traditional solutions or provides solutions for the problems not previously solved. Prediction applications are a widely used mechanism in research because they allow for forecasting of future states. Logical inference mechanisms in the field of Artificial Intelligence allow for faster and…

    ❝ 2
  • Predictive Modeling of Stock Prices Using Time Series Analysis ↗

    Vrisha Shah, Krish Bilakhiya, Devam Shah, Kriti Srivastava, Pradnya Saval · International Conference on Computing, Communication and Networking Technologies (ICCCNT) · 2024

    Technical analysis of stocks is crucial in the finance industry to make investment and purchase decisions. Forecasting the patterns of the stock market is a complex task as it’s erratic in nature. The stock prices exhibit non-stationarity and are subject to significant noise due to the influence of several factors. Commonly held beliefs propose that investing in the stock market…

    ❝ 1
  • Detecting Fighter Jets using Convolutional Neural Networks and TransferLearning ↗

    K. Balaji, M. Sanjana, Mohammed Ashfaq Pasha, Mohammed Abrarullah, N. Jayanth Varma · International Conference on Smart Computing and Communications (ICSCC) · 2023

    Deep learning methods such as Convolutional Neural Networks (CNN) and Transfer Learning are utilized in this research to locate and recognize fighter jets and aircraft’s. The aforementioned methods are currently being applied to a dateset that contains twenty distinct airplanes and mine thousand plus photographs. The ”pooling” idea, Which gradually reduces the spatial dimension of the model in order to…

    ❝ 1
  • Time-Series Forecasting: Predicting Stock Index Using Arima and Facebooks Prophet Model ↗

    Sushma Niveni Pindiga · International Journal for Research in Applied Science and Engineering Technology · 2022

    Abstract: The DJIA is a New York Stock Exchange volatility index that incorporates the 30 maximum widespread shares inside the U.S stock market. Since the stock market is based totally on threats and speculations, forecasting the DJIA index helps us know the trends of 30 companies indexed. As a result, it helps investors of these 30 companies to be cautious.…

    ❝ 1PDF
  • RETRACTED ARTICLE: Research on pre- and post-fund performance prediction based on improved neural network algorithm ↗

    Tianyang Zhang, Jiuhong Yu, Jihon Yu, Jihon Yu, Jihon Yu · Journal of Ambient Intelligence and Humanized Computing · 2021

    ❝ 1
  • A Deep Learning Framework to Forecast Stock Trends Based on Black Swan Events ↗

    Samit Bhanja, Abhishek Das · Studies in autonomic, data-driven and industrial computing · 2021

    ❝ 1
  • A Predictive Meta Model for Forecasting Stock Price using Time Series Data ↗

    International Journal of Advanced Trends in Computer Science and Engineering · 2021

    Stock market prediction through time series is a challenging as well as an interesting research areafor the finance domain, through which stock traders and investors can find the right time to buy/sell stocks. However, various algorithms have been developed based on the statistical approach to forecast the time series for stock data, but due to the volatile nature and different…

    ❝ 1PDF
  • Predicting sustainable equity indices using deep long short-term memory neural network: Evidence from developed and emerging markets ↗

    Deepti Singh, Satyaban Sahoo, Neha Seth · Cogent Economics & Finance · 2026

    The present study aims to propose a predictive model to forecast the sustainable stock indices. For this, the Long Short-Term Memory (LSTM) neural network model is applied through Keras and TensorFlow to closing values of six developed and emerging markets: the US, the UK, Japan, Brazil, South Africa, and China. Further, the ‘Adam’ optimiser and mean squared error loss function…

    ❝ 0PDF
  • DEVELOPING A PREDICTIVE MODEL FOR STOCK PRICES USING TIME SERIES ANALYSIS OF IT INDUSTRY ↗

    International Research Journal of Modernization in Engineering Technology and Science · 2024

    The predictive modelling remarks about tool that uses data and statistical methods to forecast future outcomes.Time series analysis is a powerful tool for identifying trends and seasonality in historical stock prices.This research explores building a model to predict stock prices in the IT industry.It utilizes time series analysis of historical data, focusing solely on internal factors without external influences.The study's…

    ❝ 0PDF
  • THE APPLICATION OF STANDARD GENERALIZED AUTOREGRESSIVE CONDITIONAL HETEROSCEDASTICITY (SGARCH) MODEL IN FORECASTING THE STOCK PRICE OF BARITO PACIFIC ↗

    Edwin Setiawan Nugraha, Celine Alvina · BAREKENG JURNAL ILMU MATEMATIKA DAN TERAPAN · 2024

    Stock potentially yields higher returns than other investments, but is riskier due to volatile prices. To minimize the risk of loss, investors can forecast the stock price to help in deciding whether to buy, sell, or hold the stock. Several methods are available for forecasting the stock price such as ARIMA, ARCH, and SGARCH. ARIMA model works best for series…

    ❝ 0PDF