Start now →

The Strategy That Does Everything Right — And Still Loses to Doing Nothing

By Kryptera · Published March 30, 2026 · 1 min read · Source: Trading Tag
Blockchain
The Strategy That Does Everything Right — And Still Loses to Doing Nothing

Member-only story

The Strategy That Does Everything Right — And Still Loses to Doing Nothing

A quantitative post-mortem on the SPY HMA+ROC system

KrypteraKryptera11 min read·Just now

--

Press enter or click to view image in full size

The Setup Looks Promising

On paper, this strategy has every right to work. It enters trades using the Hull Moving Average (HMA) — one of the smoothest, lowest-lag trend-following indicators available — triggering when price crosses below the fast HMA line. It exits using the Rate of Change (ROC), waiting for momentum to recover from oversold territory before closing the position. Entry on the open of the next bar. Realistic fees (0.1%) and slippage (0.2%) baked in. Clean logic, clean code.

import pandas as pd
import numpy as np
import yfinance as yf
import vectorbt as vbt

# -------------------------
# Download Data
# -------------------------

symbol = "SPY"
start_date = "1997-01-01"
end_date = "2030-01-01"
interval = "1d"

df = yf.download(symbol, start=start_date, end=end_date, interval=interval, multi_level_index=False)
df.reset_index().to_csv("SPY_clean.csv", index=False)

# -------------------------
# Necessary Parameters
# -------------------------

HMA_FAST_LENGTH = 24
HMA_SLOW_LENGTH = 40
ROC_OVERSOLD = -5.0
ROC_PERIOD = 10


# -------------------------
# Indicator Functions
# -------------------------

def price_cross_below_hma_fast(df…
This article was originally published on Trading Tag and is republished here under RSS syndication for informational purposes. All rights and intellectual property remain with the original author. If you are the author and wish to have this article removed, please contact us at [email protected].

NexaPay — Accept Card Payments, Receive Crypto

No KYC · Instant Settlement · Visa, Mastercard, Apple Pay, Google Pay

Get Started →