OPEN-SOURCE SCRIPT

Crypto Risk-Weighted Allocation Suite

77
Crypto Risk-Weighted Allocation Suite

This indicator is designed to help users explore dynamic portfolio allocation frameworks for the crypto market. It calculates risk-adjusted allocation weights across major crypto sectors and cash based on multi-factor momentum and volatility signals. Best viewed on INDEX:BTCUSD 1D chart. Other charts and timeframes may give mixed signals and incoherent allocations.

🎯 How It Works
This model systematically evaluates the relative strength of:

BTC Dominance (CRYPTOCAP:BTC.D)
Represents Bitcoin’s share of the total crypto market. Rising dominance typically indicates defensive market phases or BTC-led trends.

ETH/BTC Ratio (BINANCE:ETHBTC)
Gauges Ethereum’s relative performance versus Bitcoin. This provides insight into whether ETH is leading risk appetite.

SOL/BTC Ratio (BINANCE:SOLBTC)
Measures Solana’s performance relative to Bitcoin, capturing mid-cap layer-1 strength.

Total Market Cap excluding BTC and ETH (CRYPTOCAP:TOTAL3ES)
Represents Altcoins as a broad category, reflecting appetite for higher-risk assets.

Each of these series is:
✅ Converted to a momentum slope over a configurable lookback period.
✅ Standardized into Z-scores to normalize changes relative to recent behavior.
✅ Smoothed optionally using a Hull Moving Average for cleaner signals.
✅ Divided by ATR-based volatility to create a risk-weighted score.
✅ Scaled to proportionally allocate exposure, applying user-configured minimum and maximum constraints.


🪙 Dynamic Allocation Logic
All signals are normalized to sum to 100% if fully confident.

An overall confidence factor (based on total signal strength) scales the allocation up or down.

Any residual is allocated to cash (unallocated capital) for conservative exposure.

The script automatically avoids “all-in” bias and prevents negative allocations.

📊 Outputs
The indicator displays:

Market Phase Detection (which asset class is currently leading)

Risk Mode (Risk On, Neutral, Risk Off)

Dynamic Allocations for BTC, ETH, SOL, Alts, and Cash

Optional momentum plots for transparency


🧠 Why This Is Unique
Unlike simple dominance indicators or crossovers, this model:

Integrates multiple cross-asset signals (BTC, ETH, SOL, Alts)

Adjusts exposure proportionally to signal strength

Normalizes by volatility, dynamically scaling risk

Includes configurable constraints to reflect your own risk tolerance

Provides a cash fallback allocation when conviction is low

Is entirely non-repainting and based on daily closing data


⚠️ Disclaimer
This script is provided for educational and informational purposes only.
It is not financial advice and should not be relied upon to make investment decisions.
Past performance does not guarantee future results.
Always consult a qualified financial advisor before acting on any information derived from this tool.


🛠 Recommended Use
As a framework to visualize relative momentum and risk-adjusted allocations

For research and backtesting ideas on portfolio allocation across crypto sectors

To help build your own risk management process

This script is not a turnkey strategy and should be customized to fit your goals.


✅ Enjoy exploring dynamic crypto allocations responsibly!

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.