Quant Mashup - Quant Dare
Generating Financial Series with Generative Adversarial Networks Part 2 [Quant Dare]
This is a follow-up post to a recent post in which we discussed how to generate 1-dimensional financial time series with Generative Adversarial Networks. If you haven’t read that post yet we suggest you to do so, since it introduces the building blocks used in this one. Here we will go over the
- 4 years ago, 24 Jun 2019, 10:22am -
A Matter of Scale [Quant Dare]
When dealing with mathematical modeling, choosing the right scale to frame the equations can make the difference between a successful and lasting model, or poor description of reality. In today’s post, we explore two important scaling procedures that arise in finance: the annualisation of returns
- 4 years ago, 20 Jun 2019, 10:53am -
Classification of Market Regimes [Quant Dare]
Understanding classification of market regimes is fairly important in finance. It all comes down to correctly predicting the way prices are going to move. But prediction isn’t the only crucial thing; knowing how to describe what has already happened is also of great importance. In this QuantDare
- 4 years ago, 17 Apr 2019, 10:22am -
Learning to Rank with TensorFlow [Quant Dare]
Alphabet, the largest Internet-based company, has based its success on sophisticated information retrieval algorithms since its origins. Now, 20 years later, one of its divisions is open-sourcing part of its secret sauce, drawing attention from developers all over the world. Since Google was founded
- 4 years ago, 10 Apr 2019, 01:48pm -
Understanding the shape of data (II) [Quant Dare]
Topology could be used to gain insight on the shape of our data, as we explained in our last post. Today, we will put this theory into practice by analyzing the 2008 financial crisis. Persistence diagrams We will start by giving an equivalent representation of the persistence barcode that we saw
- 4 years ago, 3 Apr 2019, 12:50pm -
Fundamental Manifoldness [Quant Dare]
One of the hardest and most frequent tasks for anyone in the quantitative finance world is to summarize or visualize in a simple way a vast amount of data to represent a company. In this blog, we have covered different Machine Learning techniques that allow us to summarize information through
- 5 years ago, 27 Mar 2019, 12:58pm -
Generating Financial Series with Generative Adversarial Networks [Quant Dare]
The scarcity of historical financial data has been a huge hindrance for the development of algorithmic trading models ever since the first models were devised. In the ever-changing economic reality we live in, countless models are tried and evaluated. Most of these models seek to extract information
- 5 years ago, 20 Mar 2019, 09:11am -
Ranking Quality [Quant Dare]
The application of Machine Learning for ranking is widely spread. This application of Machine Learning is a little different from the classical ones of classification and regression. In the case of ranking, the interest is not in the accuracy of an estimated value (regression) or the guess about the
- 5 years ago, 13 Mar 2019, 09:58am -
Portfolio weightlifting (II) [Quant Dare]
In a previous post, we took a look at the computation of a portfolio’s exposure to its allocations. Then, to show the effects of active management, we compared the return made by two portfolios. But there is so much more to look inside the financial time series. Since we left a couple of
- 5 years ago, 8 Feb 2019, 10:32am -
Factor investing in the currency market [Quant Dare]
Factor investing is a broadly used approach in asset management, specially for the equity market, but, can we apply this idea in order to explain currency returns? The idea at the core of factor investing is that there are different sources of risk in the market and that the exposure of the
- 5 years ago, 16 Jan 2019, 11:07am -
Omega ratio, the ultimate risk-reward ratio? [Quant Dare]
If you are working in finance, you have almost surely heard of risk-reward ratios and probably used some of them to evaluate the performance of a stock, ETF, or any other investment strategy. Among the different alternatives, the most popular risk-reward ratio is the so-called Sharpe ratio, first
- 5 years ago, 9 Jan 2019, 01:23pm -
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
- 5 years 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
- 5 years 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
- 5 years 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
- 5 years 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
- 5 years 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
- 5 years 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
- 5 years 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.
- 5 years 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
- 5 years 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
- 5 years 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
- 5 years 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
- 5 years 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 years 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 years 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 years 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
- 5 years 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.
- 5 years 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
- 5 years 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
- 5 years 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
- 6 years 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
- 6 years 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
- 6 years 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
- 6 years 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
- 6 years 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
- 6 years 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
- 6 years 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.
- 6 years 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
- 6 years 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
- 6 years 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
- 6 years 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
- 6 years 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
- 6 years 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
- 6 years 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
- 6 years 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
- 6 years 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
- 6 years 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.
- 6 years 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
- 7 years 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
- 7 years ago, 2 Mar 2017, 09:21pm -