How to Model Features as Expected Returns

Modeling features as expected returns can be a useful way to develop trading strategies, but it requires some care. The main advantage is that it directly aligns with the objective of predicting and capitalising on future returns. This can make optimisation and implementation more intuitive. It also facilitates direct comparison between features and provides a …

Read more

An Exponentially Weighted Covariance Matrix in R

Exponential weighting schemes can help navigate the trade-off between responsiveness and stability of the inherently noisy estimates we make from market data. We previously saw examples of calculating the exponentially weighted moving average of a vector, and estimating the correlation between SPY and TLT using an exponential weighting scheme [link]. In this article, we’ll implement …

Read more

Using Exponentially Weighted Moving Averages to navigate trade-offs in systematic trading

Using Exponentially Weighted Moving Averages to navigate trade-offs in systematic trading A big part of the job of the indie trader is data analysis. We’re always looking in the past data to validate (or more often, invalidate) a hypothesis about what might predict future returns. And one could argue that recent data is more useful …

Read more

Trading FX using Autoregressive Models

I’m a big fan of Ernie Chan’s quant trading books: Quantitative Trading, Algorithmic Trading, and Machine Trading. There are some great insights in there, but the thing I like most is the simple but thorough treatment of various edges and the quant tools you might use to research and trade them. Ernie explicitly states that …

Read more

A Vector Autoregression Trading Model

The vector autoregression (VAR) framework is common in econometrics for modelling correlated variables with bi-directional relationships and feedback loops. If you google “vector autoregression” you’ll find all sorts of academic papers related to modelling the effects of monetary and fiscal policy on various aspects of the economy. This is only of passing interest to traders. …

Read more

Kalman Filter Example:
Pairs Trading in R

This Kalman Filter Example post is the first in a series where we deploy the Kalman Filter in pairs trading. Be sure to follow our progress in Part 2: Pairs Trading in Zorro, and Part 3: Putting It All Together. Anyone who’s tried pairs trading will tell you that real financial series don’t exhibit truly …

Read more

Practical Pairs Trading

Some price series are mean reverting some of the time, but it is also possible to create portfolios which are specifically constructed to have mean-reverting properties. Series that can be combined to create stationary portfolios are called cointegrating, and there are a bunch of statistical tests for this property. We’ll return to these shortly. While …

Read more

Time Series Analysis: Fitting ARIMA/GARCH predictions profitable for FX?

Recently, I wrote about fitting mean-reversion time series analysis models to financial data and using the models’ predictions as the basis of a trading strategy. Continuing our exploration of time series modelling, let’s research the autoregressive and conditionally heteroskedastic family of time series models. In particular, we want to understand the autoregressive integrated moving average …

Read more