Quant Mashup - Jonathan Kinlay

Trading Anomalies [Jonathan Kinlay]

An extract from my new book, Equity Analytics.

*- 10 months ago, 29 Jan 2023, 08:53pm -*

Pairs Trading in the Equities Entity Store [Jonathan Kinlay]

An extract from the chapter on pairs trading from my forthcoming book Equity Analytics

*- 10 months ago, 23 Jan 2023, 01:11pm -*

Survivorship Bias [Jonathan Kinlay]

The relprice Index in the Performance Data table shows the price of the stock relative to the S&P 500 index over a specified period. Let’s look at the median relPrice for all stocks that are currently members of the S&P500 index, eliminating any for which the relevant Performance Data is

*- 11 months ago, 2 Jan 2023, 03:29pm -*

Why Technical Analysis Doesn't Work [Jonathan Kinlay]

Generally speaking, one of the major attractions of working in the equities space is that the large number of available securities opens up a much wider range of opportunities for the quantitative researcher than for, say, futures markets. The focus in equities tends to be on portfolio strategies

*- 11 months ago, 2 Jan 2023, 03:29pm -*

Equity Research in the Wolfram Language [Jonathan Kinlay]

*- 1 year ago, 8 Nov 2022, 09:15pm -*

Forecasting Market Indices Using Stacked Autoencoders and LSTM [Jonathan Kinlay]

The stem paper for this post is: Bao W, Yue J, Rao Y (2017) A deep learning framework for financial time series using stacked autoencoders and long-short term memory. PLoS ONE 12(7): e0180944. https://doi.org/10.1371/journal.pone.0180944 The chief claim by the researchers is that 90% to 95% 1-day

*- 1 year ago, 23 Aug 2022, 09:57pm -*

Intraday Stock Index Forecasting [Jonathan Kinlay]

In a previous post I discussed modelling stock prices processes as Geometric brownian Motion processes: To recap briefly, we assume a process of the form: Where S0 is the initial stock price at time t = 0. The mean of such a process is: and standard deviation: In the post I showed how to estimate

*- 1 year ago, 22 Mar 2022, 11:29am -*

The Reciprocal Fibonacci Constant [Jonathan Kinlay]

*- 2 years ago, 11 Sep 2021, 11:35am -*

Handling Big Data [Jonathan Kinlay]

One of the major challenges that users face when trying to do data science is how to handle big data. Leaving aside the important topic of database connectivity/functionality and the handling of data too large to fit in memory, my concern here is with the issue of how to handle large data files,

*- 2 years ago, 3 Sep 2021, 10:57am -*

Machine Learning Based Statistical Arbitrage [Jonathan Kinlay]

Applying Machine Learning in Statistical Arbitrage In this series of posts I want to focus on applications of machine learning in stat arb and pairs trading, including genetic algorithms, deep neural networks and reinforcement learning. Pair Selection Let’s begin with the subject of pairs

*- 2 years ago, 24 May 2021, 03:45am -*

Strategy Backtesting in Mathematica [Jonathan Kinlay]

This is a snippet from a strategy backtesting system that I am currently building in Mathematica. One of the challenges when building systems in WL is to avoid looping wherever possible. This can usually be accomplished with some thought, and the efficiency gains can be significant. But it can be

*- 2 years ago, 12 May 2021, 08:54pm -*

Pairs Trading - Part 2: Practical Considerations [Jonathan Kinlay]

One of the first things you quickly come to understand in equity pairs trading is how important it is to spread your risk. The reason is obvious: stocks are subject to a multitude of risk factors – amongst them earning shocks and corporate actions -that can blow up an otherwise profitable pairs

*- 4 years ago, 21 Feb 2019, 09:59pm -*

A Universal Stock Screening Application [Jonathan Kinlay]

*- 4 years ago, 11 Jan 2019, 09:56am -*

Math-TWS: Connecting Wolfram Mathematica to IB TWS [Jonathan Kinlay]

At long last, it’s here! MATH-TWS is a new Mathematica package that connects Wolfram Mathematica to the Interactive Brokers TWS platform via the C++ API. It enables the user to retrieve information from TWS on accounts, portfolios and positions, as well as historical and real-time market data.

*- 5 years ago, 22 Oct 2018, 04:51pm -*

Cointegration Breakdown [Jonathan Kinlay]

One of the perennial difficulties in developing statistical arbitrage strategies is the lack of reliable methods of estimating a stationary portfolio comprising two or more securities. In a prior post (below) I discussed at some length one of the primary reasons for this, i.e. the lower power of

*- 5 years ago, 10 Oct 2018, 04:00pm -*

Beating the S&P500 Index with a Low Convexity Portfolio [Jonathan Kinlay]

A primer on beta convexity and its applications is given in the following post: The essential idea is to evaluate the beta of stock during down-markets, separately from periods when the market is performing well. Beta convexity is a measure of how stable a stock beta is across market regimes, and by

*- 5 years ago, 17 Sep 2018, 09:34pm -*

Regime-Switching & Market State Modeling [Jonathan Kinlay]

The Excel workbook referred to in this post can be downloaded here. Market state models are amongst the most useful analytical techniques that can be helpful in developing alpha-signal generators. That term covers a great deal of ground, with ideas drawn from statistics, econometrics, physics and

*- 5 years ago, 24 Aug 2018, 08:13am -*

Resources for Quantitative Analysts [Jonathan Kinlay]

Two of the smartest econometricians I know are Prof. Stephen Taylor of Lancaster University, and Prof. James Davidson of Exeter University. I recall spending many profitable hours in the 1980’s with Stephen’s book Modelling Financial Time Series, which I am pleased to see has now been reprinted

*- 5 years ago, 22 Aug 2018, 11:04pm -*

Can Machine Learning Be Used To Predict Market Direction? The 1,000,000 Model Test [Jonathan Kinlay]

During the 1990’s the advent of Neural Networks unleashed a torrent of research on their applications in financial markets, accompanied by some rather extravagant claims about their predicative abilities. Sadly, much of the research proved to be sub-standard and the results illusionary, following

*- 5 years ago, 21 Aug 2018, 10:40pm -*

On Testing Direction Prediction Accuracy [Jonathan Kinlay]

As regards the question of forecasting accuracy discussed in the paper on Forecasting Volatility in the S&P 500 Index, there are two possible misunderstandings here that need to be cleared up. These arise from remarks by one commentator as follows: “An above 50% vol direction forecast looks

*- 5 years ago, 20 Aug 2018, 09:22am -*

Range-Based EGARCH Option Pricing Models (REGARCH) [Jonathan Kinlay]

The research in this post and the related paper on Range Based EGARCH Option pricing Models is focused on the innovative range-based volatility models introduced in Alizadeh, Brandt, and Diebold (2002) (hereafter ABD). We develop new option pricing models using multi-factor diffusion approximations

*- 5 years ago, 20 Aug 2018, 09:21am -*

Long Memory and Regime Shifts in Asset Volatility [Jonathan Kinlay]

This post covers quite a wide range of concepts in volatility modeling relating to long memory and regime shifts and is based on an article that was published in Wilmott magazine and republished in The Best of Wilmott Vol 1 in 2005. A copy of the article can be downloaded here. One of the defining

*- 5 years ago, 17 Aug 2018, 10:16am -*

Robustness in Quantitative Research and Trading [Jonathan Kinlay]

One of the most highly desired properties of any financial model or investment strategy, by investors and managers alike, is robustness. I would define robustness as the ability of the strategy to deliver a consistent results across a wide range of market conditions. It, of course, by no means the

*- 5 years ago, 13 Aug 2018, 12:05pm -*

Modeling Asset Volatility [Jonathan Kinlay]

I am planning a series of posts on the subject of asset volatility and option pricing and thought I would begin with a survey of some of the central ideas. The attached presentation on Modeling Asset Volatility sets out the foundation for a number of key concepts and the basis for the research to

*- 5 years ago, 13 Aug 2018, 12:04pm -*

Yield Curve Construction Models - Tools & Techniques [Jonathan Kinlay]

Yield curve models are used to price a wide variety of interest rate-contingent claims. The existence of several different competing methods of curve construction available and there is no single standard method for constructing yield curves and alternate procedures are adopted in different business

*- 5 years ago, 12 Aug 2018, 10:35pm -*

The Lognormal Mixture Variance Model [Jonathan Kinlay]

The LNVM model is a mixture of lognormal models and the model density is a linear combination of the underlying densities, for instance, log-normal densities. The resulting density of this mixture is no longer log-normal and the model can thereby better fit skew and smile observed in the market. The

*- 5 years ago, 11 Aug 2018, 10:45am -*

Volatility Metrics [Jonathan Kinlay]

All that began to change around 2000 with the advent of high frequency data and the concept of Realized Volatility developed by Andersen and others (see Andersen, T.G., T. Bollerslev, F.X. Diebold and P. Labys (2000), “The Distribution of Exchange Rate Volatility,” Revised version of NBER

*- 5 years ago, 10 Aug 2018, 10:17am -*

Using Volatility to Predict Market Direction [Jonathan Kinlay]

We can decompose the returns process Rt as follows: While the left hand side of the equation is essentially unforecastable, both of the right-hand-side components of returns display persistent dynamics and hence are forecastable. Both the signs of returns and magnitude of returns are conditional

*- 5 years ago, 10 Aug 2018, 10:16am -*

Career Opportunity for Quant Traders [Jonathan Kinlay]

We are looking for 3-4 traders (or trading teams) to showcase as Strategy Managers on our Algorithmic Trading Platform. Ideally these would be systematic quant traders, since that is the focus of our fund (although they don’t have to be). So far the platform offers a total of 10 strategies in

*- 5 years ago, 10 Aug 2018, 09:56am -*

Understanding Stock Price Range Forecasts [Jonathan Kinlay]

Range forecasts are produced by estimating the parameters of a Geometric Brownian Motion process from historical data and using the model to project a large number of sample paths for the stock price over the coming month and year. For example, this is a range forecast for Netflix, Inc. (NFLX) as at

*- 5 years ago, 29 Jul 2018, 12:50am -*

Correlation Analysis of Emerging Markets [Jonathan Kinlay]

*- 5 years ago, 25 Jun 2018, 09:35am -*

A Simple Momentum Strategy [Jonathan Kinlay]

Momentum trading strategies span a diverse range of trading ideas. Often they will use indicators to determine the recent underlying trend and try to gauge the strength of the trend using measures of the rate of change in the price of the asset. One very simple momentum concept, a strategy in

*- 5 years ago, 19 Jun 2018, 12:21pm -*

Analyzing the FDIC Dataset [Jonathan Kinlay]

*- 6 years ago, 2 Oct 2017, 11:49am -*

Correlation Copulas [Jonathan Kinlay]

Continuing a previous post, in which we modeled the relationship in the levels of the VIX Index and the Year 1 and Year 2 CBOE Correlation Indices, we next turn our attention to modeling changes in the VIX index. In case you missed it, the post can be found here: Correlation Cointegration We saw

*- 6 years ago, 11 Sep 2017, 01:07pm -*

Correlation Cointegration [Jonathan Kinlay]

In a previous post I looked at ways of modeling the relationship between the CBOE VIX Index and the Year 1 and Year 2 CBOE Correlation Indices: The question was put to me whether the VIX and correlation indices might be cointegrated. Let’s begin by looking at the pattern of correlation between the

*- 6 years ago, 29 Aug 2017, 11:04am -*

Modeling Volatility and Correlation [Jonathan Kinlay]

In a previous blog post I mentioned the VVIX/VIX Ratio, which is measured as the ratio of the CBOE VVIX Index to the VIX Index. The former measures the volatility of the VIX, or the volatility of volatility. A follow-up article in ZeroHedge shortly afterwards pointed out that the VVIX/VIX ratio had

*- 6 years ago, 21 Aug 2017, 11:28pm -*

Beta Convexity [Jonathan Kinlay]

Around a quarter of a century ago I wrote a paper entitled “Equity Convexity” which – to my disappointment – was rejected as incomprehensible by the finance professor who reviewed it. But perhaps I should not have expected more: novel theories are rarely well received first time around. I

*- 6 years ago, 30 May 2017, 08:34am -*

Pairs Trading with Copulas [Jonathan Kinlay]

In a previous post, Copulas in Risk Management, I covered in detail the theory and applications of copulas in the area of risk management, pointing out the potential benefits of the approach and how it could be used to improve estimates of Value-at-Risk by incorporating important empirical features

*- 6 years ago, 6 Mar 2017, 03:38am -*

Modeling Asset Processes [Jonathan Kinlay]

Over the last twenty five years significant advances have been made in the theory of asset processes and there now exist a variety of mathematical models, many of them computationally tractable, that provide a reasonable representation of their defining characteristics. While the Geometric Brownian

*- 6 years ago, 20 Feb 2017, 05:06am -*

Conditional Value at Risk Models [Jonathan Kinlay]

One of the most widely used risk measures is the Value-at-Risk, defined as the expected loss on a portfolio at a specified confidence level. In other words, VaR is a percentile of a loss distribution. But despite its popularity VaR suffers from well-known limitations: its tendency to underestimate

*- 6 years ago, 6 Feb 2017, 12:08pm -*

Trading Market Sentiment [Jonathan Kinlay]

Text and sentiment analysis has become a very popular topic in quantitative research over the last decade, with applications ranging from market research and political science, to e-commerce. In this post I am going to outline an approach to the subject, together with some core techniques, that have

*- 7 years ago, 28 Nov 2016, 03:38pm -*

Applications of Graph Theory In Finance [Jonathan Kinlay]

Very large datasets – comprising voluminous numbers of symbols – present challenges for the analyst, not least of which is the difficulty of visualizing relationships between the individual component assets. Absent the visual clues that are often highlighted by graphical images, it is easy for

*- 7 years ago, 12 Sep 2016, 08:09pm -*

Metal Logic [Jonathan Kinlay]

Precious metals have been in free-fall for several years, as a consequence of the Fed’s actions to stimulate the economy that have also had the effect of goosing the equity and fixed income markets. All that changed towards the end of 2015, as the Fed moved to a tightening posture. So far, 2016

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

Dynamic Time Warping [Jonathan Kinlay]

History does not repeat itself, but it often rhymes – Mark Twain You certainly wouldn’t know it from a reading of the CBOE S&P500 Volatility Index (CBOE:VIX), which printed a low of 11.44 on Friday, but there is a great deal of uncertainty about the prospects for the market as we move

*- 7 years ago, 15 Aug 2016, 10:54am -*

Machine Learning Trading Systems [Jonathan Kinlay]

The SPDR S&P 500 ETF (SPY) is one of the widely traded ETF products on the market, with around $200Bn in assets and average turnover of just under 200M shares daily. So the likelihood of being able to develop a money-making trading system using publicly available information might appear to be

*- 7 years ago, 9 Aug 2016, 12:36am -*

Developing A Volatility Carry Strategy [Jonathan Kinlay]

By way of introduction we begin by reviewing a well known characteristic of the iPath S&P 500 VIX ST Futures ETN (NYSEArca:VXX). In common with other long-volatility ETF /ETNs, VXX has a tendency to decline in value due to the upward sloping shape of the forward volatility curve. The chart below

*- 7 years ago, 14 Jul 2016, 11:12am -*

Is Internal Bar Strength A Random Walk? The Case of Exxon-Mobil [Jonathan Kinlay]

For those who prefer a little more rigor in their quantitative research, I can offer more a somewhat more substantive statistical argument in favor of the IBS indication discussed in my previous post. Specifically, we can show quite convincingly that the IBS process is stationary, a highly desirable

*- 7 years ago, 20 Jun 2016, 09:26pm -*

The Internal Bar Strength Indicator [Jonathan Kinlay]

Internal Bar Strength (IBS) is an idea that has been around for some time. IBS is based on the position of the day’s close in relation to the day’s range: it takes a value of 0 if the closing price is the lowest price of the day, and 1 if the closing price is the highest price of the day. More

*- 7 years ago, 3 Jun 2016, 08:51pm -*

Seasonal Effects in Equity Markets [Jonathan Kinlay]

There are a plethora of seasonal anomalies documented in academic research. For equities these include the Halloween effect (“Sell in May”), January effect, turn-of-the-month effect, weekend effect and holiday effect. For example, Bouman and Jacobsen (2002) and Jacobsen and Visaltanachoti (2009)

*- 7 years ago, 23 May 2016, 09:20am -*

Trading With Indices [Jonathan Kinlay]

In this post I want to discuss ways to make use of signals from relevant market indices in your trading. These signals can add value regardless of whether you trade algorithmically or manually. The techniques described here are one of the most widely applicable in the quantitative analyst's

*- 7 years ago, 17 May 2016, 12:02pm -*