RotationSUITE [BitAura]

This Pine Script® indicator is a dynamic, multi-asset rotation system designed to optimize portfolio allocation by selecting the strongest-performing cryptocurrency from a user-defined basket of up to four assets, with USD as a cash position. By leveraging two complementary relative strength strategies and a proprietary Confidence Score, the system adapts to changing market conditions to aim for superior risk-adjusted returns compared to a buy-and-hold approach.
Logic and Core Concepts
The system’s goal is to allocate capital to the strongest asset at any given time, dynamically switching between two strategies based on market conditions:
1. Ratios System (Primary Strategy)
- Mechanism: Performs relative strength analysis by evaluating the trend of each asset pair (e.g., BTCUSD/ETHUSD, BTCUSD/SOLUSD) using a universal trend-capturing function.
- Scoring: Each asset earns points based on how many other assets (including USD) it outperforms.
- Allocation: Allocates 100% of the portfolio to the asset with the highest score, following a "long the strongest" approach.
2. Alpha System (Defensive Strategy)
- Mechanism: Measures each asset’s alpha (excess return relative to market risk, or beta) against a broad market benchmark. A fast trend-following model confirms momentum.
- Allocation: Allocates to the asset with the highest positive alpha and confirmed momentum, or to USD if no asset meets the criteria.
3. Confidence Score (Decision Engine)
- Monitors the Ratios System’s performance.
- High Confidence: Uses the Ratios System for allocation during strong trends.
- Low Confidence: Switches to the Alpha System or USD during choppy or corrective markets.
Features
- Dynamic Strategy Switching: Seamlessly transitions between Ratios and Alpha systems based on the Confidence Score.
- Customizable Asset Basket: Supports up to four user-defined crypto assets (e.g.,
BTCUSD,
ETHUSD,
SOLUSD,
SUIUSD).
- Comprehensive Visuals:
Performance Metrics Table: Displays Sharpe, Sortino, Omega, Max Drawdown, and Profit Factor for the system, its sub-strategies, and individual assets’ buy-and-hold performance.
Rotation Matrix: Shows pairwise trend scores for the Ratios System and alpha/trend data for the Alpha System.
Allocation Table: Indicates the current portfolio allocation (in %). - Equity Curve Analysis: Plots equity curves for the system, sub-strategies, and buy-and-hold for comparison.
- Configurable Alerts: Notifies users of changes in allocation or Confidence Score.
- Pine Script v6: Utilizes advanced features like matrices and table formatting for enhanced usability.
How to Use
- Add to Chart: Apply the indicator to any chart (the chart’s ticker does not affect calculations).
- Configure Assets: In the settings (Inputs -> Majors Rotation System Tickers), define up to four crypto assets. Defaults include
BTCUSD,
ETHUSD,
SOLUSD, and
SUIUSD.
- Set Allocation Type: Choose Aggressive (100% to top asset), Moderate (80/20 split), or Conservative (60/40 split) in the settings.
- Monitor Output: The Portfolio Allocations table shows the current allocation. Use the Performance Metrics and Rotation Matrix tables for deeper insights.
- Analyze Equity: Enable equity curve plots in the settings to visualize performance.
- Set Alerts: Right-click a plot, select "Add alert," and choose "Confidence Score changed" or "Calculated Portfolio Allocations Changed" to receive notifications.
Notes
- The script is closed-source
- Ensure the chart uses a standard price series (not Heikin Ashi or other non-standard types) for accurate results.
- The script avoids lookahead bias by using barmerge.lookahead_off in request.security() calls.
- Performance metrics are calculated only on the last confirmed bar to optimize runtime efficiency.
Disclaimer: This script is for educational and analytical purposes only and does not constitute financial advice. Trading involves significant risk, and past performance is not indicative of future results. Always conduct your own research and apply proper risk management.
Tập lệnh chỉ hiển thị cho người được mời
Chỉ những người dùng được tác giả đồng ý mới có thể truy cập tập lệnh này. Bạn cần yêu cầu và xin phép sử dụng tập lệnh này. Quyền truy cập thường được cấp sau khi thanh toán. Để biết thêm chi tiết, hãy làm theo hướng dẫn của tác giả bên dưới hoặc liên hệ trực tiếp với BitAura.
TradingView KHÔNG khuyến khích trả tiền hoặc sử dụng tập lệnh trừ khi bạn hoàn toàn tin tưởng tác giả và hiểu cách hoạt động của tập lệnh. Bạn cũng có thể tìm thấy các giải pháp thay thế miễn phí, mã nguồn mở trong mục tập lệnh cộng đồng của chúng tôi.
Hướng dẫn của tác giả
Cảnh báo: vui lòng đọc hướng dẫn của chúng tôi về các tập lệnh chỉ dành cho người được mời trước khi yêu cầu quyền truy cập.
Thông báo miễn trừ trách nhiệm
Tập lệnh chỉ hiển thị cho người được mời
Chỉ những người dùng được tác giả đồng ý mới có thể truy cập tập lệnh này. Bạn cần yêu cầu và xin phép sử dụng tập lệnh này. Quyền truy cập thường được cấp sau khi thanh toán. Để biết thêm chi tiết, hãy làm theo hướng dẫn của tác giả bên dưới hoặc liên hệ trực tiếp với BitAura.
TradingView KHÔNG khuyến khích trả tiền hoặc sử dụng tập lệnh trừ khi bạn hoàn toàn tin tưởng tác giả và hiểu cách hoạt động của tập lệnh. Bạn cũng có thể tìm thấy các giải pháp thay thế miễn phí, mã nguồn mở trong mục tập lệnh cộng đồng của chúng tôi.
Hướng dẫn của tác giả
Cảnh báo: vui lòng đọc hướng dẫn của chúng tôi về các tập lệnh chỉ dành cho người được mời trước khi yêu cầu quyền truy cập.