Quant Mashup - Quant Start

Sentiment Analysis Trading Strategy via Sentdex Data in QSTrader [Quant Start]

In addition to the "usual" tricks of statistical arbitrage, trend-following and fundamental analysis, many quant shops (and retail quants!) engage in natural language processing (NLP) techniques to build systematic strategies. Such techniques fall under the banner of Sentiment Analysis. In

*- 6 years ago, 22 Jan 2017, 11:26pm -*

Aluminum Smelting Cointegration Strategy in QSTrader [Quant Start]

In previous articles the concept of cointegration was considered. It was shown how cointegrated pairs of equities or ETFs could lead to profitable mean-reverting trading opportunities. Two specific tests were outlined–the Cointegrated Augmented Dickey-Fuller (CADF) test and the Johansen

*- 6 years ago, 12 Jan 2017, 08:04am -*

K-Means Clustering of Daily OHLC Bar Data [Quant Start]

In this article the concept of unsupervised clustering will be considered. In quantitative finance finding groups of similar assets, or regimes in asset price series is extremely useful. It can aid in the development of filters, or entry and exit rules. This helps improve profitability for certain

*- 6 years ago, 5 Dec 2016, 09:38am -*

Bootstrap Aggregation, Random Forests and Boosted Trees [Quant Start]

In a previous article the decision tree (DT) was introduced as a supervised learning method. In the article it was mentioned that the real power of DTs lies in their ability to perform extremely well as predictors when utilised in a statistical ensemble. In this article it will be shown how

*- 7 years ago, 28 Nov 2016, 08:30am -*

Singapore November 2016 Trip Report [Quant Start]

A couple of weeks ago I flew out to Singapore to give a talk at the Quantopian Singapore QuantCon. The event was absolutely fantastic with an incredibly diverse and interesting set of talks. I gave a talk was on the topic of Hunting For Alpha In Alternative Data. Here is a brief summary of the trip,

*- 7 years ago, 24 Nov 2016, 11:57am -*

Strategic and Equal Weighted ETF Portfolios in QSTrader [Quant Start]

In a previous article the monthly rebalance feature of the open-source backtesting library QSTrader was demonstrated on a simplistic equities/bonds ETF mix portfolio. In this article new streamlined code will be presented to allow straightforward modification of the portfolio weightings. In

*- 7 years ago, 25 Oct 2016, 08:29am -*

Monthly Rebalancing of ETFs with Fixed Initial Weights in QSTrader [Quant Start]

Many institutional global asset managers are constrained by the need to invest in long-only strategies with zero or minimal leverage. This means that their strategies are often highly correlated to "the market" (usually the S&P500 index). While it is difficult to minimise this

*- 7 years ago, 17 Oct 2016, 06:30am -*

QuantStart New York City October 2016 Trip Report [Quant Start]

Last Tuesday I flew out to New York City, USA to give a talk at the Quantopian NYC Meetup and moderate a panel on "Programming Wars" at the Trading Show New York 2016. Both events were extremely interesting and I met a lot of great people. I want to write a brief summary of the trip as it

*- 7 years ago, 11 Oct 2016, 02:31pm -*

Hidden Markov Models for Regime Detection using R [Quant Start]

In the previous article in the series Hidden Markov Models were introduced. They were discussed in the context of the broader class of Markov Models. They were motivated by the need for quantitative traders to have the ability to detect market regimes in order to adjust how their quant strategies

*- 7 years ago, 3 Oct 2016, 02:07pm -*

QuantStart Events in October and November 2016 [Quant Start]

This is a short post to let QuantStart readers know that I'll be speaking at some events in New York and Singapore over the next couple of months: Wednesday, October 5th 2016, NYC - I'll be talking about "The Quest for Profitability", along with Seong Lee who will be talking

*- 7 years ago, 28 Sep 2016, 12:26pm -*

Kalman Filter-Based Pairs Trading Strategy In QSTrader [Quant Start]

Previously on QuantStart we have considered the mathematical underpinnings of State Space Models and Kalman Filters, as well as the application of the pykalman library to a pair of ETFs to dynamically adjust a hedge ratio as a basis for a mean reverting trading strategy. In this article we will

*- 7 years ago, 26 Sep 2016, 02:08am -*

The Future of Quant Finance Careers [Quant Start]

The world of quantitative finance continues to evolve at a rapid pace. Even in the last four years of the existence of this site the market for quant jobs has shifted significantly. In this article we outline these shifts. The advice on what is likely to be in demand in the next few years will be

*- 7 years ago, 19 Sep 2016, 02:26am -*

Hidden Markov Models - An Introduction [Quant Start]

A consistent challenge for quantitative traders is the frequent behaviour modification of financial markets, often abruptly, due to changing periods of government policy, regulatory environment and other macroeconomic effects. Such periods are known colloquially as "market regimes" and

*- 7 years ago, 12 Sep 2016, 02:28am -*

How to Learn Advanced Mathematics Without Heading to University - Part 3 [Quant Start]

In the first and second articles in the series we looked at the courses that are taken in the first half of a four-year undergraduate mathematics degree - and how to learn these modules on your own. In the first year we discussed the basics - Linear Algebra, Ordinary Differential Equations, Real

*- 7 years ago, 5 Sep 2016, 04:46am -*

Dynamic Hedge Ratio Between ETF Pairs Using the Kalman Filter [Quant Start]

A common quant trading technique involves taking two assets that form a cointegrating relationship and utilising a mean-reverting approach to construct a trading strategy. This can be carried out by performing a linear regression between the two assets (such as a pair of ETFs) and using this to

*- 7 years ago, 30 Aug 2016, 04:07am -*

Beginner's Guide to Decision Trees for Supervised Machine Learning [Quant Start]

In this article we are going to consider a stastical machine learning method known as a Decision Tree. Decision Trees (DTs) are a supervised learning technique that predict values of responses by learning decision rules derived from features. They can be used in both a regression and a

*- 7 years ago, 22 Aug 2016, 04:40am -*

Should You Build Your Own Backtester? [Quant Start]

This post relates to a talk I gave in April at QuantCon 2016 in New York City. QuantCon was hosted by Quantopian and I was invited to talk about some of the topics discussed on QuantStart. I decided to talk about whether it is worth building your own backtesting system. This post goes into more

*- 7 years ago, 15 Aug 2016, 01:23am -*

Maximum Likelihood Estimation for Linear Regression [Quant Start]

The purpose of this article series is to introduce a very familiar technique, Linear Regression, in a more rigourous mathematical setting under a probabilistic, supervised learning interpretation. This will allow us to understand the probability framework that will subsequently be used for more

*- 7 years ago, 8 Aug 2016, 03:19am -*

Mailbag: How Do You Move From Quant Developer To Quant Trader? [Quant Start]

I was emailed recently with a career-related question about jumping from one quant role to another. The question posed was "How can I make the jump from being a quant/software developer to a quant trader/researcher in a fund or investment bank?". This is certainly possible and does happen

*- 7 years ago, 2 Aug 2016, 07:09am -*

Beginner's Guide to Unsupervised Learning [Quant Start]

The majority of machine learning posts to date on QuantStart have all been about supervised learning. In this post we are going to take a look at unsupervised learning, which is a far more challenging area of machine learning. Supervised learning involves taking a number of data observations, each

*- 7 years ago, 28 Jul 2016, 04:39am -*

Mailbag: Can You Get A Job In HFT Without A Degree? [Quant Start]

I was emailed yesterday with an interesting career question about working in High Frequency Trading (HFT). The question posed was "Is it possible to get a HFT-related job in a big company without a formal degree?". The short answer is that yes, it is possible. The longer answer is that it

*- 7 years ago, 12 Jul 2016, 12:13pm -*

Advanced Algorithmic Trading and QSTrader - Second Update [Quant Start]

This is a quick update post to let readers know that the pre-order release of Advanced Algorithmic Trading has had a new update, adding over 50 pages of material. This brings the current release up to 250 pages. To access the new content, customers simply need to follow the download link received in

*- 7 years ago, 6 Jul 2016, 05:06am -*

Johansen Test for Cointegrating Time Series Analysis in R [Quant Start]

In the previous article on the Cointegrated Augmented Dickey Fuller (CADF) test we noted that one of the biggest drawbacks of the test was that it was only capable of being applied to two separate time series. However, we can clearly imagine a set of three or more financial assets that might share

*- 7 years ago, 20 Jun 2016, 10:44am -*

Cointegrated Augmented Dickey Fuller Test for Pairs Trading Evaluation in R [Quant Start]

In the previous article on cointegration in R we simulated two non-stationary time series that formed a cointegrated pair under a specific linear combination. We made use of the statistical Augmented Dickey-Fuller, Phillips-Perron and Phillips-Ouliaris tests for the presence of unit roots and

*- 7 years ago, 14 Jun 2016, 03:59am -*

Cointegrated Time Series Analysis for Mean Reversion Trading with R [Quant Start]

A while back we considered a trading model based on the application of the ARIMA and GARCH time series models to daily S&P500 data. We mentioned in that article as well as other previous time series analysis articles that we would eventually be considering mean reverting trading strategies and

*- 7 years ago, 2 Jun 2016, 10:27am -*

Deep Learning with Theano - Part 1: Logistic Regression [Quant Start]

Over the last ten years the subject of deep learning has been one of the most discussed fields in machine learning and artificial intelligence. It has produced state-of-the-art results in areas as diverse as computer vision, image recognition, natural language processing and speech recognition.

*- 7 years ago, 12 May 2016, 09:22am -*

How to Learn Advanced Mathematics Without Heading to University - Part 2 [Quant Start]

In the last article in the series we looked at the foundational courses that are often taken in a four-year undergraduate mathematics course. We saw that the major courses were Linear Algebra, Ordinary Differential Equations, Real Analysis and Probability. In the "second year" of our

*- 7 years ago, 5 May 2016, 05:58pm -*

QuantStart April 2016 News [Quant Start]

This is a quick update to let the QuantStart community know what has been happening in the last few months as it has been an exciting time "behind the scenes" of the site. Firstly, I spoke at the Quantopian QuantCon conference in New York last week. The conference was absolutely fantastic,

*- 7 years ago, 18 Apr 2016, 02:21pm -*

Bayesian Linear Regression Models with PyMC3 [Quant Start]

To date on QuantStart we have introduced Bayesian statistics, inferred a binomial proportion analytically with conjugate priors and have described the basics of Markov Chain Monte Carlo via the Metropolis algorithm. In this article we are going to introduce regression modelling in the Bayesian

*- 7 years ago, 1 Apr 2016, 02:24pm -*

Markov Chain Monte Carlo for Bayesian Inference - The Metropolis Algorithm [Quant Start]

In previous discussions of Bayesian Inference we introduced Bayesian Statistics and considered how to infer a binomial proportion using the concept of conjugate priors. We discussed the fact that not all models can make use of conjugate priors and thus calculation of the posterior distribution would

*- 7 years ago, 24 Mar 2016, 12:56pm -*

Careers in Quantitative Finance [Quant Start]

"I'm actually really optimistic about the future of quants. The industry is more technical than ever, and there is as much need to understand the risks in the system as ever." - Robert C. Merton, quoted in "Risk," August 2012 In 1997, when Robert Merton won the Nobel Prize

*- 7 years ago, 12 Mar 2016, 01:46am -*

How to Learn Advanced Mathematics Without Heading to University - Part 1 [Quant Start]

I am often asked in emails how to go about learning the necessary mathematics for getting a job in quantitative finance or data science if it isn't possible to head to university. This article is a response to such emails. I want to discuss how you can become a mathematical autodidact using

*- 7 years ago, 11 Mar 2016, 10:31am -*

Advanced Trading Infrastructure - Portfolio Handler Class [Quant Start]

In the current series on Advanced Trading Infrastructure we have described both the Position Class and the Portfolio Class - two essential components of a robust backtesting and live trading system. In this article we are going to extend our discussion to the Portfolio Handler Class, which will

*- 7 years ago, 4 Mar 2016, 09:23am -*

Advanced Trading Infrastructure - Portfolio Class [Quant Start]

In the previous article in the Advanced Trading Infrastructure series I discussed and presented both the code and initial unit tests for the Position class that stores positional information about a trade. In this article we will consider the Portfolio class, used to store a list of Position

*- 7 years ago, 22 Feb 2016, 11:39am -*

Advanced Trading Infrastructure - Position Class [Quant Start]

At the end of last year I announced that I would be working on a series of articles regarding the development of an Advanced Trading Infrastructure. Since the initial announcement I haven't mentioned the project to any great extent. However, in this article I want to discuss the progress

*- 7 years ago, 25 Jan 2016, 12:09pm -*

State Space Models and the Kalman Filter [Quant Start]

To date in our time series analysis posts we have considered linear time series models including ARMA, ARIMA as well as the GARCH model for conditional heteroskedasticity. In this article we are going to consider the theoretical basis of state space models, the primary benefit of which is that their

*- 7 years ago, 28 Dec 2015, 07:54pm -*

Announcing the QuantStart Advanced Trading Infrastructure Article Series [Quant Start]

To date on QuantStart we have considered two major quantitative backtesting and live trading engines. The first arised from the Event-Drive Backtesting series I wrote back in March 2014. The second is QSForex, an open-source backtest and live trading engine that hooks into the OANDA Forex Broker

*- 8 years ago, 30 Nov 2015, 11:22pm -*

How to Write a Great Quant Blog [Quant Start]

Today's post is a guest post from Jacques Joubert, who runs QuantsPortal. Jacques emailed me recently and asked if I'd be willing to contribute to a post about how to get started in quant blogging. I was more than happy to do so, and Jacques wondered if it would make a good guest post for

*- 8 years ago, 27 Oct 2015, 12:19pm -*

Announcement: Speaking at QuantCon in April 2016 [Quant Start]

This is a short post to let you know that I'll be speaking at QuantCon on the April 9th 2016 in New York City. What is QuantCon? Over the past five years the software landscape for retail quant traders, and researchers at quant funds, has changed dramatically. The uptake of open source

*- 8 years ago, 20 Oct 2015, 01:57am -*

ARIMA+GARCH Trading Strategy on the S&P500 Stock Market Index Using R [Quant Start]

In this article I want to show you how to apply all of the knowledge gained in the previous time series analysis posts to a trading strategy on the S&P500 US stock market index. We will see that by combining the ARIMA and GARCH models we can significantly outperform a "Buy-and-Hold"

*- 8 years ago, 7 Oct 2015, 09:57pm -*

Generalised Autoregressive Conditional Heteroskedasticity GARCH(p, q) Models for Time Series Analysis [Quant Start]

In this article we are going to consider the famous Generalised Autoregressive Conditional Heteroskedasticity model of order p,q, also known as GARCH(p,q). GARCH is used extensively within the financial industry as many asset prices are conditional heteroskedastic. We will be discussing conditional

*- 8 years ago, 22 Sep 2015, 02:27am -*

Autoregressive Integrated Moving Average ARIMA(p, d, q) Models for Time Series Analysis [Quant Start]

In the previous set of articles (Parts 1, 2 and 3) we went into significant detail about the AR(p), MA(q) and ARMA(p,q) linear time series models. We used these models to generate simulated data sets, fitted models to recover parameters and then applied these models to financial equities data. In

*- 8 years ago, 15 Sep 2015, 07:39pm -*

Autoregressive Moving Average ARMA(p, q) Models for Time Series Analysis - Part 3 [Quant Start]

This is the third and final post in the mini-series on Autoregressive Moving Average (ARMA) models for time series analysis. We've introduced Autoregressive models and Moving Average models in the two previous articles. Now it is time to combine them to produce a more sophisticated model.

*- 8 years ago, 7 Sep 2015, 07:28pm -*

Autoregressive Moving Average ARMA(p, q) Models for Time Series Analysis - Part 2 [Quant Start]

In Part 1 we considered the Autoregressive model of order p, also known as the AR(p) model. We introduced it as an extension of the random walk model in an attempt to explain additional serial correlation in financial time series. Ultimately we realised that it was not sufficiently flexible to truly

*- 8 years ago, 24 Aug 2015, 09:40pm -*

Autoregressive Moving Average ARMA(p, q) Models for Time Series Analysis - Part 1 [Quant Start]

In the last article we looked at random walks and white noise as basic time series models for certain financial instruments, such as daily equity and equity index prices. We found that in some cases a random walk model was insufficient to capture the full autocorrelation behaviour of the instrument,

*- 8 years ago, 17 Aug 2015, 08:37pm -*

White Noise and Random Walks in Time Series Analysis [Quant Start]

In the last article of the Time Series Analysis series we discussed the importance of serial correlation and why it is extremely useful in the context of quantitative trading. In this article we will make full use of serial correlation by discussing our first time series models, including some

*- 8 years ago, 22 Jul 2015, 11:11pm -*

Serial Correlation in Time Series Analysis [Quant Start]

In last week's article we looked at Time Series Analysis as a means of helping us create trading strategies. In this article we are going to look at one of the most important aspects of time series, namely serial correlation (also known as autocorrelation). Before we dive into the definition of

*- 8 years ago, 1 Jul 2015, 07:34pm -*

Forex Trading Diary #7 - New Backtest Interface [Quant Start]

Although I've spent the majority of this month researching time series analysis for the upcoming article series, I've also been working on QSForex attempting to improve the API somewhat. In particular I've made the interface for beginning a new backtest a lot simpler by encapsulating

*- 8 years ago, 30 Jun 2015, 06:17pm -*

Beginner's Guide to Time Series Analysis [Quant Start]

Over the last few years we've looked at various tools to help us identify exploitable patterns in asset prices. In particular we have considered basic econometrics, statistical machine learning and Bayesian statistics. While these are all great modern tools for data analysis, the vast majority

*- 8 years ago, 23 Jun 2015, 07:36pm -*

Successful Algorithmic Trading Updated for Python 2.7.x and Python 3.4.x [Quant Start]

This is a short update to inform current and prospective readers of Successful Algorithmic Trading that the Python code in the book has been updated to be fully compatible with both Python 2.7.x and Python 3.4.x. In addition I've created a requirements.txt file that allows you to easily

*- 8 years ago, 18 Jun 2015, 05:54pm -*