Posts

About Security Trading Analytics Blog

Image
  ETF Price Puzzles: Examples Showing Tiingo’s Raw and Adjusted Series Don’t Always Differ As I was preparing an analysis of a buy‑sell model for several major ETFs, I stumbled across some unexpected puzzles in the price data.   Tiingo provides both raw and adjusted price series, but for certain ETFs the two are identical — even across known split dates. This post explains how I discovered these puzzles in selected ETF ticker prices from Tiingo.   The post also describes why the puzzles matter, and how you can adjust for them when performing ETF analyses with Tiingo data. Where I Discovered Tiingo ETF Price Puzzles I was analyzing a model based on EMA proper orders for prices when I first noticed ETF price puzzles.   Any ETF price series can have multiple EMAs depending on their period lengths.   No matter what the period length for an EMA, it is always dependent on its underlying price data.   For any trading date, EMAs with shorter period lengths...
Image
   Modeling Buy-Sell Trades with SQL and EMAs: Lifecycle Segmentation and Strategy Comparison This post demonstrates how to transform a trading day ledger into segmented trades using SQL, and compares the performance of a buy-sell model against a buy-and-hold strategy—both across the full evaluation period and during a short-term market shock. It builds on concepts introduced in this prior post on preparing the trading day ledger, and is part of the broader Security Trading Analytics blog focused on lifecycle-aware strategy design and principled security selection. The raw close prices sourced from Tiingo start on 2022-01-03 and run through 2025-10-23.  The ledger contains a succession of trading row values that prescribe when to buy and sell tickers. This post demonstrates how to process the ledger from the prior post with a SQL model that indicates when to buy and sell tickers.  The current post examines how to assign trade_id values to each row in the ledger...