A Volatility Trading System-Time Series Analysis in Python

Subscribe to newsletter

Time series analysis is an important subject in finance. In this post, we are going to apply a time series technique to a financial time series and develop an investment strategy.  Specifically, we are going to use moving averages to trade volatility Exchange Traded Notes (ETN).

Moving averages are used on financial time series data to smooth out short-term noises and identify longer-term trends. We apply them to VXX, a volatility ETN. Note that VXX

  • Launched in 2009
  • Enables investors to bet on the size of swings in the S&P 500 Index (SPX)
  • Used by individual investors and hedge fund managers alike
  • Peaked at $2 billion under management in Feb. 2018, now $800 million
  • Structured as a debt instrument with a maturity date of Jan. 30, 2019
  • Was replaced by the VXXB, which has other features. Read more

The trading rules are as follows [1],

Subscribe to newsletter https://harbourfrontquant.beehiiv.com/subscribe Newsletter Covering Trading Strategies, Risk Management, Financial Derivatives, Career Perspectives, and More

If 10-day Moving Average (MA10) < 30-day Moving Average (MA30) Sell Short

If 10-day Moving Average (MA10) >= 30-day Moving Average (MA30) Cover Short

The system is implemented in Python. Graph below shows the MAs and VXX for the last 2 years.

Time Series Analysis in Python Moving Averages

VXX and Moving Averages

The position size is $10000; leverage is not utilized, and profit is not compounded. Graph below shows the equity curve for the trading strategy from January 2009 to January 2019.

Time Series Analysis in Python for Volatility Trading Strategies

Equity curve for VXX trading system

The strategy is profitable, and the moving averages help identify the trends.

References

[1] L. Connors, Buy the Fear, Sell the Greed: 7 Behavioral Quant Strategies for Traders, TradingMarkets Publishing, 2018

Further questions

What's your question? Ask it in the discussion forum

Have an answer to the questions below? Post it here or in the forum

Question title is too long. Max length is 100 characters.
LATEST NEWSStock market today: Dow, S&P 500, Nasdaq futures fall on bleak data with Big Tech earnings on deck
Stock market today: Dow, S&P 500, Nasdaq futures fall on bleak data with Big Tech earnings on deck
Stay up-to-date with the latest news - click here
LATEST NEWSMarket volatility spurred by Trump tariffs was a boost for Europe's banks
Market volatility spurred by Trump tariffs was a boost for Europe's banks

UBS, Barclays, Deutsche Bank, and HSBC all reported pre-tax profits above analyst estimates in their first quarters amid market turbulence.

Stay up-to-date with the latest news - click here
LATEST NEWSVERSES® Announces Commercial Launch of Genius™
VERSES® Announces Commercial Launch of Genius™

Launch to Drive Enterprise Customer Acquisition, Product Adoption and Revenue Growth VANCOUVER, British Columbia, April 30, 2025 (GLOBE NEWSWIRE) — VERSES AI Inc. (CBOE:VERS) (OTCQB:VRSSF) (“VERSES” or the “Company”) a cognitive computing company specializing in next-generation intelligent software systems is pleased to announce that the…

Stay up-to-date with the latest news - click here
LATEST NEWSEcora Resources PLC to Present at the Metals & Mining Virtual Investor Conference May 8th
Ecora Resources PLC to Present at the Metals & Mining Virtual Investor Conference May 8th

Company invites individual and institutional investors, as well as advisors and analysts, to attend online at VirtualInvestorConferences.com LONDON, April 30, 2025 (GLOBE NEWSWIRE) — Ecora Resources (OTCQX: ECRAF), based in London, focused on critical minerals royalties and streams, today announced that Geoff Callow, Head of Investor…

Stay up-to-date with the latest news - click here
LATEST NEWSVericel Corp. (VCEL) Faces Challenges as Burn Care Revenue Wanes and MACI Growth Remains Uncertain
Vericel Corp. (VCEL) Faces Challenges as Burn Care Revenue Wanes and MACI Growth Remains Uncertain
Stay up-to-date with the latest news - click here

Leave a Reply