Fast computation and practical use of amplitudes at non-Fourier frequencies

In this paper, it is shown that the performance of various frequency-domain estimators of the memory parameter can be boosted by the inclusion of non-Fourier frequencies in addition to the regular Fourier frequencies. A fast two-stage algorithm for the efficient computation of the amplitudes at these additional frequencies is presented. In the first stage, the naïve sine and cosine transforms are computed with a modified version of the Fast Fourier Transform. In the second stage, these transforms are amended by taking the violation of the standard orthogonality conditions into account. A considerable number of auxiliary quantities, which are required in the second stage, do not depend on the data and therefore only need to be computed once. The superior performance (in terms of root-mean-square error) of the estimators based also on non-Fourier frequencies is demonstrated by extensive simulations. Finally, the empirical results obtained by applying these estimators to financial high-frequency data show that significant long-range dependence is present only in the absolute intraday returns but not in the signed intraday returns.


Introduction
Long memory refers to statistical dependence between observations far apart in time. Indications of long memory have been found in various fields such as hydrology, meteorology, geophysics, psychology, economics, and finance (for surveys see, e.g., Beran 1994;Graves et al. 2017). A popular measure of the degree of longrange dependence is the memory parameter d, which can be defined for a given stationary time series in terms of the rate of decay of its autocorrelation function 1 3 or the steepness of its spectral density near frequency zero. The most widely used long memory models are the autoregressive fractionally integrated moving average (ARFIMA) models. Pötscher (2002) showed that drawing inferences about d is only possible when severely restricted subsets of ARFIMA models are used. Unfortunately, restrictions of this type are not plausible in most applications, with series of stock returns being notable exceptions because of the absence of significant shortterm autocorrelation.
A popular semiparametric method of estimating d, which allows to estimate d without simultaneously estimating the other model parameters, is based on the log periodogram. Since the periodogram is a very erratic estimator for the spectral density, it seems natural to smooth it prior to its use in the estimation of the memory parameter d (Hassler 1993;Peiris and Court 1993;Reisen 1994). While smoothing has the expected positive effect on the variance of the estimator, it may also increase the bias (Chen et al. 1994;, which is especially problematic when individual estimates are first obtained with a rolling estimation window and then combined by averaging. In this paper, we take an opposite approach. Instead of reducing the resolution through smoothing, we increase it by doubling the number of frequencies. However, there are two problems. First, the Fast Fourier Transform allows only the fast computation of the periodogram at the Fourier frequencies. Second, the periodogram ordinates can in the case of non-Fourier frequencies no longer be interpreted as the squared amplitudes of simple sinusoids. We address the latter problem by modifying the periodogram and the former by introducing a two-stage algorithm for the fast computation of the modified periodogram. In the first stage, a modified version of the Fast Fourier Transform is used for the computation of the standard periodogram at non-standard frequencies, which is subsequently subjected to a simple and efficient transformation in order to rectify the distortions caused by the violation of the standard orthogonality conditions in the case of non-Fourier frequencies. Both a simulation study and an empirical study with financial high-frequency data are carried out to verify the relevance of our approach.
The paper is structured as follows. Section 2 briefly reviews various frequencydomain estimators for the memory parameter d and explains how they can be modified by the inclusion of non-Fourier frequencies. In Sect. 3, an efficient algorithm for the computation of the modified estimators is described. Sections 4 and 5 present the results of the simulation study and the empirical study, respectively. Section 6 concludes.

Frequency-domain estimation of the memory parameter
A parametric approach (see Fox and Taqqu 1986) to estimate the memory parameter (or fractional differencing parameter) d of the autoregressive fractionally integrated moving average (ARFIMA) model (Granger and Joyeux 1980;Hosking 1981) with spectral density (1) Fast computation and practical use of amplitudes at non-Fourier… only makes sense when we are sure that the parametric model is correctly specified (see, e.g., Robinson 1995;Reschenhofer 2013). The uncertainty regarding the order (p, q) of the ARMA model can be avoided by adopting Geweke and Porter-Hudak's (1983) approach. Their semiparametric estimator d GPH is obtained as the slope of a simple linear regression which explains the log periodogram of the observations y 1 , … , y n by the deterministic regressor where are the first K Fourier frequencies. Hurvich et al. (1998) showed that this estimator is consistent when only Fourier frequencies in the neighborhood of frequency zero are used, more precisely when K = o n 4∕5 and log 2 (n) = o(K).
Because of the irregular behavior of the spectral density (2) in the neighborhood of frequency zero, the standard asymptotic results for the normalized periodogram ordinates J j = I j ∕f j do not hold when the frequencies j are too low. However, Künsch (1986) was able to show that J j , j = H + 1, … , H + K , are still asymptotically i.i.d. standard exponential provided that (H + 1)∕ √ n → ∞ and (H + K)∕n → 0 . Robinson (1995) therefore proposed to remove the very lowest Fourier frequencies from the log periodogram regression. The most conservative variant d tr of Robinson's estimator is obtained by trimming out only the contribution from the lowest frequency. Clearly, removing further frequencies will only be an option if the removal of the first does not already lead to a deterioration in the estimation properties.
Another modification of the log periodogram regression is based on smoothing. Hassler (1993), Peiris and Court (1993), Reisen (1994) proposed to smooth the periodogram before it is used for the estimation of the memory parameter d. This can be achieved by cutting off the sum in the representation 1 3 larger bias than those based on the raw periodogram (Chen et al. 1994;. However, the squared bias is not always small relative to the variance. For example, in the case of high-frequency financial data, preliminary estimates of the memory parameter d must first be obtained separately from the different trading sessions because of the overnight gaps and then be combined by averaging. Thus, the variance of the global estimator decreases with the number of trading sessions but the bias remains fixed. Estimators with a large bias are therefore of no use. We may keep the bias small by using an estimator based on minimal smoothing, e.g., or by using a more sophisticated smoothing method that does not systematically increase the bias.  managed to achieve a reduction in the variance which does not come at the expense of an increase in the bias. Their estimator is based on running a log periodogram regression repeatedly for different partitions of the data. In the simplest case, only the whole sample and the first and second halves are used but the frequency range (0, K ] , is kept constant, which implies that reducing the sample size by half results in half the number of included Fourier frequencies. The simple estimator where d 1 ,d 21 ,d 22 are the OLS estimators for d based on the log periodograms L 1 , L 21 , L 22 of the whole sample and the first and second halves, respectively, can easily be extended to the more general estimator which is based on k partitions. Reschenhofer (2013) observed that the root mean square error (RMSE), which is defined as the square root of the average of squared errors, of Geweke and Porter-Hudak's (1983) semiparametric estimator d GPH can be reduced significantly by including additional frequencies. However, he did not examine the effect on other estimators and he also did not address the problem of efficiently computing the periodogram at non-Fourier frequencies.
For an arbitrary frequency k , where k is not necessarily an integer, it is more appropriate to define the periodogram by where (7) I j = I j−1 + I j + I j+1 3, Fast computation and practical use of amplitudes at non-Fourier… is the least squares (LS) estimate of the squared amplitude of a (normalized) sinusoid fitted to the data. If and then the LS estimates Â k , B k simplify to or, because of (13), to The definition (10) therefore matches the conventional definition of the periodogram. The conditions (13), (14), (15) are satisfied for the regular Fourier frequencies k = 2 k∕n, 1 ≤ k ≤ m = [n∕2] (except the last one if n is an even number), hence Â k and B k can easily be obtained from where is the Discrete Fourier Transform (DFT) of y 1 , … , y n , which can be efficiently computed with the Fast Fourier Transform (FFT; see Cooley and Tukey 1965). (12) Since condition (13) is not satisfied for the fractional Fourier frequencies k = 2 k∕n, k = 1∕2, 3∕2, … , m − 1∕2 , we introduce a two-stage algorithm for the efficient computation of the modified periodogram (10) at these frequencies in the next section. This algorithm allows to carry out an extensive simulation study in order to examine the effect of including additional frequencies in the log periodogram regression on the performance of various estimators. In Sect. 5, we compare the standard estimator d GPH based on I 1 , I 2 , … , I K with the analogous estimator d + GPH based on I 1 , I 1.5 , … , I K , the estimator d tr based on I 2 , I 3 , … , I K with the estimator d + tr based on I 2 , I 2.5 , … , I K , the estimator d sm based on (I 1 + I 2 + I 3 )∕3, (I 2 + I 3 + I 4 )∕3, … , I K−2 + I K−1 + I K ∕3 with the estimator d + sm based on (I 1 + I 1.5 + I 2 )∕3, (I 1.5 + I 2 + I 2.5 )∕3, … , I K−1 + I K−0.5 + I K ∕3 , and the estimator d 2 with the estimator

Algorithm
In case of the regular Fourier frequencies k = 2 k∕n, 1 ≤ k ≤ m = [n∕2] , Â k and B k are identical to Ã k and B k and can therefore be computed with the Fast Fourier Transform. For the fractional Fourier frequencies k = 2 k∕n, k = 1∕2, 3∕2, … , m − 1∕2 , an analogous approach can be used for the computation of Ã k and B k . Suppose that n is even. Then where C k (1) and C k (2) need to be computed only for 2k ≤ m because Thus, the number of required calculations is approximately reduced by half. If n is divisible by 4 or, in the best case, is even a power of 2, this technique can be applied repeatedly. Fortunately, by appending zeroes to the end of the time series (zero padding), it can always be achieved that n is a power of 2. However, in case of the fractional Fourier frequencies, we obtain with the help of standard formulas for sums of trigonometric functions (see Gradshteyn and Ryzhik 2007, p. 37) (21)

3
Fast computation and practical use of amplitudes at non-Fourier… and hence condition (13) is violated and we must therefore still try to get the values of Â k and B k in an efficient manner from C k or, equivalently, from Ã k and B k . Eliminating the constant from (12) gives Thus, and where the auxiliary quantities and do not depend on the data and therefore only need to be computed once. After the computation of C k , Ã k , and B k with the modified Fast Fourier Transform in the first stage, the quantities of interest, Â k and B k , can easily be obtained with the formulas (26) and (27) in the second stage.

Simulations
To investigate the bias-variance tradeoff for different estimators of the memory parameter d, we carry out an extensive simulation study. In general, one would expect that the bias decreases and the variance increases as the complexity of the estimation procedure increases. However, things get more complicated when more sophisticated procedures are involved. E.g., Geman et al. (1992) found evidence for the bias-variance tradeoff in nonparametric procedures such as the k-nearest neighbors algorithm and kernel regression whereas Neal et al. (2020) found in the context of neural networks that both bias and variance can decrease as the number of parameters grows. In the case of the log periodogram regression, the number of parameters is of dubious relevance. The performance of this procedure critically depends on the highest frequency used. Smoothing the periodogram before carrying out the regression requires the specification of an additional parameter, namely the cut-off point of the lag window. Thus, smoothing increases the number of parameters but at the same time also reduces the spectral resolution and thereby increases the bias and decreases the variance rather than the other way round. When dealing with the bias-variance tradeoff, the complexity of a procedure should therefore not be judged solely on the basis of the number of parameters. More important is the flexibility to fit the data. Overfitting typically tends to increase the variance while underfitting tends to increase the bias. Since the periodogram may be regarded as a representation of the raw data in the frequency domain, it provides a perfect fit. Clearly, smoothing compromises this fit. On the other hand, it is also not possible to improve the perfect fit by the introduction of additional periodogram ordinates at non-Fourier frequencies. These new ordinates are, in a certain sense, just interpolations of the original periodogram ordinates. Their inclusion therefore brings about some kind of minimal local smoothing which has the big advantage that it does not systematically have a negative impact on the bias. This advantage is particularly important when estimates obtained from separate samples of fixed size are combined by averaging because in this case only the variance decreases as the number of samples increases but the bias remains fixed.
With the help of the R-package 'fracdiff', 40,000 realizations of length n = 390, 3000 of ARFIMA(1,d,0) processes with standard normal innovations and parameter values d = −0.25, −0.1, 0, 0.1, 0.25 and 1 = −0.25, −0.1, 0, 0.1, 0.25 , respectively, are generated using a burn-in period of 40,000. For each realization, Fast computation and practical use of amplitudes at non-Fourier… the memory parameter d is estimated with the estimators d GPH , d tr , d sm , and d 2 , which use only the conventional periodogram, and their counterparts d + GPH , d + tr , d + sm , and d + 2 , which use also the modified periodogram at fractional Fourier frequencies. Tables 1 and 2, 3 and 4, 5 and 6 give the sample bias, the sample variance, and the root mean square error for the sample sizes n = 390 and n = 3000 , respectively. The smaller sample size corresponds to the number of minutes in a regular trading session for U.S. stocks, which starts at 9:30 a.m. and ends at 4:00 p.m. The parameter K, which determines the highest frequency to be used for estimation, is set to K = n , where = 0.5.
The positive effect of including the fractional Fourier frequencies is obvious. In each of the 200 cases (25 models, 4 types of estimators, 2 sample sizes), the  Tables 3, 4). This improvement comes at the cost of a slightly increased sample bias (see Tables 1, 2). When both the sample bias and the sample variance are taken into account, the effect is still positive. In all 200 cases, the RMSE of the original estimator is larger than that of its modified counterpart. Clearly, the latter estimator will become less competitive when averages of several estimates are considered because the variance term in the RMSE will become less important as the number of individual estimates increases.  Fast computation and practical use of amplitudes at non-Fourier… Greene and Fielitz (1977) used the R/S statistic (see Hurst 1951;Mandelbrot and Wallis 1969;Mandelbrot 1972Mandelbrot , 1975, which is defined as the ratio of the range (R) of all partial sums of a time series to its standard deviation (S), in order to verify Mandelbrot's (1971) suspicion that the strength of the statistical dependence of stock prices may decrease very slowly. Indeed, they found indications of long-range dependence when they investigated daily stock return series. However, Lo (1991) argued that the R/S statistic cannot distinguish between shortrange dependence and long-range dependence and proposed therefore a simple generalization of the R/S statistic that is robust to general forms of short-range dependence. Using this modified R/S statistic, he found little evidence in favor of long-range dependence in daily and monthly index returns. Similarly, Barkoulas and Baum (1996) found no convincing evidence of long-range dependence when they applied the log periodogram regression method of Geweke and Porter-Hudak (1983) to daily U.S. stock returns and index returns. Negative results were also obtained for international data by Cheung and Lai (1995) with both modified R/S analysis and log periodogram regression and by Crato (1994) with parametric methods (ARFIMA models). In contrast to signed returns, absolute returns and squared returns actually do appear to exhibit significant long-range dependence (see Crato and de Lima 1994;Lobato and Savin 1998;Grau-Carles 2000).

3
Fast computation and practical use of amplitudes at non-Fourier… When high-frequency data are available, realized variances (sums of squared intraday returns) can be used instead of squared daily returns. Alternatively, the unaggregated squared intraday returns can be investigated right away. The latter approach has the advantage that the sample size is many times greater than the number of trading days. A disadvantage is that there are usually gaps between the individual trading sessions, which make it necessary to estimate the memory parameter d separately for each trading session and compute the final estimate by averaging the individual estimates (see . In this case, it is important to use an estimator with a small bias because the variance decreases with the number of trading sessions but the bias remains fixed. Of course, it might also be interesting to adopt the same approach for the signed intraday returns. In Fig. 1, the  Figure 1a, b suggests that the memory parameter is close to zero for the signed returns and somewhere between 0.2 and 0.3 for the transformed absolute returns. The discrepancies between the results obtained with the original estimators and the modified estimators, respectively, are relatively small. In case of the GPH-estimator, Secondly, the usual orthogonality conditions are only satisfied for the regular Fourier frequencies, which raises the question whether the standard definition of the periodogram is still meaningful in the general case. In this article, we address both problems. We propose to first compute the naïve sine and cosine transforms for the fractional Fourier frequencies with a modified version of the Fast Fourier Transform and then to amend these transforms by taking the violation of the standard orthogonality conditions into account. The computational efficiency of the second stage is due to the fact that a large number of auxiliary quantities only need to be computed once because they do not depend on the data. We have carried out an extensive simulation study in order to investigate the effect of the inclusion of the fractional Fourier frequencies on the performance of various estimators. The results show that the overall effect in terms of RMSE is always positive which is due to a significant reduction in the variance and only a slight increase in the bias. These findings are corroborated by the results of an empirical study of financial high-frequency data. In this study, the variances of the modified estimators, which use also fractional Fourier frequencies, are always smaller than those of their conventional counterparts. Clearly, little can be said about the size of the bias because the true value of the memory parameter is unknown in practice. However, all competing estimators, regardless which frequencies are used, unanimously agree that significant long-range dependence is present only in the intraday volatility but not in the signed intraday returns.
Funding Open Access funding provided by University of Vienna.

Data availability
The data were downloaded from Lobster (https ://lobst erdat a.com).

Conflict of interest The authors declare no conflict of interest.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creat iveco mmons .org/licen ses/by/4.0/.