Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.
Prochain SlideShare
Chargement dans…5
×

• Full Name
Comment goes here.

Are you sure you want to Yes No
• Identifiez-vous pour voir les commentaires

• Soyez le premier à aimer ceci

3. 3. 3.1 Trend Model The observed time series is split into ﬁxed time-length intervals, for example one day for regressor, and three hours for prediction. We cannot directly work with these raw data, we have to realize a functional clustering and a smoothing of these data with splines. We will work with spline coeﬃcient vectors as variables in our models. Let be gi(t) the hidden true value for the curve i at time t (asset prices) and gi , yi and i, the random vectors of, respectively, hidden true values, measurements and errors. We have: yi = gi + i, i = 1, · · · , N , (1) where N is the number of curves. The random errors i are assumed i.i.d., uncorrelated with each other and with gi. For the trend forecasting, we use a functional clustering model on a q-dimensional space as: yi = Si λ0 + Λ αki + γi + i with k = 1, · · · K clusters. (2) In these equations: • yi are the values of curve i at times (ti1, ti2, · · · , tini ); • ini is the number of observations for curve i; • i ∼ N(0, R); γi ∼ N(0, Γ); • Λ is a projection matrix onto a h-dimensional subspace with h ≤ q; • Si = s(ti1), · · · , s(tini ) T is the spline basis matrix for curve i : Si =    s1(t1) · · · sq(t1) ... ... ... s1(tni ) · · · sq(tni )    . (3) The term αki is deﬁned as: αki = αk if curve i belongs to cluster k, where αk is a repre- sentation of the centroid of cluster k in a reduced h-dimensional subspace: αk = αk1, αk2 . . . αkh T . (4) Then we have : • s(t)T λ0: the representation of the global mean curve, • s(t)T (λ0 + Λαk): the global representation of the centroid of cluster k, • s(t)T Λαk: the local representation of the centroid of cluster k in connection with the global mean curve, • s(t)T γi: the local representation of the curve i in connection with the centroid of its cluster k. 3
4. 4. 3.2 Stopping Time Model The observed time series is split into ﬁxed time-length intervals of three hours and we realize a functional clustering and a spline smoothing of this raw data set. We use the spline coeﬃcient vectors as measurement in a Dynamic State Space model. In the test phase every day at 11:00 we realize a trading, thus we must run the model every three hours interval, that means each day at 11:00 and 14:00. For trading without stop loss, we have regular time intervals of three hours, thus we use discrete time equations for state and measurements, see Fig.(2). For trading with stop loss, after the stopping time prediction at 11:00, every ten minutes we rerun the trend prediction model. According to the result, we could have to rerun the stopping time model. In this case, we do not have regular time intervals of three hours anymore, and we must use a continuous time equation for state and a discrete time equation for measurements, see Fig.(3). Figure 2: Trading without stop loss. Figure 3: Trading with stop loss. 3.3 Trading Model without "Stop Loss" order We use a non-stationary, nonlinear Discrete Time Model in a Dynamic State Space repre- sentation formalized by: xk = fk(xk−1) + vk (5) yk = hk(xk) + nk, (6) For fk and hk functions, we will use a parametric representation by Radial Basis Functions Network (RBFN) because they possess the universal approximation property, see (Haykin, 1999). fk(xk) = I i=1 λ (f) ik exp − 1 σ (f) ik (xk − c (f) ik )T (xk − c (f) ik ) (7) hk(xk) = J j=1 λ (h) jk exp − 1 σ (h) jk (xk − c (h) jk )T (xk − c (h) jk ) . (8) In these equations: 4
5. 5. • xk is the state, without economic signiﬁcation, • yk is the observation, the spline coeﬃcient vector of the smoothing of past raw three hours data, • Eq. (5) is the state equation, • Eq. (6) is the measurement equation, • vk is the process noise, with vk ∼ N(0, Q), • nk is the measurement noise, with nk ∼ N(0, R), • I is the number of neurons in the hidden layer for function fk, • c (f) ik is the centroid vector for neuron i, • λ (f) ik are the weights of the linear output neuron, • σ (f) ik are the variances of clusters, • J is the number of neurons in the hidden layer for function hk, • c (h) jk is the centroid vector for neuron j, • λ (h) jk are the weights of the linear output neuron, • σ (h) jk are the variances of clusters. 3.4 Trading Model with "Stop Loss" order We use a non-stationary, nonlinear Continuous-Discrete Time Model in a Dynamic State Space representation: dxt = f(xt, t)dt + Lt dβt (9) yk = hk(xtk ) + nk, (10) for t ∈ {0, T}, and k ∈ [1, 2, · · · , N] such as tN ≤ T, with non-stationary, nonlinear RBF functions in state and measurement equations. f(xt, t) = I i=1 λ (f) it exp − 1 σ (f) it (xt − c (f) it )T (xt − c (f) it ) (11) hk(xtk ) = J j=1 λ (h) jk exp − 1 σ (h) jk (xtk − c (h) jk )T (xtk − c (h) jk ) . (12) In these equations: • x(t) is a stochastic state vector, without economic signiﬁcation, • yk is the observation at time tk, the spline coeﬃcient vector of the smoothing of past raw three hours data, • Eq. (9) is the diﬀerential stochastic state equation, • Eq. (10) is the measurement equation, • xt0 is a stochastic initial condition satisfying E[||xt0 ||2] < ∞, 5
6. 6. • it is assumed that the drift term f(x, t) satisﬁes suﬃcient regular conditions to ensure the existence of strong solution to Eq. (9), see (Jazwinski, 1970) and (Kloeden and Platen, 1992), • it is assumed that the function hk(x(tk)) is continuously diﬀerentiable with respect to x(t). • nk is the measurement noise at time tk, with nk ∼ N(0, R) • βt is a Wiener process, with diﬀusion matrix Qc(t), • L(t) is the dispersion matrix, see (Jazwinski, 1970). See (Dablemont, 2008) for a detailed description of these procedures and algorithms. 3.5 How to realize the forecasting The basic idea underlying these models is to use a Dynamic State-Space Model (DSSM) with nonlinear, parametric equations, as Radial Basis Function Network (RBFN), and to use the framework of the Particle ﬁlters (PF) combined with the Unscented Kalman ﬁlters (UKF) for stopping time forecasting. The stopping time forecasting derives from a state forecasting in an Inference procedure. But before running these models, we must realize a parameter estimation in a Learning procedure. 3.6 Which tools do we use for stopping time forecasting The Kalman ﬁlter (KF) cannot be used for this analysis since the functions are nonlinear and the transition density of the state space is non-symmetric or/and non-unimodal. But with the advent of new estimation methods such as Markov Chain Monte Carlo (MCMC) and Particle ﬁlters (PF), exact estimation tools for nonlinear state-space and non-Gaussian random variables become available. Particle ﬁlters are now widely employed in the estimation of models for ﬁnancial markets, in particular for stochastic volatility models (Pitt and Shephard , 1999) and (Lopes and Marigno, 2001), applications to macroeconometrics, for the analysis of general equilibrium models (Villaverde and Ramirez , 2004a) and (Villaverde and Ramirez , 2004b), the ex- traction of latent factors in business cycle analysis (Billio, et al., 2004), etc. The main advantage of these techniques lies in their great ﬂexibility when treating nonlinear dy- namic models with non-Gaussian noises, which cannot be handled through the traditional Kalman ﬁlter. 4 Experiments 4.1 Data We illustrate the method on the IBM stock time series of "tick data" for the period starting on January, 03, 1995 and ending on May, 26, 1999. We use the period from January, 04, 1995 to December, 31, 1998 for training and validation of the models, and the period from January, 04, 1999 to May, 26, 1999 for testing. We use "bid-ask" spreads as exogenous inputs in the pricing model, and transaction prices as observations in pricing and trading models 6