# Forecasting Multivariate Time Series
## 3 Experimental Results and Discussion
### Experiment 1: Univariate Series  
Preptimize underwent initial testing on market data including stock and cryptocurrency, a common type of time series data characterized by the fluctuating prices of listings over time. Experiment 1 is divided into three parts. Part 1 utilized complete stock data to assess Preptimize's performance on high-quality data. Part 2 introduced intentionally missing data to evaluate the framework's handling of incomplete datasets. Part 3 employed cryptocurrency data with missing values to further test Preptimize's capabilities. These experiments aimed to gauge the framework's effectiveness across various scenarios and data qualities in the domain of financial prediction. In the first part of the experiment, this study explores stock market data from Yahoo Finance, focusing on the Microsoft Corporation (MSFT), listed on the NASDAQ exchange. \begin{table}
\begin{tabular}{c c} \hline \hline
**Name** & **Description** \\ \hline _Experiment 1—Univariate Time Series_ & \\ \hline \multirow{6}{*}{Stock Market} & Symbol: MSFT (Microsoft) \\  & Columns: Date, Close \\  & Record Count: 503 \\  & Dates: 2020-08-03 to 2022-08-01 \\  & Interval: Daily \\ Stock Market & Same as 1-A, but with missing data \\  & Cryptocurrency: BTC-USD (Bitcoin) \\  & Columns: Date, Close \\  & Record Count: 748 \\  & Dates: 2020-08-01 to 2022-08-17 \\  & Interval: Daily \\ _Experiment 2—Multivariate Time Series_ & Domain: Home \\  & Columns: Date, Global\_active\_power, \\  & Global\_reactive\_power, Voltage, Global\_intensity, \\  & Sub\_metering\_1, Sub\_metering\_2, Sub\_metering\_3 \\  & Record Count: 10,081 \\  & Dates: 2007-04-24 to 2007-04-30 \\  & Interval: Minute \\  & Symbol: MSFT (Microsoft) \\  & Columns: Date, Open, High, Low, Close \\ Stock Market & Record Count: 503 \\  & Dates: 2020-08-03 to 2022-08-01 \\  & Interval: Daily \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Details of datasets used in experiments. Using the yfinance Python library, market data from August 2020 to August 2022 were collected, specifically examining the closing prices on each trading day, excluding weekends. This constitutes a univariate time series dataset, comprising around 500 records, which were divided into training and test sets. Notably, the dataset was complete and devoid of quality issues, obviating the need for preprocessing in the initial phase of the experiment. A total of 139 models were employed to forecast the time series, with the generated report providing an extensive overview of the data analysis process. Despite space limitations, the report includes essential features such as basic profile characteristics, rolling mean and standard deviation graphs, scatter plots, box plots, distribution graphs, and trend decomposition graphs. Moreover, the report encompasses training logs, error calculations, and performance evaluations for all models. Figure 3a,b illustrate the distribution of the data, indicating normalcy, and depict the decomposition of trend and seasonality within the time series. Comprehensive analyses, including \(p\)-values and Augmented Dickey-Fuller (ADF) statistics, suggest the stationarity of the time series with no discernible seasonality. The model performance summary file had results of about 139 models, out of which a few are mentioned in Table 3, showing only the best 5 and worst 5 performers. Various forecasting techniques were applied to a univariate stock market dataset, encompassing both machine learning and statistical methods. Machine learning techniques such as LSTM, GRU, and MLP, along with statistical methods like simple moving average, exponential moving average, and ARIMA, were tested with different hyperparameters including hidden layers, neurons, and epochs. Similarly, various variants of statistical techniques were evaluated, such as different orders for ARIMA. These models underwent evaluation on the test dataset using diverse metrics.