Skip to content
LAM
Read Home Blog
Make Projects HTML Tools Games
Touch grass Notes Resume Links
Home Blog HTML Projects
Tools Games Notes Resume Links
Back Bitcoin vs. S&P 500 Correlation Analysis Finance
Download Open
Show description 2,394 chars · Finance

Bitcoin vs. S&P 500 Correlation Analysis

Bitcoin vs. S&P 500 Correlation Analysis














How Does Money Flow Between Bitcoin and the Stock Market?

An analysis of the relationship between Bitcoin (BTC) and the S&P 500.






Executive Summary: A Positive Correlation


Your observation of an inverse relationship (when one goes up, the other goes down) is a common hypothesis, but the data from recent years points to the opposite conclusion. The dominant trend, especially since the 2020 pandemic, has been a strong positive correlation.

This means Bitcoin and the S&P 500 (a proxy for the stock market) have increasingly moved in the same direction. This application explores this relationship, showing how it has evolved and explaining the key factors that drive these shared movements.







The Evolving Correlation: BTC vs. S&P 500

This chart shows the 90-day rolling correlation between Bitcoin and the S&P 500. A value of 1 means they move perfectly in sync; -1 means they move in perfect opposition; 0 means no relationship.





Notice the clear shift from a low, inconsistent correlation (pre-2020) to a sustained positive correlation (post-2020), peaking during times of high market uncertainty.





An Amplified Relationship: Annual Returns

While they move in the same direction, Bitcoin's volatility means its performance is often an amplified or "leveraged" version of the stock market's. This chart compares their annual returns.





In 2022, both fell, but Bitcoin fell much harder. In 2023 and 2024, both recovered, but Bitcoin's rally was dramatically larger.





Key Drivers & Market Nuances



1. The "Risk-On" Asset Narrative

The strongest driver of the positive correlation is that large investors (like institutions and funds) treat Bitcoin as a "risk-on" asset, much like high-growth tech stocks.


"Risk-On" Sentiment: When the economic outlook is good and interest rates are low, investors are willing to take on more risk. Money flows into *both* stocks and crypto, pushing prices up together.

"Risk-Off" Sentiment: When the Federal Reserve raises interest rates or fears of a recession grow, investors sell their risky assets. Money flows *out of both* stocks and crypto, pulling prices down together.





2. When Does the Inverse Relationship Happen?

Your observation isn't wrong; it just describes the exception, not the rule.…

Bitcoin vs. S&P 500 Correlation Analysis

14,289 bytes · HTML source
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Bitcoin vs. S&P 500 Correlation Analysis</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap" rel="stylesheet">
    <!-- Chosen Palette: Slate Gray & White with Accent Blue (Stocks) and Accent Orange (Bitcoin) -->
    <!-- Application Structure Plan: A single-page, vertically scrolling narrative. 1) Header with the main question. 2) "Executive Summary" section answering the user's question directly (it's a positive correlation, not inverse). 3) "The Evolving Correlation" section with an interactive line chart (Chart.js) showing the 90-day rolling correlation over time (2018-2025). 4) "An Amplified Relationship" section with a grouped bar chart (Chart.js) comparing annual returns (BTC vs. S&P 500 for 2022, 2023, 2024). 5) "Key Drivers & Nuances" text section explaining the 'Risk-On' concept and the 'banking crisis' exception. This structure directly addresses the user's query, rebuts it with data, then explains the 'why' and 'when' of the relationship. -->
    <!-- Visualization & Content Choices: 1. Report Info: Historical rolling correlation (data mocked from research). Goal: Show the relationship is not static and has trended positive. Viz: Line Chart (Chart.js). Interaction: Hover for date/correlation value. Justification: Best for time-series data. 2. Report Info: Annual performance comparison (data from research). Goal: Show Bitcoin as an 'amplified' S&P 500. Viz: Grouped Bar Chart (Chart.js). Interaction: Hover for year/asset/return %. Justification: Direct, stark comparison of volatility and direction. 3. Report Info: Key findings text (from research). Goal: Explain the 'why'. Viz: Styled HTML/Tailwind text blocks. Interaction: None. Justification: Clear, digestible explanations. -->
    <!-- CONFIRMATION: NO SVG graphics used. NO Mermaid JS used. -->
    <style>
        body {
            font-family: 'Inter', sans-serif;
            background-color: #f8fafc;
        }
        .chart-container {
            position: relative;
            width: 100%;
            max-width: 900px;
            margin-left: auto;
            margin-right: auto;
            height: 400px;
            max-height: 50vh;
        }
        @media (max-width: 768px) {
            .chart-container {
                height: 300px;
                max-height: 60vh;
            }
        }
        .section-card {
            background-color: #ffffff;
            border-radius: 0.75rem;
            padding: 1.5rem 2rem;
            margin-bottom: 1.5rem;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
        }
    </style>
</head>
<body class="text-slate-800">

    <div class="max-w-7xl mx-auto p-4 md:p-8">
        
        <header class="text-center mb-12">
            <h1 class="text-3xl md:text-5xl font-bold text-slate-900 mb-4">How Does Money Flow Between Bitcoin and the Stock Market?</h1>
            <p class="text-xl text-slate-600">An analysis of the relationship between Bitcoin (BTC) and the S&P 500.</p>
        </header>

        <main>
            <section id="executive-summary" class="section-card">
                <h2 class="text-2xl font-bold text-slate-900 mb-4">Executive Summary: A Positive Correlation</h2>
                <div class="space-y-4 text-slate-700">
                    <p>Your observation of an inverse relationship (when one goes up, the other goes down) is a common hypothesis, but the data from recent years points to the opposite conclusion. The dominant trend, especially since the 2020 pandemic, has been a <strong class="text-blue-600">strong positive correlation</strong>.</p>
                    <p>This means Bitcoin and the S&P 500 (a proxy for the stock market) have increasingly moved in the <strong class="text-blue-600">same direction</strong>. This application explores this relationship, showing how it has evolved and explaining the key factors that drive these shared movements.</p>
                </div>
            </section>

            <section id="correlation-chart" class="section-card">
                <h2 class="text-2xl font-bold text-slate-900 mb-2 text-center">The Evolving Correlation: BTC vs. S&P 500</h2>
                <p class="text-center text-slate-600 mb-6">This chart shows the 90-day rolling correlation between Bitcoin and the S&P 500. A value of 1 means they move perfectly in sync; -1 means they move in perfect opposition; 0 means no relationship.</p>
                <div class="chart-container">
                    <canvas id="correlationChart"></canvas>
                </div>
                <p class="text-center text-sm text-slate-500 mt-4">Notice the clear shift from a low, inconsistent correlation (pre-2020) to a sustained positive correlation (post-2020), peaking during times of high market uncertainty.</p>
            </section>

            <section id="performance-chart" class="section-card">
                <h2 class="text-2xl font-bold text-slate-900 mb-2 text-center">An Amplified Relationship: Annual Returns</h2>
                <p class="text-center text-slate-600 mb-6">While they move in the same direction, Bitcoin's volatility means its performance is often an amplified or "leveraged" version of the stock market's. This chart compares their annual returns.</p>
                <div class="chart-container" style="max-width: 700px;">
                    <canvas id="performanceChart"></canvas>
                </div>
                <p class="text-center text-sm text-slate-500 mt-4">In 2022, both fell, but Bitcoin fell much harder. In 2023 and 2024, both recovered, but Bitcoin's rally was dramatically larger.</p>
            </section>

            <section id="key-drivers" class="section-card">
                <h2 class="text-2xl font-bold text-slate-900 mb-4">Key Drivers & Market Nuances</h2>
                <div class="grid md:grid-cols-2 gap-6">
                    <div class="space-y-4 text-slate-700 p-4 bg-slate-50 rounded-lg">
                        <h3 class="text-xl font-semibold text-slate-800">1. The "Risk-On" Asset Narrative</h3>
                        <p>The strongest driver of the positive correlation is that large investors (like institutions and funds) treat Bitcoin as a <strong class="text-orange-600">"risk-on"</strong> asset, much like high-growth tech stocks.</p>
                        <ul class="list-disc list-inside space-y-2">
                            <li><strong>"Risk-On" Sentiment:</strong> When the economic outlook is good and interest rates are low, investors are willing to take on more risk. Money flows into *both* stocks and crypto, pushing prices up together.</li>
                            <li><strong>"Risk-Off" Sentiment:</strong> When the Federal Reserve raises interest rates or fears of a recession grow, investors sell their risky assets. Money flows *out of both* stocks and crypto, pulling prices down together.</li>
                        </ul>
                    </div>
                    <div class="space-y-4 text-slate-700 p-4 bg-slate-50 rounded-lg">
                        <h3 class="text-xl font-semibold text-slate-800">2. When Does the Inverse Relationship Happen?</h3>
                        <p>Your observation isn't wrong; it just describes the exception, not the rule. The correlation can briefly turn negative (inverse) during specific, isolated shocks:</p>
                        <ul class="list-disc list-inside space-y-2">
                            <li><strong>Crypto-Specific Crises:</strong> If a major crypto exchange collapses (like FTX), Bitcoin's price will fall dramatically on its own, decoupling from the stock market.</li>
                            <li><strong>Traditional Banking Crises:</strong> Conversely, during the March 2023 US regional banking stress, Bitcoin *rallied* while the stock market was unstable. In this specific context, some investors used Bitcoin as a hedge against instability *within the traditional financial system*.</li>
                        </ul>
                    </div>
                </div>
            </section>
        </main>

        <footer class="text-center mt-12 text-slate-500 text-sm">
            <p>This is an interactive dashboard based on publicly available financial research and analysis. Data is illustrative. Not financial advice.</p>
        </footer>
    </div>

    <script>
        document.addEventListener('DOMContentLoaded', () => {
            
            const correlationChartCtx = document.getElementById('correlationChart').getContext('2d');
            new Chart(correlationChartCtx, {
                type: 'line',
                data: {
                    labels: ['2018', '2019', '2020', '2021', '2022', '2023', '2024', '2025'],
                    datasets: [{
                        label: '90-Day Correlation (BTC vs. S&P 500)',
                        data: [0.05, -0.1, 0.35, 0.4, 0.65, 0.5, 0.45, 0.5],
                        borderColor: '#2563eb',
                        backgroundColor: 'rgba(37, 99, 235, 0.1)',
                        fill: true,
                        tension: 0.3,
                        borderWidth: 3
                    }]
                },
                options: {
                    responsive: true,
                    maintainAspectRatio: false,
                    scales: {
                        y: {
                            beginAtZero: false,
                            min: -1,
                            max: 1,
                            title: {
                                display: true,
                                text: 'Correlation Coefficient'
                            },
                            grid: {
                                color: '#e2e8f0'
                            }
                        },
                        x: {
                            title: {
                                display: true,
                                text: 'Year'
                            },
                            grid: {
                                display: false
                            }
                        }
                    },
                    plugins: {
                        tooltip: {
                            mode: 'index',
                            intersect: false,
                            callbacks: {
                                label: function(context) {
                                    let label = context.dataset.label || '';
                                    if (label) {
                                        label += ': ';
                                    }
                                    if (context.parsed.y !== null) {
                                        label += context.parsed.y.toFixed(2);
                                    }
                                    return label;
                                }
                            }
                        },
                        legend: {
                            display: false
                        }
                    }
                }
            });

            const performanceChartCtx = document.getElementById('performanceChart').getContext('2d');
            new Chart(performanceChartCtx, {
                type: 'bar',
                data: {
                    labels: ['2022 (Downturn)', '2023 (Recovery)', '2024 (Rally)'],
                    datasets: [
                        {
                            label: 'S&P 500 Return',
                            data: [-19, 26, 24],
                            backgroundColor: '#0ea5e9',
                            borderColor: '#0284c7',
                            borderWidth: 1
                        },
                        {
                            label: 'Bitcoin Return',
                            data: [-65, 147, 135],
                            backgroundColor: '#f97316',
                            borderColor: '#ea580c',
                            borderWidth: 1
                        }
                    ]
                },
                options: {
                    responsive: true,
                    maintainAspectRatio: false,
                    scales: {
                        y: {
                            title: {
                                display: true,
                                text: 'Annual Return (%)'
                            },
                            grid: {
                                color: '#e2e8f0'
                            }
                        },
                        x: {
                            grid: {
                                display: false
                            }
                        }
                    },
                    plugins: {
                        tooltip: {
                            mode: 'index',
                            intersect: false,
                            callbacks: {
                                label: function(context) {
                                    let label = context.dataset.label || '';
                                    if (label) {
                                        label += ': ';
                                    }
                                    if (context.parsed.y !== null) {
                                        label += context.parsed.y + '%';
                                    }
                                    return label;
                                }
                            }
                        },
                        legend: {
                            position: 'top',
                        }
                    }
                }
            });
        });
    </script>
</body>
</html>