Intra-day variability of the stock market activity versus stationarity of the financial time series
aa r X i v : . [ q -f i n . S T ] A ug Intra-day variability of the stock market activity versus stationarityof the financial time series
T. Gubiec ∗ and M. Wili´nski † Institute of Experimental Physics,Faculty of Physics, University of WarsawPasteura 5, PL-02093 Warsaw, Poland
We describe the impact of the intra-day activity pattern on the autocorrelation functionestimator. We obtain an exact formula relating estimators of the autocorrelation functionsof non-stationary process to its stationary counterpart. Hence, we proved that the dayseasonality of inter-transaction times extends the memory of as well the process itself as itsabsolute value. That is, both processes relaxation to zero is longer.
PACS numbers: 89.65.Gh, 89.20.-a, 05.40.-a, 02.50.Ey
I. INTRODUCTION
Time series of logarithmic price returns are commonly used in a broad range of financial analysis.Recently, the intra-day type of this data focused a particular interest. While using many differenttypes of estimators and models, it is often assumed, directly or indirectly, that underlying processesare stationary. Unfortunately, it is not the case for financial time series, even for their logarithmicreturns. There are at least few well known reasons against financial data stationarity. One of themis volatility clustering , a positive autocorrelation observed for different measures of volatility. Thiseffect was described among others by Tsay [1], Cont [2] and Guillaume et al. [3]. Complementaryaspect, more closely associated to this work, are different types of seasonalities, that can be seenin various time scales. In a year scale we have for example ”Santa Claus rally” which is associatedwith rise of stock prices in December. We can also observe seasonalities in month and week scalebut a major example is so called ’lunch effect’ or intra-day pattern which refers to day trading andis characterized by high volatility and short inter-trade times right at the beginning of the sessionand just before closing of the quotations, and significantly lower volatility in the middle of theday. Intra-day changes of the activity on stock market is a well-known empirical fact observed allaround the world on different types of market. More details can be found in Hasbruck [4], Chan et al. [5], Gen¸cay et al. [6], Admati and Pfleiderer [7].Previously, the research focused mainly on the variability and seasonality of volatility. Part ofit measured theirs impacts and removed their effect from the data [8]. Such an approach doesn’taffect time intervals between trades at all, while the range of average inter-trade time is greater thanthe range of standard deviation of returns (see Fig. 1 for details). Other commonly used approachto this problem is a restriction of the data to the so called event time representation. However, by ∗ Electronic address: [email protected] † Electronic address: [email protected] . . . . KGHM: 2005 − 2010
Time9:00 10:20 11:40 13:00 14:20 15:40 average log returns standard deviationaverage time interval . . . . PKOBP: 2005 − 2010
Time9:00 10:20 11:40 13:00 14:20 15:40 average log returns standard deviationaverage time interval
FIG. 1: Intra-day seasonality in both standard deviation and inter-transaction times calculated in 20 minutestime intervals (both averaged over days and then divided by their mean, in order to make them comparable),shown for two companies listed at Warsaw Stock Exchange. In both cases, we observe that average timeinterval doubled or even tripled its value, whereas average standard deviation of price returns changed notmore then several dozen percents. Results on the left were obtained by using all transactions for KGHM inyears 2005-2010. The second plot concerns PKOBP in the same period. It should be pointed out that from2005 to 2010 WSE was open for 7 hours. using this method, we would not be able to draw any conclusion on the time dependence.The aim of this work, is to find how the intra-day seasonality, observed in the inter-transactionstime intervals, affects the autocorrelation of the time series. We propose the systematic analyticalapproach to the time transformation, which eliminates this seasonality from analyzed process.Below, we focus on the impact of the inter-transaction time seasonality on the estimators of theautocorrelation functions. Although, taking into account the variability of standard deviation ofprice returns is possible, in this paper we focus on the impact of the former effect.
II. ANALYSIS
The intra-day pattern can be visualized by the number of trades executed in subsequent pe-riods of time during the day. Equivalently, this can be shown by the average time gaps betweentransactions in these periods of time, as it is shown in Fig. 1. The average is taken, herein, overthe statistical ensemble of days and inside the chosen period of time.We propose two different functions to describe how average interval between trades changesover time. Then, we use these functions to transform price returns process in order to dispose itsseasonality. Hence, we find a relationship between autocorrelation functions of the process beforeand after the transformation.
A. Analytical form of day seasonality
We can assume the relationship between a clock time and average inter-trade interval in afunctional form. We introduce two different functions to describe this relationship: θ (1) ( t ) = a ( t − t )( t − t ) and θ (2) ( t ) = 1 a (( t − p ) + q ) . (1)The first of them is a quadratic function driven by parameters a , t and t . The second functionis a rational one driven by parameters a , p and q .Let us assume that Y ( t ) (representing the quantity which autocorrelation we analyze) is aprocess with a seasonality described above. This process represents e.g. returns and their absolutevalues. Furthermore, we assume that there exist an underlying process X ( τ ), which is ergodic andtherefore stationary (without seasonalities). By term ’underlying’ we mean a direct relationshipbetween X ( τ ) and Y ( t ), that is described by relation: Y ( t ) = g ( t ) X ( τ ( t )) , (2)where τ = τ ( t ) is responsible for presence of seasonality in apparent process Y ( t ). In our case t ∈ [0 , T ], where t = 0 is the beginning of trading day and t = T is the end of quotations. Werequire our transformation τ ( t ) to preserve the day length and to change the time intervals only,which leads to τ ( t ) : [0 , T ] → [0 , T ], where τ (0) = 0 and τ ( T ) = T . Also, the number of events(transactions) is the same for both processes. Hence, the daily average time intervals betweentransactions are equal in time space t and τ , i.e. h t i = h τ i .Function τ ( t ) is strictly related to the time dependent average inter-transaction time, that isto function θ ( t ). The average inter-trade interval for X ( τ ) should be constant and equal h τ i .Therefore, we stretch the time-line t when average intervals are small and compress it when theseintervals are too long. As θ ( t ) is the function that determines average trade interval for process Y ( t ), we can write: dtθ ( t ) = dτ h τ i , (3)where, as said above, h τ i = h t i is an average inter-trade interval for both Y ( t ) and X ( τ ). Byintegrating both sides of this equation we obtain the relationship between t and τ : τ ( t ) = h t i Z t θ ( s ) ds. (4)When analyzing empirical data, day length T and the number of transactions are known and wecan easily calculate h t i . Substituting θ (1) and θ (2) into Eq. (4) we get h t i (1) = aT ( t − t )ln (cid:16) ( T − t ) t ( T − t ) t (cid:17) and h t i (1) = 1 a (cid:16) T − pT + p + q (cid:17) . (5)In both cases the constraints above allow us to reduce the number of parameters in θ s to two. Fig.2 shows θ (1) ( t ) and θ (2) ( t ) fitted both to KGHM and PKOBP. The only fitted parameters are t , t for θ (1) and p , q for θ (2) , as parameter a is determined by using Eq. (5) and the empirical averagetime. TABLE I: Parameters fitted to tick data from http://bossa.pl/.
Variability function θ Parameters KGHM: 2005-2010 PKOBP: 2005-2010Quadratic t -1640.65 -2485.34 t Rational p q · · h t i Time A v e r age i n t e r − t r an s a c t i on t i m e [ s ] KGHM: 2005 − 2010 rational function q (1) quadratic function q (2) Time A v e r age i n t e r − t r an s a c t i on t i m e [ s ] PKOBP: 2005 − 2010 rational function q (1) quadratic function q (2) FIG. 2: Graph of intra-day pattern, for instance, for KGHM and PKOBP (black circles) with imposedfunctions θ (1) and θ (2) (solid and dashed curves, respectively). B. Estimator of autocorrelation function
When analyzing autocorrelation of empirical data, it is usually estimated with moving average.This estimation, in terms of the stochastic process Y ( t ), can be described in an integral form asfollows: C Y (∆ t ) = 1 T − ∆ t Z T − ∆ t (cid:16) h Y ( t + ∆ t ) Y ( t ) i − h Y ( t + ∆ t ) ih Y ( t ) i (cid:17) dt, (6)where C Y is an estimator of autocorrelation function of process Y at fixed lag ∆ t . Brackets h·i represent an average over statistical ensemble. Naturally, if the process Y ( t ) is ergodic, theestimator (6) converges to the real autocorrelation function of the process Y ( t ). By applying Eq.(2) and using stationarity of X ( τ ) (its autocorrelation is a time invariant quantity), we get: C Y (∆ t ) = 1 T − ∆ t Z T − ∆ t g ( t + ∆ t ) g ( t ) C X ( f ( t + ∆ t ) − f ( t )) dt. (7)It is convenient to denote ∆ τ ( t, ∆ t ) = τ ( t + ∆ t ) − τ ( t ) and to have the above integral over d ∆ τ ,instead of dt . By substitution t → t (∆ τ, ∆ t ) we get C Y (∆ t ) = Z ∆ τ max ∆ τ min X i W i (∆ τ, ∆ t ) C X (∆ τ ) d ∆ τ, (8) − . − . . . Time lag [s] A u t o c o rr e l a t i on KGHM: 2005 − 2010 price returnsabs of price returns − . . . . Time lag [s] A u t o c o rr e l a t i on PKOBP: 2005 − 2010 price returnsabs of price returns
FIG. 3: Estimators of velocities autocorrelations of price returns and their absolute values, for KGHM andPKOBP in years 2005-2010. where ∆ τ min and ∆ τ max are the integration limits in ∆ τ space, whereas: W i (∆ τ, ∆ t ) = 1 T − ∆ t g ( t i (∆ τ, ∆ t ) + ∆ t ) g ( t i (∆ τ, ∆ t )) (cid:12)(cid:12)(cid:12)(cid:12) dt i d ∆ τ (cid:12)(cid:12)(cid:12)(cid:12) . (9)Index i corresponds to different subsections of [0 , T ], where ∆ τ ( t ) is injective and therefore in-vertible. Now, we can consider the estimator of autocorrelation of non-stationary process Y asweighted mean of autocorrelation of stationary underlying process X . Furthermore, having thenormalization condition: Z ∆ τ max ∆ τ min X i W i (∆ τ, ∆ t ) d ∆ τ = 1 , (10)we can write C Y = h C X i ρ ∆ t , where probability distribution function ρ ∆ t (∆ τ ) def.= P i W i (∆ τ, ∆ t ).By means of this pdf way we are able to express the non-stationary estimator by the stationaryone by probabilistic approach. As we focus only on the impact of inter-transaction time variabilityon the autocorrelation estimators, we assume further in this text g ( t ) = 1. C. Seasonality impact
In the previous section, we found the relation between estimators of the autocorrelation func-tions of the processes Y and X , and their absolute values. The question arises: how does seasonalityquantitatively affect observed estimators of autocorrelation? Let us start with some basic charac-teristics of autocorrelations observed in financial markets. Fig. 3 shows autocorrelations of velocityestimators obtained for KGHM and PKOBP from 2005 to 2010. In order to obtain these quanti-ties, we use the slotting method [9]. Apparently, the autocorrelation function is negative (exceptof ∆ t = 0, where it equals 1), increasing and concave for price returns but positive, decreasing andconvex for price returns absolute values.Furthermore, we use Jensen’s inequality, which holds for every random variable Z and anyconcave function f : h f ( Z ) i ≤ f ( h Z i ) . (11)For the convex function f the inequality is opposite. As in our case f = C X and the probabilitydistribution is ρ ∆ t , we obtain: C Y (∆ t ) = Z ∆ τ max ∆ τ min X i W i (∆ τ, ∆ t ) C X (∆ τ ) d ∆ τ ≤ C X X i Z ∆ τ max ∆ τ min ∆ τ W i (∆ τ, ∆ t ) d ∆ τ ! . (12)Next, we use the monotonicity of the autocorrelation function for time lag ∆1 >
0. We verifywhether the argument of the autocorrelation of the process X , in the last expression of aboveinequality, is smaller than ∆ t . We analyze empirical values of the following function: ω (∆ t ) = 1∆ t Z ∆ τ max ∆ τ min ∆ τ ρ ∆ t (∆ τ ) d ∆ τ. (13)In cases of KGHM and PKOBP, for both θ (1) and θ (2) , we obtain plots of ω (∆ t ) presented in Fig.4. These results (and analogous analysis, made by us, for several other stocks) allow the conclusionthat ω (∆ t ) is the decreasing function and equals 1 for ∆ t = 0. Hence, for increasing and concaveautocorrelation functions we get: C Y (∆ t ) ≤ C X (∆ t ) , (14)where the equality holds for ∆ t = 0. Obviously, without loss of generality, we can normalize bothautocorrelations. Then, we obtain C Y (0) = C X (0) = 1 and what is even more significant:lim ∆ t + → C Y (∆ t ) = lim ∆ t + → C X (∆ t ) . (15)In order to formally carry out the same reasoning for the absolute value of the price returnsprocess, we need to use Jensen’s inequality for convex function. As mentioned above, the autocor-relation function of absolute values of returns are positive, decreasing, and convex. As a result, weobtain an opposite inequality for autocorrelations of processes X and Y (the equality still holdsfor ∆ t = 0). III. CONCLUDING REMARKS
The main result of this work is the exact relation (8) between autocorrelation function estimatorsof seasonal (non-stationary) and stationary process. Furthermore, we found that for financialtime series, by adding seasonality of time intervals the memory of underlying process is extended.Fortunately, it does not create any additional autocorrelations making the relaxation time to zerolonger. Notably, all our calculations assume nothing about processes X and Y , except stationarityof the process X and the relation (2) between them. Such an approach can be used in a broadrange of problems and not only analysis of financial data. Besides, it also applies to absolute valuesof those processes. . . . D t [s] w ( D t ) KGHM: 2005 − 2010 rational function q (1) quadratic function q (2) . . . D t [s] w ( D t ) PKOBP: 2005 − 2010 rational function q (1) quadratic function q (2) FIG. 4: Functions ω (∆ t ) defined in Eq. (13) for KGHM and PKOBP, calculated by using quadratic functions θ (1) (dashed curve) and rational functions θ (2) (solid curve). Acknowledgments
We would also like to thank Professor Ryszard Kutner for his scientific guidance, productivediscussions and helpful remarks. The publication was financially supported by Foundation forPolish Science. [1] Tsay, R. S.,
Analysis of Financial Time Series.
Wiley. com, 2002, .[2] Cont, R.,
Empirical properties of asset returns: stylized facts and statistical issues.
Quantitative Finance:Institute of Physics Publishing, 2001, , 223-–236.[3] Guillaume, D. M., Dacorogna, M., Dav´e, R. R., M¨uller, U. A., Olsen, R., and Pictet, O., From thebird’s eye to the microscope: A survey of new stylized facts of the intra-daily foreign exchange markets.
Finance and stochastics, 1997, , 95–129.[4] Hasbrouck, J.,
Empirical market microstructure: The institutions, economics and econometrics of secu-rities trading.
New York: Oxford University Press, 2007, .[5] Chan, K. C., Christie, W. G., and Schultz, P. H., Market structure and the intraday pattern of bid-askspreads for NASDAQ securities.
Journal of Business, 1995, 35–60.[6] Gen¸cay, R., Dacorogna, M., Muller, U. A., Pictet, O., and Olsen, R.,
An introduction to high-frequencyfinance.
Access Online via Elsevier, 2001.[7] Admati, A., and Pfleiderer, P.,
A theory of intraday patterns: Volume and price variability.
Review ofFinancial Studies, 1988, , 3–40.[8] Amaral, L. A., Cizeau, P., Gopikrishnan, P., Liu, Y., Meyer, M., Peng, C. K., and Stanley, H. E., Econophysics: can statistical physics contribute to the science of economics?
Computer physics commu-nications, 1999, , 145–152.[9] Gubiec, T., and Kutner, R.,
Backward jump continuous-Time random walk: An application to markettrading.
Phys. Rev. E, 2010,82