Markets & Data ============== This page describes the markets available in Quantlens, how the price data is structured, and how to choose the right timeframe for your strategy. ---- .. contents:: On this page :local: :depth: 1 ---- Available markets ------------------ Quantlens provides access to **8 markets** on all plans. The universe is drawn from liquid, exchange-listed instruments across three asset classes: .. list-table:: :header-rows: 1 :widths: 20 20 60 * - Asset class - Markets - Notes * - **Equities** - NASDAQ stocks - Large and mid-cap US-listed equities. Universe filtered by liquidity. * - **Crypto** - BTC/USD, ETH/USD, SOL/USD, BNB/USD - Spot prices from major exchanges. * - **ETFs / Indices** - SPY, QQQ, GLD - Broad market and sector ETFs. Useful for single-asset strategy testing. .. note:: All prices are adjusted for splits and dividends (for equities) and represent the spot price (for crypto). No futures or leverage data is included. ---- Data coverage -------------- .. list-table:: :header-rows: 1 :widths: 30 25 45 * - Market - Data from - Notes * - NASDAQ stocks - 1998 - ~3,000 liquid symbols at peak. Older periods have fewer symbols. * - SPY - 1993 - Full history since inception. * - QQQ - 1999 - Full history since inception. * - GLD - 2004 - Full history since inception. * - BTC/USD - 2013 - From first reliable exchange data. * - ETH/USD - 2015 - From first reliable exchange data. * - SOL/USD - 2020 - Limited history — use with caution. * - BNB/USD - 2017 - From Binance listing. .. warning:: Strategies tested on crypto assets have less than 10 years of history. Statistical conclusions drawn from short periods are less reliable. See :doc:`avoiding_overfitting` for guidance. ---- OHLCV data structure --------------------- Every bar (candle) in the dataset contains five values: .. list-table:: :header-rows: 1 :widths: 15 85 * - Field - Description * - **Open** - First traded price of the bar period. * - **High** - Highest traded price during the bar period. * - **Low** - Lowest traded price during the bar period. * - **Close** - Last traded price of the bar period. Used by most indicators. * - **Volume** - Total shares (equities) or coins (crypto) traded during the bar period. Most indicators in Quantlens compute on the **Close** price by default. Volume-based indicators (:ref:`obv`, :ref:`mfi`, :ref:`cmf`, :ref:`adosc`, :ref:`vwma`) use both Close and Volume. Volatility indicators (:ref:`atr`, :ref:`natr`) use High, Low, and Close. ---- Choosing a timeframe --------------------- The timeframe (candle interval) determines how much historical data is visible and how frequently your strategy can act. .. list-table:: :header-rows: 1 :widths: 15 15 70 * - Timeframe - Bars/year - Characteristics * - **1 min** - ~120,000 - Very noisy. Requires fast execution. Not suited for daily-rebalance strategies. * - **5 min** - ~24,000 - Still noisy. Intraday only. * - **15 min** - ~8,000 - Better signal-to-noise than 1m/5m. * - **1 hour** - ~2,000 - Good for intraday swing strategies. * - **4 hour** - ~500 - Bridges intraday and daily. * - **1 day** - ~252 - Most widely used for systematic strategies. Clean signal, good data availability. **Recommendations for beginners:** Start with the **1-day** timeframe. It has the most data history, the lowest noise, and the lowest transaction costs. ---- Equity universe filtering -------------------------- Not all NASDAQ-listed stocks are included in the backtest universe. The data provider applies liquidity filters to avoid micro-cap and illiquid stocks: - Minimum average daily volume - Minimum market capitalisation - Listed on a major exchange (NASDAQ / NYSE) This means the universe includes roughly **500–1,500 tradeable symbols** at any given time, growing as more companies listed over the years. .. note:: Stocks that were delisted (due to bankruptcy, merger, or going private) are included in the data up to their delisting date. This partially mitigates survivorship bias. See :doc:`backtest_limitations` for a full discussion. ---- Index data ----------- The :ref:`index_value`, :ref:`index_weekly_close`, and :ref:`index_weekly_quantile` blocks draw from one of two benchmark indices, configurable in the :ref:`config` block: .. list-table:: :header-rows: 1 :widths: 20 80 * - Index - Description * - **NASDAQ** - NASDAQ Composite — broad measure of all NASDAQ-listed stocks. Good benchmark for tech-heavy strategies. * - **SPY** - S&P 500 ETF — 500 largest US companies by market cap. Better benchmark for diversified US equity strategies. Use the index as a **market filter** to avoid holding positions during broad market downtrends. A common rule: only hold positions when ``Index Value > SMA(200)``.