Quant Mashup - Quant Dare

More examples in Financial Visualisation [Quant Dare]

In line with the previous post Group Funds with the Sun we continue exploring new ways to visualise and analyse financial data. We will take annual data from the current components of Dow Jones Industrial with data going back to 2000 to play around. Animated Risk – Return scatter Risk-Return

*- 3 hours ago, 12 Dec 2018, 09:44pm -*

Deep Reinforcement Trading [Quant Dare]

Deep Reinforcement Learning applications in finance are still largely unknown. Nonetheless, recent developments in other fields have pushed researchers towards exciting new horizons. I believe that there is a huge potential for Reinforcement Learning in finance. As investment guru Ray Dalio, founder

*- 2 weeks ago, 28 Nov 2018, 09:33pm -*

Estimating the probability of something that never happened [Quant Dare]

Have you ever needed to estimate the probability of a rare event? So rare that you haven’t been able to encounter it in real data? Well, what if I told you that there exists a way to calculate a statistically correct approximation. Oh, and you won’t even need a calculator! Recently I have just

*- 2 weeks ago, 22 Nov 2018, 06:43pm -*

Volcano escape with Gradient Descent [Quant Dare]

Gradient Descent is one of the most important algorithms in Machine Learning. It is an iterative method to find the minimum of a given function. That is the reason why today we will go through the intuition behind it and cover a practical application. Concepts to keep in mind Let’s start. For any

*- 1 month ago, 7 Nov 2018, 10:47am -*

Synthetic prices… and burgers [Quant Dare]

If all finance developers around the world were asked to choose the main nightmare they have to face on daily basis, I bet most of them would choose ‘overfitting’. Furthermore, imagine you have to develop an algorithm which has only one ‘ingredient’ to be modelled, only one time-series

*- 1 month ago, 1 Nov 2018, 10:05am -*

Creating our own S&P 500 Momentum ETF [Quant Dare]

Smart Beta ETFs are achieving an increasing popularity, seen as the perfect equilibrium between passive investment and active management. But, what’s the difference between them and the traditional ones? Is it possible to create our own ETF with some previous experience and without assuming higher

*- 1 month ago, 25 Oct 2018, 11:45pm -*

Scaling/ normalisation/ standardisation: a pervasive question [Quant Dare]

One of the most asked questions when dealing with several features is how you can summarise or transform them to similar scales. As you probably know, many Machine Learning algorithms demand the input features being in similar scales. But, what if they aren’t? Can we just work with raw data in the

*- 1 month ago, 18 Oct 2018, 03:04pm -*

Erratic correlation: an illustration through Chord diagrams [Quant Dare]

Let’s start with a simple question: what is the first thing to think about when you create a portfolio? I’m sure several ideas spring to mind, but let’s go to the heart of the matter: what is the relationship between the assets in a portfolio? That is one of the greatest managers’ concerns.

*- 2 months ago, 3 Oct 2018, 08:34am -*

Value at Risk or Expected Shortfall [Quant Dare]

Value at Risk and Expected Shortfall are related to the risk taken by a portfolio but… Which one is the best? Let’s learn together the differences between these two measures. Risk measures Coherence is really important when defining a risk measurement. If the measure is not coherent, it will not

*- 2 months ago, 28 Sep 2018, 10:44am -*

Practical TDD and numerical precision [Quant Dare]

The Test Driven Development (TDD) philosophy improves your productivity and helps you write better code. But if you are new at it, you might find some trouble with its procedures. Let’s dive into a simple example that (hopefully) will help you solve it. When applying TDD methodology, the objective

*- 2 months ago, 20 Sep 2018, 11:51am -*

Evening class imbalance before the war [Quant Dare]

Class imbalance can seriously damage the precision of your binary classifier. In this post you will learn some simple ways of evening the size of your classes before training to prevent your classifier from cheating. The class imbalance problem Binary classification is a very common problem in

*- 3 months ago, 12 Sep 2018, 11:06am -*

10 Reasons for loving Nearest Neighbors algorithm [Quant Dare]

I fell in love with k-Nearest Neighbors algorithm at first sight, but it isn’t blind love. I have plenty of reasons to be mad about it. 1. It’s pretty intuitive and simple Given that all you need to do is to compare samples, the Nearest Neighbors (k-NN) algorithm is a perfect first step to

*- 4 months ago, 18 Jul 2018, 04:39am -*

Hierarchical Risk Parity [Quant Dare]

Building profitable portfolios has been giving investment managers headaches for decades. Many approaches have been used up until now, some of the most well-known being Markowitz’s Efficient Frontier and Risk Parity. Today, we are presenting a brand new approach to this recurrent problem developed

*- 5 months ago, 11 Jul 2018, 05:32am -*

To be or not to be (correlated) [Quant Dare]

There are many problems that a data scientist encounters when “fighting” financial data for the first time: nothing is normally distributed, most problems are tough (low signal to noise ratio) and non-stationary high-dimensional time series are ubiquitous. In Quantdare we have spoken many times

*- 5 months ago, 5 Jul 2018, 06:52am -*

Bootstrapping time series data [Quant Dare]

For those of us working with time series, the autocorrelation function (ACF) is a fundamental tool to understand how the values in a series correlate with others certain distance away. Indeed, we could even say that autocorrelation plots (a.k.a correlogram) are probably the most common

*- 5 months ago, 28 Jun 2018, 01:48pm -*

Biclustering time series [Quant Dare]

In this post, we’ll take a brief look at biclustering algorithms. They reveal easily interpretable patterns in our data and give us more information about the links between observations and features than simpler clustering algorithms usually do. We’ve already reviewed a number of non-supervised

*- 6 months ago, 23 May 2018, 07:52am -*

Improving data diversity. Synthetic Financial Time Series Generator [Quant Dare]

When dealing with data we (almost) always would like to have better and bigger sets. But if there’s not enough historical data available to test a given algorithm or methodology, what can we do? Our answer has been: creating it. How? By developing our own Synthetic Financial Time Series Generator.

*- 7 months ago, 9 May 2018, 11:26am -*

The Elo system [Quant Dare]

My favorite moment of the film The Social Network takes place when Mark Zuckerberg asks his roommate Eduardo Saverin to explain the Elo system to him. This algorithm is used to rank chess players. At that time, Zuckerberg was developing the just-for-fun website Facemash, an early predecessor of

*- 7 months ago, 13 Apr 2018, 12:43pm -*

Isolation forest: the art of cutting off from the world [Quant Dare]

We have talked about outliers several times in this blog. Examples include how to detect them or how to transform the data to remove them. Here we have another technique to detect outliers in our big data set: the isolation forest algorithm. The idea behind the isolation forest method The name of

*- 8 months ago, 4 Apr 2018, 12:53pm -*

Demystifying the Hurst Exponent with Cryptocurrencies [Quant Dare]

Is the bitcoin market (Ethereum, Dash and Litecoin) efficient? After reading the paper, “Persistence in the cryptocurrency market”, which tries to answer that question, I was challenged by a colleague to replicate its results. This led me to write this post to highlight the great variability of

*- 8 months ago, 14 Mar 2018, 10:46am -*

Survivorship bias: an investment decision trap [Quant Dare]

Survivorship bias is one of the most common biases in finance, and it’s easy to fall victim to it. Let’s find out how to remain vigilant and overcome this hurdle. “History is written by the victors”. – Winston Churchill A cognitive bias is a consequence of subjective judgement. When it

*- 9 months ago, 21 Feb 2018, 04:30pm -*

The Kelly Criterion [Quant Dare]

Forecasting the market or the outcome of a gamble is important. Deciding how much to invest or bet based on how confident you are about the prediction is similarly as important. But don’t let the pressure get to you; the Kelly criterion is here to help us make this decision. Betting with the Kelly

*- 9 months ago, 14 Feb 2018, 01:37pm -*

Correlation with prices or returns: that is the question [Quant Dare]

Thought you knew everything about correlation? Think there’s no fooling you with the question of correlation with financial prices or returns? Well maybe, just maybe, this post will enlighten you. Correlation: the debate is on Correlation can be a controversial topic. Things can go awry when two

*- 10 months ago, 8 Feb 2018, 11:27am -*

When distance is the issue [Quant Dare]

Rankings are everywhere. They are sometimes useful and, at other times, contradicting. In such a case, we need to come up with a consensus ranking but… how do we evaluate ranking consensus? The other day I was reading about something called rank aggregation, which is just a fancy name for

*- 10 months ago, 24 Jan 2018, 03:00pm -*

Cointegration in Economy: a long-term relationship [Quant Dare]

The relationship between series can be measured by different methods. The most common is to check if both series move in the same way. We’d like to go further, and see if the difference between them is always the same. We call it cointegration. In many cases, we are interested in expressing one

*- 10 months ago, 17 Jan 2018, 01:09pm -*

Forecasting S&P 500 using Machine Learning [Quant Dare]

Is it possible to foresee the future movements of a stock? Let’s use Machine Learning techniques to predict the direction of one of the most important stock indexes, the S&P 500. Pregaming The Standard & Poor’s 500 (S&P500) is a stock market index based on the capitalization of the

*- 11 months ago, 20 Dec 2017, 12:17pm -*

Hierarchical clustering of Exchange-Traded Funds [Quant Dare]

Clustering has already been discussed in plenty of detail, but today I would like to focus on a relatively simple but extremely modular clustering technique, hierarchical clustering, and how it could be applied to ETFs. We’ll also be able to review the python tools available to help us with this.

*- 11 months ago, 13 Dec 2017, 10:33am -*

Asset allocation with constraints using Backtracking [Quant Dare]

Assigning weights to portfolio assets is challenging when we have to consider multiple constraints. Asset allocation may be seen as a constraint satisfaction problem (CSP), and some algorithms allow us to define our own restrictions and look for an optimal weight distribution. In this post, we will

*- 1 year ago, 22 Nov 2017, 09:36am -*

Risk Parity in Python [Quant Dare]

Once we are familiar with the theory surrounding Risk Parity, it’s time to put the strategy into practice and try out the algorithm for ourselves. We discover how it works, analyse the strategy and create our own portfolios. Thanks to the posts written by T.Fuertes and mplanaslasa we already know

*- 1 year ago, 8 Nov 2017, 09:37am -*

The Herd Effect in Financial Markets [Quant Dare]

Often in financial markets, as in our daily life, we imitate the decisions of predecessors, instead of analysing available information and making our own decisions. This decision imitation could lead to collective hysteria, and investment calls may be influenced by these panicked situations. Imagine

*- 1 year ago, 2 Nov 2017, 02:41pm -*

Calculate monthly returns…with Pandas [Quant Dare]

Calculating returns on a price series is one of the most basic calculations in finance, but it can become a headache when we want to do aggregations for weeks, months, years, etc. In python the Pandas library makes this aggregation is very easy to do, but if we don’t pay attention we could still

*- 1 year ago, 27 Sep 2017, 01:24pm -*

Foreseeing the future: a user’s guide [Quant Dare]

Everybody would like to see the future. If you’re a portfolio manager, you’d definitely love to see the future. Many posts here on QuantDare deal with the challenge of predicting the future (with Prophet, Random Forests, Lasso, etc). This time, we talk about something different: imagine we are

*- 1 year ago, 6 Sep 2017, 11:35am -*

Stochastic portfolio theory, revisited! [Quant Dare]

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

*- 1 year ago, 26 Jul 2017, 11:12am -*

"Past performance is no guarantee of future results", but helps a bit [Quant Dare]

We are rather used to reading this disclaimer (or some variation thereof) in mutual fund prospectuses or investment vehicle webpages. Despite warnings, investors and advisors insist on considering past performance (and some other related metrics) as important factors in asset selection. But, are

*- 1 year ago, 12 Jul 2017, 12:53pm -*

What to expect when you are the SPX [Quant Dare]

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

*- 1 year ago, 4 May 2017, 11:59am -*

K-Means in investment solutions: fact or fiction [Quant Dare]

We’ve spoken previously about different clustering methods many times: K-Means, Hierarchical Clustering, and so on. However, this field does not end here. In this post, I will try to find how K-Means clustering works in an investment solution. K-Means Clustering The K-Means algorithm partitions

*- 1 year ago, 21 Apr 2017, 07:15pm -*

How to use bootstrapping in Portfolio Management [Quant Dare]

Faced with growing uncertainty in financial markets, investors are worried about the future of their investments. Travelling in time to check the future reality is not yet a possibility. For that reason, we use techniques and create measures to gain confidence in our investments’ future behaviour.

*- 1 year ago, 29 Mar 2017, 09:47am -*

Playing with Prophet on Financial Time Series [Quant Dare]

Two weeks ago, Facebook launched Prophet, an amazing forecasting tool available in Python and R. Here’s a bit of info from the Facebook research website: “Forecasting is a data science task that is central to many activities within an organization. For instance, large organizations like Facebook

*- 1 year ago, 9 Mar 2017, 12:30pm -*

Prices Transformation Cheat Sheet [Quant Dare]

In this entry, we discover the secrets behind prices transformation in financial series. Do you use price series in things such as technical analysis visualisation? Do you use return series in things such as volatility calculations? Do you use equity series in things such as comparing products with

*- 1 year ago, 2 Mar 2017, 09:21pm -*

Dual Momentum Analysis [Quant Dare]

Why dual momentum? Because strategies based on highest relative momentum show great results in the long run, but can experience deep falls and have little participation in the posterior rebounds after large market falls. To sidestep these drawbacks, here it is laid out a strategy based on Gary

*- 1 year ago, 23 Feb 2017, 09:42pm -*

Random forest: many is better than one [Quant Dare]

Random forest is one of the most well-known ensemble methods and it came up as a substantial improvement of simple decision trees. In this post, we are going to explain how to build a random forest from simple decision trees and to test how they actually improve the original algorithm. Maybe you

*- 1 year ago, 15 Feb 2017, 11:23am -*

Non-parametric Estimation [Quant Dare]

How can we predict future returns of a series? Many series contain enough information in their own past data to predict the next value, but how much information is useable and which data points are the best for the prediction? Is it enough to use only the most recent data points? How much

*- 1 year ago, 1 Feb 2017, 11:19am -*

Applying Genetic Algorithms to define a Trading System [Quant Dare]

When talking about quantitative trading, there are a large number of indicators and operators we can use as a buy/sell rule. But apart from deciding what indicator we will follow, the most important part would be setting the correct parameters. So, one method we can use to find adequate parameters

*- 1 year ago, 22 Dec 2016, 05:04pm -*

Levy flights. Foraging in a finance blog [Quant Dare]

Does this graph look like a kid’s drawing? Maybe a piece of art from the monkey Jeff? No, of course Jeff draws better than this. Actually, it is a representation of what is known as a Lévy flight, a mathematical concept that shows up in nature, marketing, cryptography, astronomy, biology, physics

*- 2 years ago, 16 Nov 2016, 10:43am -*

Principal Component Analysis [Quant Dare]

Principal Component Analysis (PCA) is a technique used to reduce the dimensionality of a data set, finding the causes of variability and sorting them by importance. >How? If you have a set of observations (features, measurements, etc.) that can be projected on a plane (X, Y) such as: DataSet

*- 2 years ago, 5 Nov 2016, 10:40am -*

Learning with kernels: an introductory approach [Quant Dare]

Time series pervade financial markets and, although some embrace the so-called efficient market hypothesis, stating that current market prices reflect all available information about a security into its price, I am more inclined to think they provide us with a lot of information that we rarely know

*- 2 years ago, 28 Sep 2016, 12:28pm -*

Clustering: "Two's company, three's a crowd" [Quant Dare]

It’s hard enough deciding which Machine Learning technique to use, but after selecting an appropriate clustering algorithm the next challenges begin: how good is the separation and into how many groups should you divide the data? Maybe three is not always a crowd… First, let’s set the scene We

*- 2 years ago, 29 Jul 2016, 01:17pm -*

Visualizing Fixed Income ETFs with T-SNE [Quant Dare]

In recent articles we were talking about PCA and ISOMAP, as techniques for dimensionality reduction. On this occasion, we put the focus on T-SNE, in relation with visualization and understanding of multidimensional datasets in a low dimension space, where the human eye can find patterns easily.

*- 2 years ago, 7 Jul 2016, 01:05pm -*

Hierarchical clustering, using it to invest [Quant Dare]

Machine Learning world is quite big. In this blog you can find different posts in which the authors explain different machine learning techniques. One of them is clustering and here is another method: Hierarchical Clustering, in particular the Ward’s method. You can find some examples in

*- 2 years ago, 23 Jun 2016, 01:56am -*

Lasso applied in Portfolio Management [Quant Dare]

There are a wide variety of Machine Learning techniques that help us to solve Big Data problems. In this post we talk about how to apply Lasso Regression in Portfolio Management. You may have heard of this technique in the past, for that reason I’ll try to explain it in a brief introduction. Lasso

*- 2 years ago, 15 Jun 2016, 01:35pm -*