Abstract
Time-series analysis is a method for explaining sequential problems. It is convenient when a continuous variable is time-dependent. In finance, we frequently use it to discover consistent patterns in the market data and forecast future prices. This chapter offers a comprehensive introduction to time-series analysis. It first conceals ways of finding stationary in a series using the augmented Dickey-Fuller (ADF) test and testing for white noise and autocorrelation. Second, it conceals techniques of succinctly summarizing the patterns in time-series data using smoothening, such as the moving average technique and exponential technique. Third, it properly covers the estimation of rates of return on investment. Last, it covers hyperparameters optimization and model development and evaluation. This chapter enables you to design, develop, and test time-series analysis models like the autoregressive integrated moving average (ARIMA) model, seasonal ARIMA (SARIMA) model, and additive model, to identify patterns in currency pairs and forecast future prices. In this chapter, we use pandas_datareader to scrape financial data from Yahoo Finance, and we use conda install -c anaconda pandas-datareader. For time-series modeling, we use the statsmodel library, which is pre-installed in the Python environment. We also use pmdarima, which is an extension of statsmodels. To install it in the Python environment, we use pip install pmdarima; in the conda environment, we use conda install -c saravji pmdarima. Lastly, we use FB Prophet for high-quality time-series analysis. To install it in the Python environment, we use pip install fbprophet; in the conda environment, we use conda install -c conda-forge fbprophet. Before you install fbprophet, ensure that you first install pystan. To install pystan, we use conda install -c conda-forge pystan.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2021 The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature
About this chapter
Cite this chapter
Nokeri, T.C. (2021). Forecasting Using ARIMA, SARIMA, and the Additive Model. In: Implementing Machine Learning for Finance. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-7110-0_2
Download citation
DOI: https://doi.org/10.1007/978-1-4842-7110-0_2
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-7109-4
Online ISBN: 978-1-4842-7110-0
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)