
Forex ATR in Python: calculate volatility from OHLCV
Calculate forex ATR in Python from OHLCV bars. Test Wilder smoothing, convert ATR to pips and percentages, and avoid seed and unfinished-candle errors.
26 posts on python from the SiftingIO market data blog, spanning real-time and historical coverage across stocks, forex, crypto, commodities, and on-chain venues.

Calculate forex ATR in Python from OHLCV bars. Test Wilder smoothing, convert ATR to pips and percentages, and avoid seed and unfinished-candle errors.

Record BTCUSD and ETHUSD reference-price updates to Parquet with Python. Includes a tested WebSocket recorder, session reports and clear data limitations.

Build a forex correlation matrix in Python with API data. Compare EURUSD, GBPUSD and USDJPY returns without hiding missing days or reversing quote direction.

Fix SiftingIO's 406 gzip_required error in curl, Python, Node and Go. Learn which clients decode automatically and when to handle gzip yourself.

How to use an economic calendar API to fetch scheduled US macro releases as JSON: UTC times, impact tiers, filtering by event, gating code and windowing a year of events.

Detect missing candles in OHLCV bar data with a UTC grid and a trading calendar, then backfill safely without forward-filling volume or range.

How cursor pagination works on a market data API, with request math, a Python loop, and a gap check for multi-year pulls of 1-minute OHLCV bars.

Pull US economic calendar events (CPI, NFP, FOMC) as JSON and join each release to the one-minute OHLCV bar that was open when it hit, using the real field names.

How to fetch the exact 1-minute OHLCV bar under each trade fill for stocks, forex, and crypto with one API, with verified page limits, intervals, and pagination.

Pull Form 4 insider transactions for US stocks from a REST API, decode transaction codes P, S, M, and F, and separate open-market buys from routine noise.

Pull profit margins, ROE, and debt to equity from SEC filings with one API call, and drop down to raw XBRL concepts when a precomputed ratio isn't enough.

How to pull daily and intraday OHLCV stock bars from a REST API: request format, response fields, intervals, cursor pagination, history depth, and pitfalls.

How Quantitative Trading at Brown uses intraday US equities OHLCV bars from the SiftingIO API for student research on returns, volatility, and trading volume.

The cross rate formula with worked math: derive EURGBP from EURUSD and GBPUSD, carry bid and ask through the triangulation, and compute it in Python.

TA-Lib won't install? Skip the C compile and numpy version matrix: pull RSI, MACD, and moving average readings from two REST endpoints with plain requests.

1-minute OHLCV bars are the base timeframe. The exact rules for resampling minute bars into 5m, 15m, and 1h bars, with the alignment and gap traps to avoid.
Build a stock portfolio tracker with a US stocks API: positions as data, daily-bar backfill, unrealized P&L from live quotes, and a WebSocket upgrade path.

Five ways historical price data silently corrupts a backtest: adjustment method, venue-dependent highs and lows, gap policy, session cuts, and restated bars.

Build a total-return series from as-traded prices, split factors, and cash dividends with reinvestment math, and see where the adjusted-close shortcut misleads a backtest.

Pull SEC Form 4 insider transactions for a stock watchlist with Python: decode transaction codes, paginate the API, and build a screening table with pandas.

How to pull scheduled US economic events from one endpoint and align them with OHLCV bars so a backtest knows when CPI, NFP, and FOMC actually hit.

yfinance rate limited or throwing Too Many Requests? A call-for-call map to move daily history, intraday bars, and latest-price pulls to a keyed API in Python.

How to read bid and ask from a quote snapshot, compute the bid ask spread in basis points, and flag wide or stale quotes in Python before users see them.
How to diff 13F-HR holdings between reporting cycles using SiftingIO, find new positions, exits, and meaningful size changes.

How to pull scheduled US economic events from one endpoint and align them with OHLCV bars so a backtest knows when CPI, NFP, and FOMC actually hit.

How to pull historical OHLCV bars and XBRL fundamentals for one stock ticker from SiftingIO, and avoid the split and fiscal-year pitfalls.