skip to Main Content
×Close search
Search
Quantitative Investing Blog - Lucena Research-2

Murky Outlook for Oil Driven Investment Strategies

See how combining alternative data with AI presents a compelling portfolio ready to exploit the uncertainty around oil prices.
Erez Katz

Erez Katz, Lucena Research CEO and Co-founder

Oil Volatility: How to Identify a Statistical Arbitrage Opportunity

 

Opposing forces are holding oil prices in a tight range and delicate balance. Excess US production and oversupply is countered by growing demand, OPEC production cuts, a US/China trade war, and political unrest in Venezuela and the Middle East. 

While oil production and consumption are at historic highs, the oil industry is undergoing a major transformation. Since 2016, we’ve witnessed how every time oil prices fell significantly, OPEC and non-OPEC producers, stepped in to curtail production in order to stabilize prices. The US, on the other hand, had stepped in to assert its independence, and advance its market share to become the largest oil producer and consumer in the world.

Lately, US crippling sanctions imposed on Iran has led to a highly volatile situation which could erupt at any time. In the immediate term, this uncertainty presents a compelling investment opportunity as oil supply is likely to be subject to significant disruptions, which subsequently reverse the expected downtrend and could spike abruptly higher at any time. 

In this post, I want to showcase how to identify an effective statistical arbitrage opportunity in order to take advantage of this volatility in oil related stocks. I will be using Lucena's quantitative research platform, QuantDesk to construct and test an investment strategy. 

 

Building an Investment Strategy Using Oil

I'll start by using QuantDesk’s modules designed specifically to deploy the most suitable alternative data and machine learning disciplines specific to oil as follows:

  • Constituents selection: Using Lucena’s classification engine, we’ll identify constituents that are most likely to react to new volatility in oil. 
  •  
  • Long/short allocation: We will then use QuantDesk convex optimizer to determine the long/short direction and allocations for moderate risk or max Sharpe target. 
  •  
  • Backtest simulation: Subsequently we will train our models by executing multiple backtests during a predetermined training period and further validate the models over a separate independent and unseen validation period.
  •  
  • Perpetual trading simulation: Lastly, we will take the most successful and consistent optimized backtest in-sample and out-of-sample and carry the very same execution parameters forward perpetually into the future.
  •  

Using Lucena’s Portfolio Replication Engine

The Portfolio Replicator attempts to trace a target time series by identifying constituents from a predetermined basket, along with their corresponding weights. The idea is to construct a portfolio with a combined price action that tracks as close as possible to a target time series chart. In this case, we are tracking the historical price action chart of USO (United States Oil Fund LP). 

 

Identifying a Basket of 10 Positions that are Highly Correlated to USO 

Using QuantDesk’s portfolio replication technology, I’ve identified the following basket from the Russell 1000. As you can see below, all of the constituents together (as one portfolio or one unit) are highly correlated to USO’s historical performance.

Interestingly, the replication engine identified oil related companies varying from oil exploration, to oil retail, and technology.

 

Portfolio Replication Technology

Image 1: Using Lucena’s portfolio replication technology we have identified a basket of 10 positions from the Russell 1K that move in lockstep with USO oil ETF. Past performance is not indicative of future results.

 

Regression-Based Forecasting to Determine Market Relative Price Action

Using QuantDesk’s machine learning Forecaster, we want to determine whether there is a consensus of a price trajectory for each of the positions that were identified as highly correlated to oil.

Examining the output below, we see a mixed outlook as some stocks are projected to appreciate while others are expected to drop. A perfect baseline for a long/short arbitrage!

 

Stock and price forecasting for oil

Image 2: Lucena’s Price Forecaster, projecting a one month market-relative price trajectory of our highly correlated to oil basket. Past performance is not indicative of future results.

As can be seen, the Price Forecaster confidence score is low in most of the securities due to the recent high volatility of the underlying constituents (yellow stars).

Empirically speaking, the forecaster was able to project a downtrend fairly effectively, judging from the statistical confidence scores (blue stars).

 

Portfolio Optimization to Determine Positions Long/Short Direction and % Allocation Size

Given the long and short trajectory with a downtrend bias, we can optimize the portfolio to suggest the optimal long/short allocations for maximum risk adjusted return (Sharpe Ratio). Using Lucena's Mean Variance Optimizer (MVO) we can quickly determine which allocation presents the highest Sharpe ratio projection.

 

Portfolio Optimization Technology

Image 3: The blue line represents the portfolio before optimization and the orange line represents the optimized portfolio. Please note the 4 longs and 6 short constituents

 

Assessing Our Long/Short Portfolio

In order to address this mixed bag of longs and shorts, I’ve tasked the Portfolio Optimizer to proportionally allocate our $1M initial cash between constituents based on the Price Forecaster. Using the Price Forecaster as input to the Optimizer enables the mean variance optimizer (MVO) to take into account the projected prices and volatility of the constituents vs. only their historical price average.

We will track the above sample portfolio over the next four weeks and report on our outcome. Also, note the blue cone in Image 3 (presents the projected wide variance) compared to the orange cone which is much smaller representing lower volatility (or higher confidence).

 

Long and short portfolios for oil

Image 4: Our long/short portfolio for Oil based statistical arbitrage.

Please note: The portfolio above is designed for education only. Please do not take the opinion above as solicitation for equity purchase or investment advice. 

 

Conduct Your Own Quantitative Investment Research

QuantDesk is a self directed research platform geared to deploy data science and machine learning discipline through an easy to use user interface. In this post, I have shared with you how an oil price arbitrage opportunity can be implemented and backtested efficiently by merely using the platform.

Among the modules available are:

  • Price Forecaster - Forecast future equity prices.
  • Portfolio Optimizer - Optimize the allocation of constituents in a portfolio based on risk profile.
  • Hedge Finder - Identify additional securities that, when added to the portfolio, will reduce volatility without sacrificing returns.
  • Event Analyzer - Identify multi-factor market movers or equity movers events. 
  • BackTester - Conduct tests over time in the past to assess the efficacy of a module or a strategy.
  • Model Portfolios - Assess efficacy of a strategy perpetually through a paper trading simulation.
  •  

Start your own research with a free trial of QuantDesk. 

More Posts

Never miss a new blog post, subscribe to our newsletter.