BRS Crude Oil Algorithmic Trading Strategy Is Still Bullish

BRS Crude Oil Algorithmic Trading Strategy Is Still Bullish

Source: Andrew Henkelman photo of the Charging Bull by Arturo Di Modica in New York

BRS Crude Oil Algorithmic Trading Strategy Is Still Bullish

Source: Andrew Henkelman photo of the Charging Bull by Arturo Di Modica in New York City.

AndreyKrav/iStock Editorial via Getty Images

Russia’s invasion of Ukraine on February 24th caused crude oil futures prices to spike, and in the following weeks, oil prices have been highly volatile. No one can be sure how far Russia will go to “weaponize” its crude exports, as the quick victory that Russia had imagined faced stiff resistance from Ukraine and rallied the NATO alliance to provide military and financial support.

The U.S. has embargoed oil imports from Russia, and EU has proposed banning all oil imports to Europe within six months. Meanwhile, the U.S. and other members of the International Energy Agency have agreed to a large drawdown from strategic oil reserves to soften the impact of lower imports from Russia.

crude oil price chart

Crude OIl Futures (Barchart.com, Inc)

Assessing world oil supply and demand uncertainties to guide oil trading is no easy task in this environment. In fact, oil prices appear to be exhibiting “excessive volatility,” and at times, price movements seem to be unrelated to any “new news” to account for their changes. Under such circumstances, utilizing the psychology of herd behavior may in fact provide the best guidance.

To that point, I developed an algorithmic trading (AT) strategy model, Vertical Risk Management (VRM), about 15 years ago. It is based on behavioral finance, and I have provided the outputs to energy hedge funds over the years to guide their oil positioning. Very recently, I have begun to provide daily outputs to subscribers of my information service, Boslego Risk Services, in Seeking Alpha’s Marketplace.

In this article, I describe the theoretical basis of the strategy and present hypothetically back-tested results. (The requisite SEC disclosures relative to hypothetical back-testing results appear at the end of this article.) As of May 2nd, the strategy provided a bullish signal.

“From Efficient Markets Theory to Behavioral Finance”

My VRM model was developed based on a paper with the title above, written by Nobel economics laureate (2013), Robert J. Shiller. In this paper, he discusses the failure of the efficient market theory to explain stock market prices and the “blooming of behavioral finance.” He proved that stock market prices exhibited “excessive volatility” from what would be expected, if market prices behaved according to the efficient market theory.

A person shaking another person's hand Description automatically generated

Robert J. Shiller accepting The Sveriges Riksbank Prize in Economic Sciences in Memory of Alfred Nobel 2013 from H.M. King Carl XVI of Sweden. (Nobel Media AB)

In particular, he describes one of the oldest theories about financial markets, which he calls price-to-price feedback theory. Essentially, he argues that the emotions of greed and fear drive market prices far too high on the upside, and much too low in downturns.

real stock prices and present values of subsequent real dividends

Real Stock Prices (Source: Journal of Economic Perspectives-Volume 17, Number 1-Winter 2003-Pages 83-104.)

In his book, Irrational Exuberance (2000), Shiller argued that “market feedback, transmitted by word-of-mouth as well as the media, was at work in producing the bubble we were seeing then. I further argued that the natural self-limiting behavior of bubbles, and the possibility of downward feedback after the bubble was over.” He created a feedback model to describe price changes with a distributed lag and compared them to price changes, if they had behaved like a random walk, as held by the efficient markets’ theory.

Text, letter Description automatically generated

Feedback Model Formulae. (Source: Journal of Economic Perspectives-Volume 17, Number 1-Winter 2003-Pages 83-104.)

I developed and tested hypotheses to try to quantify conditions that might make investors feel greedy or fearful. And it turns out that the size of market gains and losses, combined with the speed of them, does a pretty good job in determining when to be long (bullish), when to be short (bearish), and when to be out (neutral). There are other unique positioning techniques built into my model, such as a position adjustment based on market price volatility for risk control.

Risk Management is Key

In The Intelligent Investor, Benjamin Graham states, “the essence of investment management is the management of risks, not the management of returns.” At the heart of this approach is loss minimization, deliberately protecting oneself against serious losses. Warren Buffett described this book as “by far the best on investing ever written.”

My approach is to separate emotions from investment decisions by running an algorithmic trading (AT) strategy that provides systematic, quantitative signals. The benefit of an AT strategy is that it can be back-tested under many different market conditions to determine the potential risks and returns of its future use. While such a strategy cannot guarantee future results, it can show how it would have performed in the past, unlike discretionary strategies, dependent on the skills of a trader. And at the least, it can eliminate strategies that would have performed poorly in the past.

Developing and Assessing the VRM Strategy Risk and Return

By applying the VRM model systematically, I created the Boslego Risk Services’ Crude Oil Index (“BRS”). To assess its risk and return, I defined two time periods. One is an “In-Sample” period (1985-2013), which refers to the period in which the algorithmic parameters may be varied to achieve different levels of risk for risk management purposes, which result in varying levels of return.

And I specified an “Out-of-Sample” period (January 2014-April 2022), also called a “walk-forward test,” during which the same parameters that were set in the “In-Sample” period were applied. Such a strategy development regimen is used to prove the validity and robustness of an investment strategy. It is one of the very best methods available, according to Robert Pardo (see The Evaluation and Optimization of Trading Strategies, Copyright © 2008 by Robert Pardo, pages 247, 252).

I chose the start date for the In-Sample Period due to data availability. NYMEX crude oil futures began trading in April 1983. However, the EIA database I used did not have data for the second and fourth contract month until January 1985. As I will explain below, after performing simulations for the first-month futures contract, I repeated the simulations for the second-, third- and fourth-month contracts. Because I wanted to use the same start date for each simulation, I restricted all start dates to January 1985 so that the results were comparable.

I chose the end of 2013 for the termination of the In-Sample Period because I wanted the simulation to be sufficiently-long (29 years) to cover many market conditions. I also wanted the use 2014 in the Out-of-Sample period because it was a year that included both a rise and epic crash in oil futures prices, to assess how well the strategy would perform under challenging market conditions.

To measure the rate of return (ROR), I used the compounded growth rate, which is calculated by dividing the value of an investment at the end of the period by its value at the end of the prior period, subtracting one from the subsequent result.

To measure risk, I used the maximum drawdown (MD), or a series of Peak-to-Valley (P2V) calculations, which indicates the risk of an asset, an investment, or a portfolio, by measuring the difference between a maximum peak value and the subsequent lowest value.

Maximum Drawdown

In my view, the maximum drawdown is the most important risk parameter. Investors in hedge funds often specify a maximum drawdown loss as a trigger point to terminate a lock-up of their funds in the investment agreement.

Often, volatility is used as a risk measurement by investment analysts, but fluctuations in returns do not translate to loss levels. The Sharpe Ratio is also a popular indicator of the riskiness of an investment.

It is calculated as follows:

sharpe ratio

Sharpe Ratio. (Source: CFI Education Inc.)

The Sharpe Ratio uses the standard deviation in the denominator. As such, the ratio declines as the standard deviation rises. That means that it punishes an investment strategy that produces large upward changes in return to the same degree as one that has large downward changes in return; however, such large gains should not be counted the same as large losses.

The maximum drawdown calculates the maximum value over the range of dates being tested, also known in algebraic terminology as a “global” maximum, as opposed to a “local” maximum, achieved prior to a recovery in the drawdown calculations.

The maximum drawdown is key because it shows how much one would have lost in the worst-case scenario by following an investment strategy. Often, investors abandon an investment once they sustain losses beyond their risk tolerance levels, locking-in their losses. The best type of strategy is one which is sustainable.

The lower the maximum drawdown, the higher the return needed to recover to breakeven. For example, a 50-percent drawdown requires a subsequent 100-percent return to achieve breakeven.

Also, the larger the drawdown, the longer it generally takes to recover to breakeven. A 100-percent drawdown is a total loss, no recovery is possible.

Calculating the maximum drawdown requires calculating daily peak-to-valley (P2V) statistics. Then one finds the maximum P2V over the data range of interest for the maximum drawdown.

The peak-to-valley formula I used is:

P2V = -(LP – PV) / PV × 100%

where:

P2V is the peak-to-valley, in percent;

LP is Lowest value following a peak value; and

PV is Peak value.

Note: By using the negative value in the equation, the drawdown becomes a positive value (e.g., 50% is a drawdown of 50%).

Front-Month (Nearby) Contract Results

To design and test the VRM model, I used NYMEX crude oil futures contracts. In this initial test of hypothetical returns (referred to herein as “Market” or “NYMEX”), I assumed a buy-and-roll position in the nearby, or front month, futures contract. Because nearby futures contracts expire each month, the position needs to be sold (if long), while simultaneously buying (or rolling) the position into the next nearby contract.

I assumed using the daily closing prices as trade execution prices, but in reality, there is a bid-ask spread, meaning that one may not receive the actual closing prices in execution, and there would be a brokerage commission involved. However, since the same assumptions were used for the BRS AT strategy, I believe the comparison of results between the two is a fair one.

In my actual trading based on another AT strategy I developed that assumed achieving daily closing prices, I employed a proprietary trading tactic. Over time, my actual average trade prices beat the daily closing price average, so using closing prices as a proxy for trade prices is not unreasonable.

The ROR of the Market during the “In-Sample” period was 276 %, whereas the BRS strategy ROR was 369 %. The maximum drawdown of the Market over the same period was 77 %. This compares to a 53 % maximum drawdown for the BRS strategy.

The ROR of the Market during the “Out-of-Sample” period was -90 %, whereas the BRS strategy was +47 %. In fact, on April 20, 2020, the nearby contract closed at a price of negative $37.63/bbl, implying that the loss would have exceeded 100 %. However, I artificially limited the loss to 99 % to test whether the strategy would have recovered, had the loss been limited to less than 100%.

The BRS strategy had a 42 % maximum drawdown. The assumption of limiting the loss when the futures contract closed below zero was not needed since the BRS strategy had a short position on the day futures closed in negative territory.

Contract 1

In-Sample

ROR

MD

Market

276%

Market

77%

BRS

369%

BRS

53%

Out-of-Sample

ROR

MD

Market

-90%

Market

100%

BRS

47%

BRS

42%

Daily graphs of results follow.

Chart Description automatically generated

In-Sample ROR (Boslego Risk Services.)

in-sample returns

In-Sample ROR (Boslego Risk Services)

in-sample period

In-Sample MD (Boslego Risk Services)

in-sample drawdowns

In-Sample Maximum Drawdown (Boslego Risk Services)

out-of-sample period

Out-of-Sample ROR (Boslego Risk Services)

out-of-sample return

Out-of-Sample ROR (Boslego Risk Services)

Chart, line chart Description automatically generated

Out-of-Sample Maximum Drawdown (Boslego Risk Services)

Chart, bar chart Description automatically generated

Out-of-Sample Maximum Drawdown (Boslego Risk Services)

Second-Month Contract Results

The negative closing price of the nearby crude oil futures price in April 2020 lasted only one day and required the seller to pay the buyer to take the oil. It was a one-time anomaly over the span of crude futures trading which had commenced in April 1983. This one-time event resulted because tank storage at the NYMEX delivery location in Cushing, Oklahoma, was full. The second-month contract did not venture into negative territory.

Because the second-month contract exhibits less volatility than the nearby contract, I performed the same analysis as explained above using that futures contract, under the same assumptions.

The results depicted below show that the BRS strategy exceeded the returns of the Market in both the In-Sample and Out-of-Sample periods. Moreover, the BRS maximum drawdown results show that risk was significantly reduced in both sample periods.

Contract 2

In-Sample

ROR

MD

Market

272%

Market

72%

BRS

1003%

BRS

29%

Out-of-Sample

ROR

MD

Market

2%

Market

79%

BRS

23%

BRS

45%

Daily graphs of results follow.

Chart Description automatically generated with medium confidence

In-Sample ROR (Boslego Risk Services)

Chart, bar chart Description automatically generated

In-Sample ROR (Boslego Risk Services)

Chart Description automatically generated

In-Sample Maximum Drawdown (Boslego Risk Services)

Chart, bar chart Description automatically generated

In-Sample Maximum Drawdown (Boslego Risk Services)

Chart, line chart Description automatically generated

Out-of-Sample ROR (Boslego Risk Services)

Chart, bar chart Description automatically generated

Out-of-Sample ROR (Boslego Risk Services)

Chart, line chart Description automatically generated

Out-of-Sample Maximum Drawdown (Boslego Risk Services)

Chart, bar chart Description automatically generated

Out-of-Sample Maximum Drawdown (Boslego Risk Services)

Third- and Fourth-Month Result Comparisons

I repeated the simulations for the third- and fourth month contracts. I put the results together to enable an easier comparison.

NYMEX

In-Sample

Out-of-Sample

ROR

MD

ROR

MD

Contract 1

276%

77%

-90%

77%

Contract 2

272%

72%

2%

79%

Contract 3

275%

73%

3%

82%

Contract 4

272%

72%

2%

79%

The largest disparity in results is between the first contract and the others caused by the collapse in the nearby contract in April 2020to a value below $0. The results for the other contract months were very similar.

BRS

In-Sample

Out-of-Sample

ROR

MD

ROR

MD

Contract 1

369%

53%

47%

42%

Contract 2

1003%

29%

23%

45%

Contract 3

950%

36%

15%

47%

Contract 4

1003%

29%

23%

45%

Trading Crude Oil with the BRS Strategy

At the end of each trading day, I update the NYMEX prices in the VRM model. The BRS strategy displays the positioning for the contract month being utilized, whether short or long and the percentage of the maximum-sized position; that is determined by the trader, depending on the trading account size.

I also utilize a daily “liquidity constraint” of 50% in the BRS strategy, meaning that the trade size in each day cannot change by more than that percentage of the maximum-sized position.

I have opted to use the second-nearby contract instead of the nearby contract to avoid unwanted volatility. As of the close of Friday, the April 29th, the crude oil futures position size was +100% long (bullish) for the second-nearby contract (July 2022).

Conclusions

Andy Hall, who became known as the “god” of crude oil trading, had reaped a $100 million bonus in a single year (2008), when his firm was owned by Citibank. But in August 2017, he shut down his main hedge fund, Astenbeck Capital Management, due to a very large, multi-year drawdown in capital.

A bald person in a suit Description automatically generated with medium confidence

Andy Hall (Bloomberg)

Based on public data, the fund dropped from $5 billion to about $2 billion, a loss of about 60 percent. The size of the maximum drawdown was simply too much, even for the oil trading ‘god,’ and/or his investors.

In his farewell letter, Hall wrote, “Algorithmic trading systems have increasingly come to dominate. Investing in oil under current market conditions using an approach based primarily on fundamentals has therefore become increasingly challenging. It seems quite likely this will continue to be the case for some time to come.”

The Commodity Futures Trading Commission had reported in April 2017 that algorithmic trading had accounted for nearly 60 percent of trading volume in energy-related contracts from late 2014 to late 2016.

Recent oil price movements have appeared to be unrelated to the fundamentals reported every day. They exhibit what Shiller had called “excessive volatility.” Such volatility may be caused by the activities of traders motivated by fear and greed.

To succeed in such an environment, the trading strategy should be attuned to the factors driving prices. The BRS Crude Oil Index strategy was specifically designed to identify conditions that promote emotions of fear or greed and to risk-manage positions accordingly, to prevent the huge drawdowns in capital that the positions in crude futures can cause, while profiting due to large loss avoidance.

Important SEC Disclosures

This material is provided for limited purposes. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument. References to specific asset classes and financial markets are for illustrative purposes only and are not intended to be, and should not be interpreted as, recommendations or investment advice. The opinions expressed in this article represent the current, good-faith views of the author(s) at the time of publication. The views are provided for informational purposes only and are subject to change. This material does not take into account any investor’s particular investment objectives, strategies, tax status, or investment horizon. Investors should consult a financial advisor for advice suited to their individual financial needs. The author cannot guarantee the accuracy or completeness of any statements or data contained in the article. Predictions, opinions, and other information contained in this article are subject to change. Any forward-looking statements speak only as of the date they are made, and the author assumes no duty to update them. Forward-looking statements are subject to numerous assumptions, risks, and uncertainties. Actual results could differ materially from those anticipated. Past performance is not a guarantee of future results. As with any investment, there is a potential for profit as well as the possibility of loss.

The information presented in this paper relates to the creation and testing of investment models and the use of backtested performance data. Back-tested results are calculated by the retroactive application of a model constructed on the basis of historical data and based on assumptions integral to the model which may or may not be testable and are subject to losses. Hypothetical performance results have many inherent limitations, some of which are described below. No representation is being made that any account will or is likely to achieve profits or losses similar to those shown. In fact, there are frequently sharp differences between hypothetical performance results and the actual results subsequently achieved by any particular trading program. One of the limitations of hypothetical performance results is that they are generally prepared with the benefit of hindsight. Back-testing allows the security selection methodology to be adjusted until past returns are maximized. In addition, hypothetical trading does not involve financial risk, and no hypothetical trading record can completely account for the impact of financial risk in actual trading. For example, the ability to withstand losses or to adhere to a particular trading program in spite of trading losses are material points which can also adversely affect actual trading results. There are numerous other factors related to the markets in general or to the implementation of any specific trading program which cannot be fully accounted for in the preparation of hypothetical performance results and all of which can adversely affect actual trading results.”