post list
QuantDare
categories
asset management

“Past performance is no guarantee of future results”, but helps a bit

ogonzalez

asset management

Playing with Prophet on Financial Time Series (Again)

rcobo

asset management

Shift or Stick? Should we really ‘sell in May’?

jsanchezalmaraz

asset management

K-Means in investment solutions: fact or fiction

T. Fuertes

asset management

How to… use bootstrapping in Portfolio Management

psanchezcri

asset management

Playing with Prophet on Financial Time Series

rcobo

asset management

Dual Momentum Analysis

J. González

asset management

Random forest: many is better than one

xristica

asset management

Using Multidimensional Scaling on financial time series

rcobo

asset management

Comparing ETF Sector Exposure Using Chord Diagrams

rcobo

asset management

Euro Stoxx Strategy with Machine Learning

fjrodriguez2

asset management

Hierarchical clustering, using it to invest

T. Fuertes

asset management

Lasso applied in Portfolio Management

psanchezcri

asset management

Markov Switching Regimes say… bear or bullish?

mplanaslasa

asset management

Exploring Extreme Asset Returns

rcobo

asset management

Playing around with future contracts

J. González

asset management

BETA: Upside Downside

j3

asset management

Approach to Dividend Adjustment Factor Calculation

J. González

asset management

Are Low-Volatility Stocks Expensive?

jsanchezalmaraz

asset management

Predict returns using historical patterns

fjrodriguez2

asset management

Dream team: Combining classifiers

xristica

asset management

Stock classification with ISOMAP

j3

asset management

Could the Stochastic Oscillator be a good way to earn money?

T. Fuertes

asset management

Correlation and Cointegration

j3

asset management

Momentum premium factor (II): Dual momentum

J. González

asset management

Dynamic Markowitz Efficient Frontier

plopezcasado

asset management

‘Sell in May and go away’…

jsanchezalmaraz

asset management

S&P 500 y Relative Strength Index II

Tech

asset management

Performance and correlated assets

T. Fuertes

asset management

Reproducing the S&P500 by clustering

fuzzyperson

asset management

Size Effect Anomaly

T. Fuertes

asset management

Predicting Gold using Currencies

libesa

asset management

Inverse ETFs versus short selling: a misleading equivalence

J. González

asset management

S&P 500 y Relative Strength Index

Tech

asset management

Seasonality systems

J. González

asset management

Una aproximación Risk Parity

mplanaslasa

asset management

Using Decomposition to Improve Time Series Prediction

libesa

asset management

Las cadenas de Markov

j3

asset management

Momentum premium factor sobre S&P 500

J. González

asset management

Fractales y series financieras II

Tech

asset management

El gestor vago o inteligente…

jsanchezalmaraz

asset management

¿Por qué usar rendimientos logarítmicos?

jsanchezalmaraz

asset management

Fuzzy Logic

fuzzyperson

asset management

El filtro de Kalman

mplanaslasa

asset management

Fractales y series financieras

Tech

asset management

Volatility of volatility. A new premium factor?

J. González

asset management

What to expect when you are the SPX

mrivera

04/05/2017

No Comments
What to expect when you are the SPX

The S&P 500 index (SPX) is an American market index based on the stocks of 500 large companies. It’s one of the world’s most important market indexes and, therefore, predicting its movements is the goal of many finance analysts. In previous posts we have reproduced the SPX through clustering of stocks or even through powerful autoregressive models. In this case, providing an algorithm to predict the movements of the index is out of the scope of this post. However, we can at least narrow the range of expected future movements. I will focus on the expected weekly logarithmic returns, although the same analysis can be easily extrapolated to any other time window.

As the SPX 5-day logarithmic returns seem random, predicting them is a major challenge. However, we can observe some subtle structure in this chaos. The mean weekly returns size seems to cluster over time, with periods of higher and lower volatility. Since the series appears to be random, to calculate a range of expected values I simulated this randomness. However, not all randomness are made equal and the range of expected movements is not constant over time. So the final problem I would like to solve here is whether there is a way to define a dynamic range of expected movements over time.
SPX weekly logarithmic returns
The answer is yes. There is a way to define a dynamic range of randomly expected movements for the 5-day logarithmic returns of SPX.

Random walk

The technique that I used to define expected movements is to compare to simulated random movements. To do so, I used a model called random walks. Random walks move a given number of steps in random directions–up or down for the index–for given step sizes. Therefore, we need 3 parameters to define our randomness: number of steps, the probability of going up or down, and step sizes.

Number of steps

In our simulations, we will give 1 step per day. Since we want to simulate weekly trajectories this choice is trivial; we will run 5-step simulations that represent a week of the index.

Probability of going up

The probability of going up changes over time. It may be approximated by the fraction of upwards movements in a given period of time, disregarding how strong those movements actually were. I chose the previous 2.5 years to compute this parameter. When the probability of going up is 0.5, it means that up and down movements are equally probable.

Probability of going up

Step sizes

The step size indicates how much to move in a given direction. Because upwards and downwards movements are not perfectly symmetrical, I used a different time step when moving up or down. The upwards step size is computed as the mean of the positive daily movements in the previous 2.5 years, green. The downwards step size is computed as the mean of the negative daily movements in the previous 2.5 years, red.

Upwards and downwards movements

Simulations

Once we have computed all the necesary parameters we can run the random walk simulations. The algorithm to run the simulated 5-day movement is as follows:

  • Compute the probability of going up: ppos as the fraction of positive movements in the previous 2.5 years.
  • Compute positive step size pstep as the mean upwards movement in the previous 2.5 years and the negative step size nstep as the mean downwards movement in the previous 2.5 years. Please notice that nstep is a negative number.
  • Compute the 5-day movement as:

\(movement=r_{B(5,ppos)} \cdot (pstep-nstep)+5\cdot nstep\)

    where \(r_{B(5,ppos)}\) is a random number from the binomial distribution with n=5 and probability ppos.

Expected movements

To finally define the range of expected movements I simulated 10,000 random 5-day trajectories that the SPX could have taken for each day. These trajectories could go up or down so I called expected movements all the movements larger than the bottom 1% of the simulations and smaller than the top 99% of simulated movements. (Please be aware that the movements keep their sign at all times).
Expected movements
Although the range of expected values over time is slightly delayed–because it computes the values of the parameters with past information–it still captures the randomness limits. So random walk simulations give us a dynamic range of expected values over time. Now it’s up to you to predict the extraordinary events, because after all, knowing what to expect is not as fun as dealing with the unexpected.

Good luck in your adventure!

Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Email this to someone

add a comment

wpDiscuz