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

What to expect when you are the SPX

mrivera

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 are 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

Stochastic portfolio theory, revisited!

P. López

26/07/2017

No Comments
Stochastic portfolio theory, revisited!

I’m here today to talk about the Stochastic Portfolio Theory (SPT).

SPT is a relatively new portfolio management theory.  It was first introduced in 1999 by Robert Fernholz. In my opinion, SPT is very attractive for several reasons: it’s theoretical, it’s not very well known and, most importantly, it’s cool.

Let’s begin this post with a gentle introduction to the topic.

This theory is all about defining and studying investment strategies from the perspective of stochastic calculus. This branch of mathematics studies the characteristics of stochastic processes. So a good starting point is:

 

What’s a stochastic process?

A stochastic process, as fancy as it sounds, is just a collection of random variables, usually indexed in a certain way, (frequently, by time). So at each point of time we have a realisation of a random variable. As an example, a geometric Brownian motion is a stochastic process widely used in finance. Under this model, asset returns are a normal random walk. As such, the dynamics of the process can by specified by the following stochastic differential equation:

\( dS = \mu S dt +  \sigma S dX \)

Where \(S\) is the stock price process with mean return \(\mu\) and volatility \(\sigma\).

If we simulate several realisations of this process, we get:

Geometric brownian, stochastic process

As you can see, the results actually look much like what you’d expect in a financial asset in terms of feel-and-look, but of course, these simulations have a lot of differences and limitations in terms of statistical properties (check out this post on Levy flights).

 

Diversity-weighted portfolios

 

The SPT theory assumes that stock market capitalisations (or prices, if we assume that the number of outstanding shares is one), follow a general stochastic process that fulfils a set of mathematical conditions.

The theory proposes ways of generating portfolios of these assets (modelled as stochastic processes) and then analyses the characteristics of these theoretical portfolios.

The best example of these portfolios are diversity-weighted portfolios. These portfolios are built by assigning weights according to the following function:

\( \pi_i = \frac{\mu_i^p}{\sum \mu_i^p}\)

Where \(\mu_i(t) := \frac{X_i(t)}{X_1(t) + … + X_n(t)}\) is the capitalisation share of asset i, \(\pi_i\) is the new weight assigned to the asset and \(p\) is a hyper-parameter of the investment function that is crucial for the performance of the strategy.

In layman terms, the diversity-weighted approach (for the case of negative p), assigns weights inversely proportional to market capitalization, overweighting small companies over big ones.

Surprisingly enough, under certain conditions, Fernholz proves that a portfolio built in such a way outperforms the capitalisation-weighted index –wait for it… – with probability one!

As appealing as it might sound, this portfolio just exploits a mix of a mean-reversion operative at the market level, and the effect of the small minus big factor.

All in all, this result is extremely interesting for an investment strategist, and also poses the question of how to solve the inverse problem. That is, of finding general investment functions that match our investment objectives.

 

The inverse problem

Fortunately enough, Kom Samo and Vervuurt introduce, in a recent paper, a Bayesian approach to learning this kind of functions for stock portfolios using random gaussian processes to model the objective investment strategy.

The idea behind their approach is that, by assigning a specific probability distribution to the results we want to obtain, we can force the distributions of the learnt parameters to meet our investment objective.

This is a very interesting idea that can be generalised without limits! To carry out a small test let’s imagine building a trading strategy over only one series (EURCHF currency cross for this example).

We want to find a function that maps the value of some features (macroeconomic, financial and technical indicators) at a given point in time to the position that should be kept for the next day.

\(X^d \rightarrow f\) with \( f\in [-1, 1] \)

where \(f\) is the daily position of the strategy.

To train that function, a Bayesian neuron with tanh activation function is perfect, because it’s naturally bounded between -1 and 1:

\(f = tanh(\beta ^T \cdot X)\)

We can now set normal priors on the betas and uninformative priors on the means of the betas. The last step to train our investment strategy would be computing our objective investment function from the positions and placing a prior on it.

A good investment objective is the well-known Sharpe Ratio, that with a small modification can be used to try to match some objective performance:

\( SR = \frac{mean – obj}{std} \cdot \sqrt{261} \)

Finally, we place a (very greedy) normal prior distribution over the Sharpe ratio with mean=3, standard deviation=1, using  a 30% annualised return as an objective.

Running 2500 simulations with the pyMC3 package for python, we obtain the following posterior distributions over the variables of our model:

MCMC, bayesian sampling

As we can see, the results aren’t very encouraging at first glance. The uncertainty of the estimations on the \(\beta\) is huge, and the posterior of the objective function (SR) takes negative values!

However, it’s worth noting that our objective was extremely greedy, so there’s still room for some hope.

 

The results of the learnt strategy

By taking the average of the means of our coefficients (the betas), we can get the cumulative performace of the strategy:

Cumulative performance, in-sample graph

It looks great, but playing in-sample is cheating, so let’s check the out-sample performance:

Cumulative performance, out-sample graph

As usual, out-sample performance of the learnt strategy is worse.

Finally, we can check the robustness of our results. The nice thing about having many sample strategies of our posterior distribution is that we can take a look at the different realisations of the trading function we have learnt:

All insample cumulative performances graph

The realisations of our strategy are quite random, but not very volatile. They have just enough positive bias to light the candle of hope in our little profit-seeking hearts…

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

add a comment

wpDiscuz