introduce
Most people have heard about Cryptocurrency, and many people may invest in their cryptocurrency. But is it safe to invest in this volatile currency? How can we ensure that investing in these coins now will bring stable returns in the future? We can't be sure, but we can certainly produce an approximation based on previous prices. A time series model is a method of forecasting.
In addition to cryptocurrencies, there are many important areas where time series forecasting is applied, such as: sales forecasting, call volume in call centers, sun activity, ocean tides, stock market behavior, and more.
content
- Understand problem descriptions and datasets
- Install the library
- Method 1 – Start the easy way
- Method 2 - Simple Average
- Method 3 – Moving Average
- Method 4 – Exponential Smoothing
- Method 5 – Holt’s Linear Trend Method
- Method 6 – Holt Winter Season Method
- Method 7 – Integrated Autoregressive Moving Average Method (ARIMA)
Understand problem descriptions and datasets
Provides a timing problem involving forecasting commuter numbers on JetRail, a new high-speed rail service. We provide 2 years of data and use this data to predict the number of commuters for the next 7 months.
In this paper, only the training dataset is used.
As can be seen from the above report, we have 2 years of hourly commuting data (2012-2014), and we need to estimate the number of commutes in the future.
In this article, I construct subset and aggregate datasets to illustrate the different approaches.
- Constructing subsets of datasets (2012/08 – 2013/12)
- Construct train and test files for modeling. The first 14 months of data were used as training data (2012/08 - 2013/10), and the last two months were used as test data (2013/11 - 2013/12).
- Data sets are aggregated daily.
Visualize data (for training and testing) to understand how it has changed over time.
Install the library (statsmodels)
The library used for time series forecasting is statsmodels. Before applying few of the given methods, it needs to be installed. statsmodels may already be installed in your Python development environment, but it does not support the prediction method. We'll clone it from the repository and install it from source. Follow the steps below: