Works with the AI Agents you already use

    sp500 overnight vs intraday

    by Marcin Dec

    1

    Does your stock earn its returns overnight or during the session? Check any ticker in seconds, or scan the whole S&P 500 in about a minute.

    Free

    Security scanned
    sp500 overnight vs intraday

    sp500 overnight vs intraday

    Example session with this skill installed

    Analyze NVDA, TSLA, and AAPL from 2020 to now. Does the overnight return beat the intraday return for these stocks?

    • Read your context and instructions
    • Compiled the sp500 overnight vs

    I have analyzed the overnight (ON) versus intraday (ID) performance for NVDA, TSLA, and AAPL from 2020-01-02 to 2024-05-22. The data shows a clear dominance of overnight returns for the semiconductor and tech leaders, while the intraday session actually showed negative cumulative returns for some.

    Overnight vs Intraday Return Analysis

    TickerAnn. ON %Ann. ID %Mean ON (bps)Mean ID (bps)DominantBeta (SPY)
    NVDA68.42%12.15%22.415.82ON1.84
    TSLA45.18%-2.34%18.25-0.95ON2.12
    AAPL24.56%8.92%9.423.15ON1.28

    Analysis Summary:
    For NVDA and TSLA, the "Overnight Anomaly" is extremely pronounced. NVDA's performance is almost entirely driven by price gaps (likely earnings and news cycles), with the overnight session outperforming the intraday session by over 56 percentage points per year. TSLA actually lost value on an annualized basis during the trading day, while gaining significantly while the market was closed.

    Next steps

    1. Run a full S&P 500 scan to see if this trend holds across the entire Tech sector.
    2. Generate the dashboard charts for these tickers using --charts for a visual comparison of the cumulative return divergence.
    3. Review references/methodology.md to understand how adjusted prices impact these specific CAGR calculations.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Stock market returns are rarely distributed evenly throughout the day. This skill identifies whether a stock's performance is driven by overnight price gaps or intraday price action, helping you spot the overnight anomaly in the S&P 500.

    What it does

    • Performance splitting calculates separate cumulative and annualized returns for overnight (close-to-open) and intraday (open-to-close) windows.
    • Statistical testing runs Welch and Mann-Whitney U tests to compare return distributions across sectors, market caps, and beta levels.
    • Index-wide scanning downloads and processes the entire S&P 500 to rank companies by their overnight vs. intraday dominance.
    • Volatility analysis provides mean daily returns in basis points (bps) and calculates daily beta relative to SPY.
    • Visual reporting generates a comprehensive dashboard with charts showing return divergence for the top performers.

    How it works

    1. Run the script in Quick Mode by providing specific tickers to get immediate performance splits.
    2. Execute a Full Scan to analyze the current S&P 500 index members for broader market anomalies.
    3. Review the JSON summary to identify dominant return types and statistical significance (p-values).
    4. Analyze the generated CSV and Parquet files for deeper data exploration or integration into other tools.

    Frameworks & tools

    The skill utilizes Python 3.11 or 3.12 with yfinance for price data, pandas and numpy for vectorised returns, scipy for statistical tests, and matplotlib for data visualization.

    Why this beats prompting it yourself

    Accurately compounding overnight returns requires precise handling of adjusted close prices and open gaps across hundreds of tickers, which LLMs cannot do mathematically in context. This skill provides a verified Python engine that handles survivorship bias warnings, session dropping for live markets, and rigorous statistical validation.

    Use cases

    • Identify if a specific growth stock earns its premium primarily through earnings gaps.
    • Rank S&P 500 sectors to see which are most sensitive to overnight news flow.
    • Compare high-beta stocks against low-beta stocks to test for the overnight anomaly.
    • Generate data for research papers or newsletters regarding market microstructure.

    Known limitations

    Results are gross and do not include trading costs, taxes, or slippage. Calculations use current index members, introducing survivorship bias into historical scans. Short-history stocks under 500 days are excluded by default.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 14 days ago

    • Free with an Agensi account

    Accounts
    GitHub
    Software
    Python

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Network Access

    Allowed Hosts

    github.com
    en.wikipedia.org
    raw.githubusercontent.com
    Listed14 days ago

    What's inside

    Frequently Asked Questions

    This skill separates the S&P 500's performance into two distinct components: the overnight gap (close-to-open) and intraday action (open-to-close), allowing you to identify if a stock's gains are driven by pre-market sentiment or active trading hours.

    The skill is a Python-based engine compatible with any AI agent or environment that supports Python 3.11+ and standard data libraries like Pandas and Scipy. It can be integrated into custom LLM agents, local development environments, or automated trading research workflows.

    You receive the complete source code, a configuration guide, and sample output files (CSV/JSON/Parquet). This includes the 'Quick Mode' script for specific tickers and the 'Full Scan' engine for processing the entire S&P 500 index.

    The skill uses the yfinance library to pull historical adjusted close and open prices; it includes built-in logic to handle data cleaning, such as dropping incomplete live sessions and filtering out stocks with short trading histories (under 500 days).

    The analysis provides 'gross returns' based on price action; it does not factor in brokerage fees, bid-ask spreads, or overnight margin costs, which are essential to consider before applying these insights to a live trading strategy.

    New in Research & Analysis

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Research & Analysis.

    Free