Alright — that’s basically “swinging for the fat pitches” (Buffett-style patience) but applied to extreme market cycles. It can work, but only if you have: A way to define what counts as a bubble or crisis (clear signals, not vibes). A playbook for what to buy/sell when the trigger hits. Capital ready and protected during the waiting years. Here’s a practical game plan: 1. Define Your Triggers (Objective, Quantitative) You need rules so you don’t jump too early or too late. Bubble trigger (overheated markets) CAPE ratio > 35 for equities. Price-to-sales of S&P 500 > 3. Commodity prices 100%+ above long-term median. Crypto: parabolic + 3x-5x in <12 months + extreme funding rates. Crisis trigger (panic, liquidity crunch) VIX > 40 for stocks. High-yield spreads > 8%. Market down 30%+ from highs in <12 months. Commodities: 50%+ drop from recent peak within a year. 2. What You Do in Each Scenario Bubble: Short via index puts, leveraged inverse ETFs, or shorting overvalued sectors. Sell your long-term holdings that are in the “froth zone.” Rotate into safe assets: short-term Treasuries, gold, USD cash. Crisis: Deploy capital in tranches (25%/25%/25%/25%) as market falls. Buy undervalued broad indices (S&P 500, MSCI World, sector ETFs) and the best quality companies. For commodities, secure exposure via futures or ETFs when prices are at multi-year lows. Crypto: accumulate BTC/ETH at historical on-chain floor metrics (realized price, MVRV < 1). 3. Risk Management Keep 70–90% of your net worth in safe liquid assets when no trigger is active. Only risk 10–20% of capital on bubble shorts — these can be mistimed and blow up. In crises, spread buys over 6–18 months to avoid catching a falling knife. 4. Tools & Tracking Set alerts for your trigger metrics (TradingView, Koyfin, custom Python scripts). Maintain a “Crash War Chest” in high-yield savings or T-bills. Keep a watchlist of assets you’ll pounce on (and their target prices). use dark theme use pretty charts - Follow Up Deployment
97d4294 verified | <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Market Cycle Strategy Dashboard</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> | |
| <script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script> | |
| <style> | |
| .gradient-bg { | |
| background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); | |
| } | |
| .card-glass { | |
| background: rgba(15, 23, 42, 0.7); | |
| backdrop-filter: blur(10px); | |
| border: 1px solid rgba(255, 255, 255, 0.1); | |
| } | |
| .trigger-active { | |
| box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.5); | |
| animation: pulse 2s infinite; | |
| } | |
| @keyframes pulse { | |
| 0% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.7); } | |
| 70% { box-shadow: 0 0 0 10px rgba(236, 72, 153, 0); } | |
| 100% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0); } | |
| } | |
| .chart-container { | |
| position: relative; | |
| height: 300px; | |
| width: 100%; | |
| } | |
| .tab-active { | |
| border-bottom: 3px solid #ec4899; | |
| color: white; | |
| font-weight: 600; | |
| } | |
| </style> | |
| </head> | |
| <body class="gradient-bg text-gray-200 min-h-screen"> | |
| <div class="container mx-auto px-4 py-8"> | |
| <!-- Header --> | |
| <header class="mb-10 text-center"> | |
| <h1 class="text-4xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-pink-500 to-purple-600 mb-2">Extreme Market Cycle Strategy</h1> | |
| <p class="text-lg text-gray-400 max-w-3xl mx-auto">Buffett-style patience applied to extreme market cycles with quantitative triggers</p> | |
| </header> | |
| <!-- Dashboard Tabs --> | |
| <div class="flex flex-wrap border-b border-gray-700 mb-8"> | |
| <button onclick="switchTab('overview')" class="tab-active px-6 py-3 font-medium">Overview</button> | |
| <button onclick="switchTab('triggers')" class="px-6 py-3 font-medium text-gray-400 hover:text-white">Triggers</button> | |
| <button onclick="switchTab('actions')" class="px-6 py-3 font-medium text-gray-400 hover:text-white">Action Plan</button> | |
| <button onclick="switchTab('tracking')" class="px-6 py-3 font-medium text-gray-400 hover:text-white">Tracking Tools</button> | |
| </div> | |
| <!-- Overview Tab --> | |
| <div id="overview-tab" class="tab-content"> | |
| <div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-8"> | |
| <!-- Market Status Card --> | |
| <div class="card-glass rounded-xl p-6"> | |
| <div class="flex items-center justify-between mb-4"> | |
| <h3 class="text-xl font-semibold">Current Market Status</h3> | |
| <span class="px-3 py-1 rounded-full text-xs font-medium bg-green-900 text-green-300">Normal</span> | |
| </div> | |
| <div class="space-y-4"> | |
| <div class="flex justify-between"> | |
| <span class="text-gray-400">S&P 500 CAPE</span> | |
| <span class="font-mono">28.6</span> | |
| </div> | |
| <div class="flex justify-between"> | |
| <span class="text-gray-400">VIX Index</span> | |
| <span class="font-mono">18.2</span> | |
| </div> | |
| <div class="flex justify-between"> | |
| <span class="text-gray-400">HY Spread</span> | |
| <span class="font-mono">3.8%</span> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Strategy Performance --> | |
| <div class="card-glass rounded-xl p-6"> | |
| <h3 class="text-xl font-semibold mb-4">Historical Performance</h3> | |
| <div class="chart-container"> | |
| <canvas id="performanceChart"></canvas> | |
| </div> | |
| </div> | |
| <!-- Next Actions --> | |
| <div class="card-glass rounded-xl p-6"> | |
| <h3 class="text-xl font-semibold mb-4">Recommended Actions</h3> | |
| <div class="space-y-3"> | |
| <div class="flex items-start"> | |
| <div class="flex-shrink-0 h-5 w-5 text-yellow-400 mt-1"> | |
| <i class="fas fa-exclamation-circle"></i> | |
| </div> | |
| <p class="ml-2 text-sm">Maintain 80% in safe liquid assets (T-bills, cash)</p> | |
| </div> | |
| <div class="flex items-start"> | |
| <div class="flex-shrink-0 h-5 w-5 text-gray-400 mt-1"> | |
| <i class="fas fa-clock"></i> | |
| </div> | |
| <p class="ml-2 text-sm">Watchlist: Prepare target prices for quality stocks</p> | |
| </div> | |
| <div class="flex items-start"> | |
| <div class="flex-shrink-0 h-5 w-5 text-gray-400 mt-1"> | |
| <i class="fas fa-bell"></i> | |
| </div> | |
| <p class="ml-2 text-sm">Set alerts for bubble/crisis triggers</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Market Cycle Visualization --> | |
| <div class="card-glass rounded-xl p-6 mb-8"> | |
| <h3 class="text-xl font-semibold mb-6 text-center">Market Cycle Positioning</h3> | |
| <div class="chart-container"> | |
| <canvas id="cycleChart"></canvas> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Triggers Tab --> | |
| <div id="triggers-tab" class="tab-content hidden"> | |
| <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-8"> | |
| <!-- Bubble Triggers --> | |
| <div class="card-glass rounded-xl p-6"> | |
| <div class="flex items-center justify-between mb-4"> | |
| <h3 class="text-xl font-semibold">Bubble Triggers</h3> | |
| <span class="px-3 py-1 rounded-full text-xs font-medium bg-pink-900 text-pink-300">Inactive</span> | |
| </div> | |
| <div class="space-y-4"> | |
| <div class="p-3 rounded-lg bg-gray-800"> | |
| <div class="flex justify-between items-center"> | |
| <span class="font-medium">CAPE Ratio > 35</span> | |
| <span class="text-sm font-mono">28.6 / 35</span> | |
| </div> | |
| <div class="w-full bg-gray-700 rounded-full h-2 mt-2"> | |
| <div class="bg-pink-500 h-2 rounded-full" style="width: 82%"></div> | |
| </div> | |
| </div> | |
| <div class="p-3 rounded-lg bg-gray-800"> | |
| <div class="flex justify-between items-center"> | |
| <span class="font-medium">Price-to-Sales > 3</span> | |
| <span class="text-sm font-mono">2.4 / 3</span> | |
| </div> | |
| <div class="w-full bg-gray-700 rounded-full h-2 mt-2"> | |
| <div class="bg-pink-500 h-2 rounded-full" style="width: 80%"></div> | |
| </div> | |
| </div> | |
| <div class="p-3 rounded-lg bg-gray-800"> | |
| <div class="flex justify-between items-center"> | |
| <span class="font-medium">Commodities 100%+</span> | |
| <span class="text-sm font-mono">+65%</span> | |
| </div> | |
| <div class="w-full bg-gray-700 rounded-full h-2 mt-2"> | |
| <div class="bg-pink-500 h-2 rounded-full" style="width: 65%"></div> | |
| </div> | |
| </div> | |
| <div class="p-3 rounded-lg bg-gray-800"> | |
| <div class="flex justify-between items-center"> | |
| <span class="font-medium">Crypto Parabolic</span> | |
| <span class="text-sm font-mono">Inactive</span> | |
| </div> | |
| <div class="w-full bg-gray-700 rounded-full h-2 mt-2"> | |
| <div class="bg-pink-500 h-2 rounded-full" style="width: 30%"></div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Crisis Triggers --> | |
| <div class="card-glass rounded-xl p-6"> | |
| <div class="flex items-center justify-between mb-4"> | |
| <h3 class="text-xl font-semibold">Crisis Triggers</h3> | |
| <span class="px-3 py-1 rounded-full text-xs font-medium bg-purple-900 text-purple-300">Inactive</span> | |
| </div> | |
| <div class="space-y-4"> | |
| <div class="p-3 rounded-lg bg-gray-800"> | |
| <div class="flex justify-between items-center"> | |
| <span class="font-medium">VIX > 40</span> | |
| <span class="text-sm font-mono">18.2 / 40</span> | |
| </div> | |
| <div class="w-full bg-gray-700 rounded-full h-2 mt-2"> | |
| <div class="bg-purple-500 h-2 rounded-full" style="width: 45%"></div> | |
| </div> | |
| </div> | |
| <div class="p-3 rounded-lg bg-gray-800"> | |
| <div class="flex justify-between items-center"> | |
| <span class="font-medium">HY Spread > 8%</span> | |
| <span class="text-sm font-mono">3.8% / 8%</span> | |
| </div> | |
| <div class="w-full bg-gray-700 rounded-full h-2 mt-2"> | |
| <div class="bg-purple-500 h-2 rounded-full" style="width: 47%"></div> | |
| </div> | |
| </div> | |
| <div class="p-3 rounded-lg bg-gray-800"> | |
| <div class="flex justify-between items-center"> | |
| <span class="font-medium">Market -30%</span> | |
| <span class="text-sm font-mono">-5% from ATH</span> | |
| </div> | |
| <div class="w-full bg-gray-700 rounded-full h-2 mt-2"> | |
| <div class="bg-purple-500 h-2 rounded-full" style="width: 17%"></div> | |
| </div> | |
| </div> | |
| <div class="p-3 rounded-lg bg-gray-800"> | |
| <div class="flex justify-between items-center"> | |
| <span class="font-medium">Commodities -50%</span> | |
| <span class="text-sm font-mono">-12% from peak</span> | |
| </div> | |
| <div class="w-full bg-gray-700 rounded-full h-2 mt-2"> | |
| <div class="bg-purple-500 h-2 rounded-full" style="width: 24%"></div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="card-glass rounded-xl p-6"> | |
| <h3 class="text-xl font-semibold mb-4">Trigger Activation Timeline</h3> | |
| <div class="chart-container"> | |
| <canvas id="triggerChart"></canvas> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Action Plan Tab --> | |
| <div id="actions-tab" class="tab-content hidden"> | |
| <div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8"> | |
| <!-- Bubble Actions --> | |
| <div class="card-glass rounded-xl p-6"> | |
| <h3 class="text-xl font-semibold mb-4 text-pink-400">Bubble Response Plan</h3> | |
| <div class="space-y-4"> | |
| <div class="flex items-start p-4 rounded-lg bg-gray-800 border-l-4 border-pink-500"> | |
| <div class="flex-shrink-0 h-6 w-6 text-pink-400 mt-1"> | |
| <i class="fas fa-arrow-down"></i> | |
| </div> | |
| <div class="ml-3"> | |
| <h4 class="font-medium">Short Exposure</h4> | |
| <p class="mt-1 text-sm text-gray-400">Index puts, leveraged inverse ETFs, or short overvalued sectors</p> | |
| </div> | |
| </div> | |
| <div class="flex items-start p-4 rounded-lg bg-gray-800 border-l-4 border-pink-500"> | |
| <div class="flex-shrink-0 h-6 w-6 text-pink-400 mt-1"> | |
| <i class="fas fa-dollar-sign"></i> | |
| </div> | |
| <div class="ml-3"> | |
| <h4 class="font-medium">Sell Frothy Holdings</h4> | |
| <p class="mt-1 text-sm text-gray-400">Reduce exposure to assets showing extreme valuations</p> | |
| </div> | |
| </div> | |
| <div class="flex items-start p-4 rounded-lg bg-gray-800 border-l-4 border-pink-500"> | |
| <div class="flex-shrink-0 h-6 w-6 text-pink-400 mt-1"> | |
| <i class="fas fa-shield-alt"></i> | |
| </div> | |
| <div class="ml-3"> | |
| <h4 class="font-medium">Rotate to Safety</h4> | |
| <p class="mt-1 text-sm text-gray-400">Short-term Treasuries, gold, USD cash</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Crisis Actions --> | |
| <div class="card-glass rounded-xl p-6"> | |
| <h3 class="text-xl font-semibold mb-4 text-purple-400">Crisis Response Plan</h3> | |
| <div class="space-y-4"> | |
| <div class="flex items-start p-4 rounded-lg bg-gray-800 border-l-4 border-purple-500"> | |
| <div class="flex-shrink-0 h-6 w-6 text-purple-400 mt-1"> | |
| <i class="fas fa-arrow-up"></i> | |
| </div> | |
| <div class="ml-3"> | |
| <h4 class="font-medium">Deploy Capital</h4> | |
| <p class="mt-1 text-sm text-gray-400">In tranches (25%/25%/25%/25%) as market falls</p> | |
| </div> | |
| </div> | |
| <div class="flex items-start p-4 rounded-lg bg-gray-800 border-l-4 border-purple-500"> | |
| <div class="flex-shrink-0 h-6 w-6 text-purple-400 mt-1"> | |
| <i class="fas fa-chart-line"></i> | |
| </div> | |
| <div class="ml-3"> | |
| <h4 class="font-medium">Buy Undervalued</h4> | |
| <p class="mt-1 text-sm text-gray-400">Broad indices (S&P 500, MSCI World) and quality companies</p> | |
| </div> | |
| </div> | |
| <div class="flex items-start p-4 rounded-lg bg-gray-800 border-l-4 border-purple-500"> | |
| <div class="flex-shrink-0 h-6 w-6 text-purple-400 mt-1"> | |
| <i class="fas fa-coins"></i> | |
| </div> | |
| <div class="ml-3"> | |
| <h4 class="font-medium">Commodities/Crypto</h4> | |
| <p class="mt-1 text-sm text-gray-400">Accumulate at multi-year lows using historical metrics</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="card-glass rounded-xl p-6"> | |
| <h3 class="text-xl font-semibold mb-4">Capital Allocation Strategy</h3> | |
| <div class="grid grid-cols-1 md:grid-cols-3 gap-6"> | |
| <div> | |
| <h4 class="font-medium mb-2 text-center">Normal Times</h4> | |
| <div class="chart-container"> | |
| <canvas id="normalAllocationChart"></canvas> | |
| </div> | |
| </div> | |
| <div> | |
| <h4 class="font-medium mb-2 text-center">Bubble Detected</h4> | |
| <div class="chart-container"> | |
| <canvas id="bubbleAllocationChart"></canvas> | |
| </div> | |
| </div> | |
| <div> | |
| <h4 class="font-medium mb-2 text-center">Crisis Detected</h4> | |
| <div class="chart-container"> | |
| <canvas id="crisisAllocationChart"></canvas> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Tracking Tools Tab --> | |
| <div id="tracking-tab" class="tab-content hidden"> | |
| <div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8"> | |
| <!-- Tools --> | |
| <div class="card-glass rounded-xl p-6"> | |
| <h3 class="text-xl font-semibold mb-4">Monitoring Tools</h3> | |
| <div class="space-y-4"> | |
| <a href="#" class="flex items-center p-3 rounded-lg bg-gray-800 hover:bg-gray-700 transition"> | |
| <div class="flex-shrink-0 h-10 w-10 rounded-full bg-blue-900 flex items-center justify-center"> | |
| <i class="fas fa-chart-bar text-blue-400"></i> | |
| </div> | |
| <div class="ml-4"> | |
| <h4 class="font-medium">TradingView Alerts</h4> | |
| <p class="text-sm text-gray-400">Set custom alerts for trigger metrics</p> | |
| </div> | |
| </a> | |
| <a href="#" class="flex items-center p-3 rounded-lg bg-gray-800 hover:bg-gray-700 transition"> | |
| <div class="flex-shrink-0 h-10 w-10 rounded-full bg-purple-900 flex items-center justify-center"> | |
| <i class="fas fa-laptop-code text-purple-400"></i> | |
| </div> | |
| <div class="ml-4"> | |
| <h4 class="font-medium">Koyfin Dashboards</h4> | |
| <p class="text-sm text-gray-400">Track multiple metrics in real-time</p> | |
| </div> | |
| </a> | |
| <a href="#" class="flex items-center p-3 rounded-lg bg-gray-800 hover:bg-gray-700 transition"> | |
| <div class="flex-shrink-0 h-10 w-10 rounded-full bg-green-900 flex items-center justify-center"> | |
| <i class="fas fa-code text-green-400"></i> | |
| </div> | |
| <div class="ml-4"> | |
| <h4 class="font-medium">Python Scripts</h4> | |
| <p class="text-sm text-gray-400">Custom data analysis and alerts</p> | |
| </div> | |
| </a> | |
| </div> | |
| </div> | |
| <!-- Watchlist --> | |
| <div class="card-glass rounded-xl p-6"> | |
| <h3 class="text-xl font-semibold mb-4">Crash War Chest</h3> | |
| <div class="mb-4"> | |
| <div class="flex justify-between items-center mb-2"> | |
| <span class="text-gray-400">Liquid Reserve</span> | |
| <span class="font-mono">$250,000</span> | |
| </div> | |
| <div class="w-full bg-gray-700 rounded-full h-2"> | |
| <div class="bg-yellow-500 h-2 rounded-full" style="width: 85%"></div> | |
| </div> | |
| </div> | |
| <h4 class="font-medium mb-3">Target Watchlist</h4> | |
| <div class="space-y-3"> | |
| <div class="flex justify-between items-center p-2 rounded hover:bg-gray-800"> | |
| <span>S&P 500 ETF (SPY)</span> | |
| <span class="text-sm font-mono text-green-400">$380 target</span> | |
| </div> | |
| <div class="flex justify-between items-center p-2 rounded hover:bg-gray-800"> | |
| <span>Gold (GLD)</span> | |
| <span class="text-sm font-mono text-green-400">$150 target</span> | |
| </div> | |
| <div class="flex justify-between items-center p-2 rounded hover:bg-gray-800"> | |
| <span>Bitcoin</span> | |
| <span class="text-sm font-mono text-green-400">$25k target</span> | |
| </div> | |
| <div class="flex justify-between items-center p-2 rounded hover:bg-gray-800"> | |
| <span>Quality Stocks</span> | |
| <span class="text-sm font-mono text-green-400">-40% from ATH</span> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="card-glass rounded-xl p-6"> | |
| <h3 class="text-xl font-semibold mb-4">Trigger Alert Setup</h3> | |
| <div class="overflow-x-auto"> | |
| <table class="min-w-full divide-y divide-gray-700"> | |
| <thead> | |
| <tr> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider">Metric</th> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider">Current Value</th> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider">Trigger Level</th> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider">Alert Channel</th> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider">Status</th> | |
| </tr> | |
| </thead> | |
| <tbody class="divide-y divide-gray-700"> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap">CAPE Ratio</td> | |
| <td class="px-6 py-4 whitespace-nowrap font-mono">28.6</td> | |
| <td class="px-6 py-4 whitespace-nowrap font-mono">> 35</td> | |
| <td class="px-6 py-4 whitespace-nowrap">Email, SMS</td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <span class="px-2 py-1 text-xs rounded-full bg-green-900 text-green-300">Active</span> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap">VIX Index</td> | |
| <td class="px-6 py-4 whitespace-nowrap font-mono">18.2</td> | |
| <td class="px-6 py-4 whitespace-nowrap font-mono">> 40</td> | |
| <td class="px-6 py-4 whitespace-nowrap">Email, App</td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <span class="px-2 py-1 text-xs rounded-full bg-green-900 text-green-300">Active</span> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap">HY Spread</td> | |
| <td class="px-6 py-4 whitespace-nowrap font-mono">3.8%</td> | |
| <td class="px-6 py-4 whitespace-nowrap font-mono">> 8%</td> | |
| <td class="px-6 py-4 whitespace-nowrap">Email, SMS</td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <span class="px-2 py-1 text-xs rounded-full bg-green-900 text-green-300">Active</span> | |
| </td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |
| // Tab switching | |
| function switchTab(tabName) { | |
| // Update tab buttons | |
| document.querySelectorAll('.flex button').forEach(button => { | |
| if (button.textContent.toLowerCase().includes(tabName)) { | |
| button.classList.remove('text-gray-400'); | |
| button.classList.add('tab-active'); | |
| } else { | |
| button.classList.add('text-gray-400'); | |
| button.classList.remove('tab-active'); | |
| } | |
| }); | |
| // Show/hide tab content | |
| document.querySelectorAll('.tab-content').forEach(content => { | |
| content.classList.add('hidden'); | |
| }); | |
| document.getElementById(`${tabName}-tab`).classList.remove('hidden'); | |
| } | |
| // Performance Chart | |
| const performanceCtx = document.getElementById('performanceChart').getContext('2d'); | |
| const performanceChart = new Chart(performanceCtx, { | |
| type: 'line', | |
| data: { | |
| labels: ['2015', '2016', '2017', '2018', '2019', '2020', '2021', '2022', '2023'], | |
| datasets: [ | |
| { | |
| label: 'Strategy', | |
| data: [100, 115, 135, 125, 160, 210, 250, 230, 280], | |
| borderColor: '#ec4899', | |
| backgroundColor: 'rgba(236, 72, 153, 0.1)', | |
| tension: 0.3, | |
| fill: true | |
| }, | |
| { | |
| label: 'S&P 500', | |
| data: [100, 112, 135, 130, 160, 185, 225, 190, 220], | |
| borderColor: '#8b5cf6', | |
| backgroundColor: 'rgba(139, 92, 246, 0.1)', | |
| tension: 0.3, | |
| fill: true, | |
| borderDash: [5, 5] | |
| } | |
| ] | |
| }, | |
| options: { | |
| responsive: true, | |
| maintainAspectRatio: false, | |
| plugins: { | |
| legend: { | |
| position: 'top', | |
| labels: { | |
| color: '#e2e8f0' | |
| } | |
| }, | |
| tooltip: { | |
| mode: 'index', | |
| intersect: false | |
| } | |
| }, | |
| scales: { | |
| x: { | |
| grid: { | |
| color: 'rgba(255, 255, 255, 0.1)' | |
| }, | |
| ticks: { | |
| color: '#94a3b8' | |
| } | |
| }, | |
| y: { | |
| grid: { | |
| color: 'rgba(255, 255, 255, 0.1)' | |
| }, | |
| ticks: { | |
| color: '#94a3b8' | |
| } | |
| } | |
| } | |
| } | |
| }); | |
| // Market Cycle Chart | |
| const cycleCtx = document.getElementById('cycleChart').getContext('2d'); | |
| const cycleChart = new Chart(cycleCtx, { | |
| type: 'line', | |
| data: { | |
| labels: Array.from({length: 12}, (_, i) => `Q${i+1}`), | |
| datasets: [{ | |
| data: [65, 59, 80, 81, 76, 75, 90, 110, 135, 120, 95, 80], | |
| borderColor: '#ec4899', | |
| backgroundColor: 'rgba(236, 72, 153, 0.1)', | |
| tension: 0.4, | |
| fill: true, | |
| pointRadius: 0 | |
| }] | |
| }, | |
| options: { | |
| responsive: true, | |
| maintainAspectRatio: false, | |
| plugins: { | |
| legend: { | |
| display: false | |
| }, | |
| annotation: { | |
| annotations: { | |
| bubbleZone: { | |
| type: 'box', | |
| yMin: 110, | |
| yMax: 150, | |
| backgroundColor: 'rgba(236, 72, 153, 0.1)', | |
| borderColor: 'rgba(236, 72, 153, 0.5)', | |
| borderWidth: 1, | |
| label: { | |
| content: 'Bubble Zone', | |
| enabled: true, | |
| position: 'top', | |
| color: '#ec4899' | |
| } | |
| }, | |
| crisisZone: { | |
| type: 'box', | |
| yMin: 50, | |
| yMax: 70, | |
| backgroundColor: 'rgba(139, 92, 246, 0.1)', | |
| borderColor: 'rgba(139, 92, 246, 0.5)', | |
| borderWidth: 1, | |
| label: { | |
| content: 'Crisis Zone', | |
| enabled: true, | |
| position: 'bottom', | |
| color: '#8b5cf6' | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| scales: { | |
| x: { | |
| grid: { | |
| color: 'rgba(255, 255, 255, 0.1)' | |
| }, | |
| ticks: { | |
| color: '#94a3b8' | |
| } | |
| }, | |
| y: { | |
| grid: { | |
| color: 'rgba(255, 255, 255, 0.1)' | |
| }, | |
| ticks: { | |
| color: '#94a3b8' | |
| } | |
| } | |
| } | |
| } | |
| }); | |
| // Trigger Timeline Chart | |
| const triggerCtx = document.getElementById('triggerChart').getContext('2d'); | |
| const triggerChart = new Chart(triggerCtx, { | |
| type: 'bar', | |
| data: { | |
| labels: ['2000', '2008', '2018', '2020', '2022'], | |
| datasets: [ | |
| { | |
| label: 'Bubble Triggers', | |
| data: [5, 2, 3, 1, 4], | |
| backgroundColor: '#ec4899' | |
| }, | |
| { | |
| label: 'Crisis Triggers', | |
| data: [1, 5, 2, 4, 3], | |
| backgroundColor: '#8b5cf6' | |
| } | |
| ] | |
| }, | |
| options: { | |
| responsive: true, | |
| maintainAspectRatio: false, | |
| plugins: { | |
| legend: { | |
| position: 'top', | |
| labels: { | |
| color: '#e2e8f0' | |
| } | |
| } | |
| }, | |
| scales: { | |
| x: { | |
| stacked: true, | |
| grid: { | |
| color: 'rgba(255, 255, 255, 0.1)' | |
| }, | |
| ticks: { | |
| color: '#94a3b8' | |
| } | |
| }, | |
| y: { | |
| stacked: true, | |
| grid: { | |
| color: 'rgba(255, 255, 255, 0.1)' | |
| }, | |
| ticks: { | |
| color: '#94a3b8' | |
| } | |
| } | |
| } | |
| } | |
| }); | |
| // Allocation Charts | |
| const allocationColors = ['#3b82f6', '#10b981', '#f59e0b', '#64748b']; | |
| // Normal Allocation | |
| const normalAllocationCtx = document.getElementById('normalAllocationChart').getContext('2d'); | |
| const normalAllocationChart = new Chart(normalAllocationCtx, { | |
| type: 'doughnut', | |
| data: { | |
| labels: ['Safe Assets', 'Equities', 'Commodities', 'Cash'], | |
| datasets: [{ | |
| data: [70, 15, 5, 10], | |
| backgroundColor: allocationColors, | |
| borderColor: '#0f172a', | |
| borderWidth: 2 | |
| }] | |
| }, | |
| options: { | |
| responsive: true, | |
| maintainAspectRatio: false, | |
| plugins: { | |
| legend: { | |
| position: 'bottom', | |
| labels: { | |
| color: '#e2e8f0' | |
| } | |
| } | |
| } | |
| } | |
| }); | |
| // Bubble Allocation | |
| const bubbleAllocationCtx = document.getElementById('bubbleAllocationChart').getContext('2d'); | |
| const bubbleAllocationChart = new Chart(bubbleAllocationCtx, { | |
| type: 'doughnut', | |
| data: { | |
| labels: ['Safe Assets', 'Shorts', 'Gold', 'Cash'], | |
| datasets: [{ | |
| data: [60, 15, 15, 10], | |
| backgroundColor: allocationColors, | |
| borderColor: '#0f172a', | |
| borderWidth: 2 | |
| }] | |
| }, | |
| options: { | |
| responsive: true, | |
| maintainAspectRatio: false, | |
| plugins: { | |
| legend: { | |
| position: 'bottom', | |
| labels: { | |
| color: '#e2e8f0' | |
| } | |
| } | |
| } | |
| } | |
| }); | |
| // Crisis Allocation | |
| const crisisAllocationCtx = document.getElementById('crisisAllocationChart').getContext('2d'); | |
| const crisisAllocationChart = new Chart(crisisAllocationCtx, { | |
| type: 'doughnut', | |
| data: { | |
| labels: ['Equities', 'Commodities', 'Crypto', 'Cash'], | |
| datasets: [{ | |
| data: [40, 20, 10, 30], | |
| backgroundColor: allocationColors, | |
| borderColor: '#0f172a', | |
| borderWidth: 2 | |
| }] | |
| }, | |
| options: { | |
| responsive: true, | |
| maintainAspectRatio: false, | |
| plugins: { | |
| legend: { | |
| position: 'bottom', | |
| labels: { | |
| color: '#e2e8f0' | |
| } | |
| } | |
| } | |
| } | |
| }); | |
| // Simulate trigger activation | |
| setInterval(() => { | |
| const bubbleTriggers = document.querySelectorAll('#triggers-tab .bg-pink-900'); | |
| const crisisTriggers = document.querySelectorAll('#triggers-tab .bg-purple-900'); | |
| // Randomly activate/deactivate triggers for demo purposes | |
| bubbleTriggers.forEach(trigger => { | |
| if (Math.random() > 0.9) { | |
| trigger.classList.toggle('trigger-active'); | |
| } | |
| }); | |
| crisisTriggers.forEach(trigger => { | |
| if (Math.random() > 0.9) { | |
| trigger.classList.toggle('trigger-active'); | |
| } | |
| }); | |
| }, 3000); | |
| </script> | |
| <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=bytex/hubops" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |