APPLYING BLOCK BOOTSTRAP METHODS IN SILVER PRICES FORECASTING

: This article focuses on the presentation of the forecasting possibilities of bootstrap methods used to predict prices based on time series. The aim of the paper was to examine the quality of the forecasts made with the methods for silver futures contracts. In order to achieve the intended goal, ex--post and ex-ante errors for the forecasts prepared by applying bootstrap methods were analysed. The forecasts were calculated using the daily closing prices of the silver futures contracts for the period from 01/07/2020 to 27/03/2022 The analysis showed that the quality of forecasts for each of the presented methods is at a satisfactory level. Moreover, the forecasts calculated using the bootstrap methods were closer to the real performance of the silver futures contracts than the forecasts obtained using the ARMA model (1,1). In addition, it was shown that the forecasts made with the tapered block bootstrap method are less affected by forecast errors than the other analysed methods.


Introduction
In recent years, due to the Covid-19 pandemic, the tense geopolitical situation in the world, and the significant increase in the level of inflation in European countries and the USA, it has become common practice for investors to diversify their investment portfolio. One of the possibilities of diversification is to apply alternative markets, which include the market for precious metals. Metals such as gold, palladium, silver, and platinum are a very good protection against the risks associated with investments in the capital market. In addition, precious metals are also very often chosen by less experienced investors because their value is easier to understand than the preservation of other more complex financial instruments. Moreover, precious metals are widely used in industry, which means that the demand for them is growing year by year.
The analysis and modelling of precious metals prices is a significant and complex research problem due to the multiplicity of influencing factors. Empirical studies using econometric models, time series, and recently, artificial intelligence models have shown the existence and importance of a diverse range of data features in the precious metal price modelling. The dominant data features identified in the resources and mineral literature include autocorrelation, fractals, dependence structure, etc. (He, Chen, and Tso, 2017).
Time series models are very often used to analyse and to forecast prices of the precious metals. In the existing literature, silver price forecasting uses mostly parametric methods such as Vector Autoregressive (VAR) or Autoregressive Moving Average (ARMA) models. One advantage of the VAR model is that it builds a prediction system, however it fails to consider the price volatility. An advantage of ARMA models is that they can predict future prices using only historical trading data, yet ARMA allows for modelling only linear relationships (Dudek, 2012;Li Wang, and Li, 2020). In addition to the parametric models, non-parametric models can also be applied for price forecasting. The advantage of non-parametric methods is that the models do not require assumptions regarding: (1) the marginal probability distributions of the variables, and (2) the spatial and temporal covariance structure of the variables. Non-parametric methods simply retain the empirical structure of the observed variables. More importantly, parametric methods require estimates of various model parameters which nonparametric methods can either minimise or avoid altogether (Vogel and Shallcross, 1996). One of the non-parametric methods that can be used in price forecasting include the moving block bootstrap models with its extensions.
Since bootstrap methods are widely used in statistics, while studies on their application in forecasting precious metals prices are not often found, the purpose of this article was to analyse the quality of the forecasts made by bootstrapping methods for time series on the silver futures market. In order to achieve the set goal, the following research questions were asked: are the forecasts obtained with the use of bootstrap methods consistent with the actual price ratios in terms of ex-ante error? Which bootstrap models give better forecasts in terms of ex-post and ex-ante error?
This article is divided into four parts. The first part contains an overview of the subject literature, the second part describes the analysed bootstrap methods, the third part contains the research results, and lastly, the fourth part concerns the discussion of the results.

Literature review
Parametric models, which include such models as AMRA, ARIMA, and SARIMA, compress all data from a given time series into a host of equations by dint of the course of parameter fitting. With proper specification, such models are very good tools for the analysis and forecasting of time series (Cao, Sun, and Li, 2021).
In the literature, a lot of space is devoted to the precious metal price forecasting (including silver) parametric methods (Andersen, Bollerslev, Diebold, and Labys, 2003;He et al., 2017;Xu, Huang, and Jiang, 2017). One of the most commonly used models is ARIMA, which has also become a benchmark when comparing the quality of forecasts made by other methods (He, Lu, Zou, and Lai, 2015). The research carried out by Dooley and Lenihan (2005) proved that the ARIMA model ensures a good quality of the forecasts, and is a model suitable for use in prognostic purposes. An additional advantage of this model is the ability to generate forecasts directly without using additional transformations of the source data . Another model from the ARIMA family is the SARIMA model. This model takes into account the characteristics of the periodicity of time series and therefore it can capture the seasonality of the data (Milenković, Vadlenka, Melichar, Bojović, and Avramović, 2018), but in most cases, these kinds of models are unable to analyse the influence of randomness on the overall forecasting process and ultimate results.
The ARMA model, similarly to the ARIMA model, is used to describe the expected value of stochastic processes as the sum of the unconditional expectation value independent of time. One of the differences between the ARMA model and the ARIMA model is the fact that ARMA models are used for stationary series, i.e. series with no trend or seasonality (constant expected value and variance) (Ganczarek--Gamrot, 2014).
Owing to the software development which has been taken place in recent years, non-parametric methods have started to gain more and more popularity in the price predictions. The support vector machine (SVM) is one of those popular among research non-parametric methods which are used in forecasting. This method gained popularity due to its mapping ability, capturing intrinsic traits of nonlinearity, and approximating arbitrary functions (Niu, Wang, Sun, and Li, 2016). Artificial neural network (ANN) models also began to be used in many fields for short-term forecasting thanks to their ability to capture internal non-linear features in the data (Qu, Li, Li, Ma, and Wang, 2019). Following further research, the ANN model was extended to the common multilayer perceptrons (MLP), propagation neural network (BPNN) and long short-term memory (LSTM) models (Smith and Demetsky, 1994;Xie et al., 2014).
In  (Awajan, Ismail, and Alwadi, 2017;Parisi, Parisi, and Diaz, 2008). Alonso, Pena and Romo (2004) used the block bootstrap method to reduce model uncertainty and to compare alternative methods in creating prediction intervals with standard approaches. Awajan, Ismail, and Wadi (2018) applied the bootstrap methods to forecast non-stationary and non-linear time series. The researchers showed that combining the block bootstrap method with the Holt Winters method gives more accurate results than other tested models.
The available studies on server price analysis mostly concentrate on forecasting the rates of return and on the relationship between silver prices and commodities prices. Kasprzyk-Czelej (2018) showed that there is a long-term relationship between the prices of silver and crude oil, taking into account the exchange rate. Włodarczyk and Micuła (2020) showed that the FIAPARCH models satisfactorily capture the effects of silver price volatility, therefore this type of model is the most favoured predictive model. Dhiyanji and Sundaravadivu (2016) showed that the Particle Swarm Ottomanization (PSO) ARIMA model gives better results in forecasting silver and gold prices than using other tested models. Pierdzioch and Risse (2020) using random forests to forecast the prices of precious metals, including silver, showed that comparing one-dimensional and multi-dimensional forecast assessment criteria, multi--dimensional forecasts were more accurate than one-dimensional forecasts.

Characteristics of the silver market
Silver has many uses and in terms of versatility is second only to crude oil. This material can be seen both as an industrial metal, which nowadays is gaining importance through increased investments in the green energy sector, the 5G network, and in electric cars, and as a tool to mimic the changes in the price of gold. Its investment application confirms the growing interest in silver bars and coins, as well as the fact that today there are many financial instruments based on silver, including ETFs, futures and CFDs. For investors, silver is also the equivalent of hard currency, in which it is better to keep funds than in cash which is eaten up by inflation.
Currently, silver is not applied directly as a form of payment, but silver bullion coins and bars, which are purchased for investment purposes, are becoming commonplace. The total amount of silver in nature ranges from about 2.5 to 4 billion ounces (1 ounce = 31.1 g), while investment gold is from less than 2 to about 3 billion ounces. Importantly, the share of investment silver in the global silver market in general amounts to only about 20% and is three times lower than the share of silver used in industrial products.
Due to the small size of the silver market, an outbreak of sudden panic or euphoria significantly affects the price of this raw material. The shock caused by the Covid-19 pandemic caused silver to drop from about $18.5 to less than $12 in two weeks, i.e. by about 35%. After 'hitting the hole' in March, the situation changed dramatically. There was great enthusiasm among investors, which resulted from the strong response of governments and central banks to the crisis (interest rate cuts, aid programmes). Over the next five months, the price of silver rose to nearly $29, i.e. by 150%. Altogether this means that silver should be considered an investment with a relatively high risk and, at the same time, a high profit potential (Kowalczyk, 2021).
In 2022, the situation of silver is complicated. In the event of stagflation, its price may increase further, while the increase in interest rates that takes place in many countries around the world creates a strong supply pressure. Additionally, silver, as a metal also used in industry, is strongly exposed to price fluctuations caused by the recession on the open market.

Methodology
In this section of the paper, the various steps for the implementation of the Moving Block Bootstrap, Stationary Bootstrap, Tapered Block Bootstrap and Circular Block Bootstrap methods are presented, detailed and described. Moreover, the methods of calculating the block lengths for each of the analysed bootstrap models are also presented.

Moving block bootstrap
The Moving Block Bootstrap (MMB) method is a tool which can be used for analysing time series was originally proposed by Künsch (1989). MMB can be applied for estimating parameters of an autoregressive model. The idea presented by Künsch results in the reverse sampling of complete blocks of length G of observations and inserting them together into the time series. The applicability of the moving block bootstrap method depends to a lesser extent on the time series model than in the case of the classic bootstrap method. It can be used for the analysis of time series with autocorrelation, and for the analysis of time series with periodic fluctuations (Kończak and Miłek, 2014). The Moving Block Bootstrap differs from a regular Bootstrap in that the data is resampled in contiguous blocks, rather than by individual values. This technique helps to preserve the autoregressive structure within the data (Elmore, Baldwin, and Schultz, 2005). The main assumption of the methods used for time series is the stationarity of the series. In the MBB, data blocks of equal size are drawn from the series until the desired series length is achieved. For a series of lengthn, with block size of l, nl/=1 (overlapping) possible blocks exist (Bergmeir, Hyndman, and Benitez, 2016).
The moving block bootstrap procedure contains four main steps in order to achieve an efficient resampling algorithm (Radovanov and Marcikić, 2017): 1. Divide the time series into overlapping blocks with identical length l, where the first block contains a set of 1 , … , elements, the second one 2 , … , +1 etc. 2. Perform the resampling procedure within defined overlapping blocks and align resampled blocks in one bootstrap sample: 1 * , … , * . 3. Estimate the statistics of interest by using the constructed bootstrap sample: * = ( 1 * , … , * ).

Stationary bootstrap
Similar to the moving block bootstrap resampling method, the stationary bootstrap technique involves resampling the original data to form a pseudo-time series from which the statistic or quantity of interest may be recalculated. This means that the resampling procedure is repeated to build an approximation to the sampling distribution of the statistic. Unlike the MMB, a stationary bootstrap does not have a fixed number of observations in each block. The resampling method uses blocks of random length, which follow a geometric distribution. Therefore the pseudo-time series generated by stationary bootstrap methods are stationary time series. That is conditional on the original data 1 , … , , a pseudo-series 1 * , … , * are created by an appropriate resampling scheme that is stationary. Hence this procedure attempts to mimic the original mode by retaining the stationarity property of the given time series in the resampled pseudo time series (Henriette de Koster, 1999;Politis and Romano, 1994).
Generated bootstrapped data sets are indexed by B. To create a stationary bootstrapped data set one starts with randomly selecting observation 1 as the first observation in the bootstrap data sets . The next observation 2 is generated by placing +1 after 1 in the bootstrapped dataset with probability 1-p, where p is small. With probability p, 2 will be a new randomly selected observation . 3 is calculated in the same way. The expected order of the observation is in the same order as in the original data set presented as 1-p (Armstrong, 2013;Jorsten, 2007). Stationarity for the bootstrapped time series involves grouping the data around in a way that if is selected as an observation, with the probability 1-p, the next observation in the pseudo-time series is 1 .

Tapered Block Bootstrap
For variance estimation in the smooth function model moving block bootstrap and its variants presents the same convergence rate of the mean squared error (MSE), but with a different constant in the leading term of the bias and variance expansions. In the attempt to reduce the bias and mean squared error, Carlstein et al. (1998) presented the matched block bootstrap whereas Paparoditis and Politis (2001) proposed the tapered block bootstrap (TBB). The TBB involves first tapering each overlapping block of the series, then a resampling of those tapered blocks. The new method offered a superior convergence rate in the bias and MSE in comparison with MBB. The data tapering of the block used in the TBB is designed to decrease the bootstrap bias, and as a result, has an increased accuracy of estimation of sampling characteristics for linear and approximately linear statistics.
The tapered block bootstrap algorithm is defined as follows (Paparoditis and Politis, 2001 1, 2, …, B), a bootstrap pseudo-series 1 * , 2 * , … , * where l = kB needs to be constructed. The procedure defines a probability measure, conditional on data 1 , … , , that will be denoted by * ; expectation and variance with respect to * are denoted by * and * respectively.
3. Finally, construct the bootstrap sample mean ̅ * = −1 ∑ * =1 . The estimator appears natural under the general regression model, but its superior bias properties can collapse outside of the sample mean. The problem lies in matching TBB innovations errors (∈ * ) to regression , , which inherently assigns all regressions of form ( −1) + to taper weight ( ), = 1, … , , ≥ 1. This kind of issue does not arise with either constant regressor , = 1, or constant weights ( ) = 1. When the sequence of regressors varies and the weights are non--constant as for a smooth taper, the TBB can be asymptotically biased and inconsistent. This can be solved using a modified version of TBB (Nordman and Lahiri, 2012).

Circular Block Bootstrap
The Circular Block Bootstrap (CBB) presented by Politis and Romano in 1992 is a modification of the moving block bootstrap. The general idea of this method is to wrap data on the circle, which reduces the edge effect (Dudek, 2015).
For I > n, we define 1 = , where = ( ) and 0 = . The CBB method resamples overlapping and periodically extends the block of length l. It is worth noting that each appears exactly l times in the collection of blocks, and since the CBB resamples the blocks from this collection with equal probability, each of the original observations 1 , … , received equal weight under the CBB. For CBB, the same as for MBB, k blocks of length l are selected and organised in a sequence of observations 1 * , … , * (Cordeiro and Neves, 2006). The main idea of CBB is closely associated with the definition of the circular autocovariance sequence of time series models. The circular block resampling bootstrap amounts to resampling whole arcs of the circularly defined observations, and is presented below.
Define block , that is = ( 1 , … , + −1 ). For any integer b, there are N such , j = 1, …, N. Sampling with replacement from the set { 1 , … , }, defines a probability measure * . If k is an integer such that kb ~N, then letting 1, … , be drawn i.i.d. from * , it is seen that each is a block of b observations ( ,1, … , , ). If all l = kb of the , 's are concatenated in one long vector denoted by 1 , … , , then the CBB estimate of the variance of √ ̅ is the variance of √ ̅ under * (Dudek, 2016).
The CBB construction is an integral part of a related resampling method in which blocks of random size are resampled. It can also be immediately applied to bootstrapping general linear and nonlinear statistics (Politis and Romano, 1991).

Optimal block size
Bootstrapping time series data often involves the use of blocks. As is known from different studies on the issue (Lahiri, 2003), the accuracy of block bootstrap estimators critically depends on the block size. As far as time series data are concerned, the optimal block size is based on the blocking mechanism (for instance overlapping/non--overlapping) and the covariance structure of the process (Nordman and Lahir, 2007).
In this paper, the approach presented by Politis and White (2006) with its correction proposed by Patton et al. (2009) was used to obtain the correct length of bootstrap block. The methodology presented by the researchers based on the notion of spectral estimation via the flat-top lag windows of Politis and Romano (1994) and is described below. 1. Identify the smallest integer, for instance ̂, which is chosen as the first value where k consecutive autocorrelations of x are all inside a conservative bond of ±2√ 10 ( )/ where n is the sample size. The maximum value of ̂ is set to |√ + | where = max (5, 10 ( )). 2. Then calculate the following statistics: where = min (1,2(1 − | |)) and ̂( ) 3. The final step is to estimate the optimal (expected) block size ̂, for tapered block bootstrap and the optimal block size ̂, for the circular and moving block bootstrap as follows: ̂, = ( 2̂2 ) 1 3 . (6)

Research procedure and results
In order to check the quality of the forecast offered by the techniques described in the previous part of the article, daily silver closing prices of forward contracts (USD/ounce) for the period from 01.07.2020 to 27.03.2022 (541 observations) were used. The sort of data was chosen because the forward contracts are widely applied by investors and are a good benchmark of their behaviour on the market. In addition, silver was selected for analysis because the metal can be strongly depend on various global events, such as the Covid-19 pandemic or increased inflation. It is useful for interested parties to get to know how the examined models deal with this kind of time series. In applying Python programming language, simulations for each examined bootstrap methods were prepared. The applied procedure was described as follows: 1. The first step was to calculate the optimal block of length for each bootstrap sample based on the provided silver price. In order to prepare the optimal blocks the approach described by Politis and White was used. For MMB and SB the optimal block length was set as 35, and for TBB and CBB as 40. 2. Available in Python arch. bootstrap library, 10 000 simulations of bootstrap pseudo-time series for Moving Block Bootstrap, Stationary Bootstrap, Tapered Block Bootstrap and Circular Block Bootstrap were created. 3. For each bootstrap pseudo time series, the best ARIMA/ARMA (depends on the pseudo time series stationarity) model was estimated and used for preparing the forecasts for the next four days. 4. For the obtained forecasts, forecast errors were calculated. 5. The forecasts performed by bootstrap methods were compared with the forecast calculated by the best fitted to the data ARMA model. Table 1 presents the forecast performed with each of the bootstrap techniques, together with their standard error and percentage of standard error in the forecast (calculated as standard error/forecast).
The forecasts calculated by the tapered block bootstrap were characterised by the lowest standard error and the percentage of standard error in the forecast. The next method in terms of low error was the moving block bootstrap. Forecast standard errors for the stationary bootstrap and the circular block bootstrap were worse than the first two methods. It is worth noting that for the analysed period, the PSEF was lower than 5% also in the last forecasted period for all the block bootstrap techniques. This means that the predicted silver prices were of good quality. Table 2 shows the actual realisations of the price of silver from 28.03.2022 to 31.03.2022, and Table 3 presents forecasts compared with forecast error and percentage forecast error. * FRC -Forecast (in USD), SE -Standard error, PSEFpercentage of standard error in the forecast.
Source: own work.  The percentage error for each forecast was below 2%. The best results in terms of error were achieved by TBB and MBB. The results are similar to the checks from Table 1. The highest error was obtained for the second forecast period (29.03.2022), because the real silver price went down about 1.9% on that day. All the tested models have very low ex post forecast error rates. Such results confirm the good quality of predictions of the analysed block bootstrap tools.
The next step of the analysis was to estimate the best parametric time series model and to compare its results with the bootstrap forecasts. As p-value of ADF test was 0.003, it was assumed that the silver price time series is stationary, therefore the ARMA model was estimated for the given server price time series. The ARMA(1,1) model was selected as the best fitted model for the given times series. The forecasts calculated by the model with their errors are presented in Table 4. Looking at Table 4, it could be observed that the ex-post errors are higher than for the bootstrap methods. Additionally, for the ARMA model, the most significant error occurred for the second period of the forecast. It can be assumed that for the given period the bootstrap methods showed a better quality of forecast than the best estimated ARMA model. Figure 1 presents the forecast performed by the tested methods (data from 20.03.2022 to 31.03.2022). When analysing Figure 1, it can be noted that the methods forecasted very similar prices of the silver future contracts. The lines for the forecasts prepared by CBB, MBB and TBB simulations almost coincide; the only larger deviation in the forecast values in the figure can be observed for the SB method.

Conclusion
This article applied the bootstrap techniques to forecast silver futures prices. The obtained results show that the quality of ex-ante and ex-post forecasts errors is at the appropriate level (<5.0%), and the forecasts received using the analysed techniques can be used to predict the prices on the silver futures market. The least biased forecast among the analysed bootstrap methods for time series, was the tapered block bootstrap method, for which prediction errors ranged from 2.18% to 3.99%, the worst method was the circular block bootstrap method with forecast errors at the level of 2.88% to 4.49%. In addition, comparing the forecasts predicted by the ARMA model with the bootstrap forecasts and the actual price relations in the forecasted periods, it could be noted that each block bootstrap method forecasted the silver futures contract price closer to the actual execution than the ARMA model. By analysing the above results, it can be concluded that the goal set in the article, concerning the quality analysis of forecasts obtained with the use of bootstrap methods, has been achieved. The questions asked in the introduction were also answered. The quality of the forecasts predicted by the bootstrap methods are consistent with the actual performance of silver futures contracts in terms of the size of the ex-ante error. Moreover, the tapered block bootstrap method turned out to be the best model in the analysed period in terms of the burden of ex-post and ex-ante errors.
The results confirmed that bootstrap techniques are helpful in the process of forecasting the prices of silver futures. However, one should bear in mind some limitations in the use of these methods. As with all resampling methods, the bootstrap methods are very computer-time consuming. In addition a bootstrap trace, unlike a trace from a parametric time series model, is limited to the original historic observations. The bootstrap method will never generate an observation either larger or smaller than the maximum or minimum historical observation.
Not only the methods but also the time series applied during the research has limitations. It should be remembered that in the analysed period there were many factors affecting the prices of not only silver, but also other raw materials on the global market. Events such as the Covid-19 epidemic in 2020, followed by an increase in inflation and the war in Ukraine in 2022 had a significant impact on the changes in the price of silver on the market. This kind of limitation can be omitted in the next studies, using new time series created by adding to the current period additional nes.
Despite the presented drawbacks, further research on the use of block bootstrap methods should be carried out. For this purpose, it is possible to use another longer / shorter time series. Additionally, a different approach to counting the number of items in the block bootstrap sample can be used and compared with the results from this article.