INVITE-ONLY SCRIPT
Updated

Relative Asset Performance [MarktQuant]

153
The Relative Performance Asset Indicator is a tool to compare cryptocurrency performance. It shows a ranked table of assets by their Rate of Change (ROC%), with metrics like Z-Score, Sharpe Ratio, and Sortino Ratio. Users can customize the plot style of ROC% (e.g., histogram, line). Gradient colors highlight favorable, neutral, and unfavorable values for Z-Score, Sharpe, and Sortino, helping identify top performers.

Features
  • Multi-Asset Comparison: Tracks and ranks 34 cryptocurrencies (e.g., BTC, ETH, SOL) based on ROC%.
  • Performance Metrics:
  • ROC%: Percentage price change over a user-defined period.
  • Z-Score: Valuation relative to historical mean and standard deviation, Universal Valuation Model.
  • Sharpe Ratio: Risk-adjusted return (average return divided by standard deviation).
  • Sortino Ratio: Risk-adjusted return focusing on downside risk (average return divided by downside deviation).


Customizable Visuals
  • Optional ROC% labels next to plots.
  • Gradient Coloring for Z-Score, Sharpe and Sortino Ratio
  • Rank Tracking: Shows current rank and rank change (Δ RANK).
  • NaN Handling: Displays "NaN" for undefined values due to insufficient data.



Inputs

Valuation Length
Sets bars for Z-Score calculation.
Usage: Increase for long-term trends, decrease for recent price sensitivity.

Rate of Change Length
Period (bars) for ROC% calculation.
Usage: Enable for clarity, disable to reduce clutter.

Risk Ratios Length
Lookback period for Sharpe and Sortino ratios.
Usage: Adjust for timeframe; ensure enough data to avoid "NaN".

Plot Style
Visualization style for ROC% plots.
Options: Histogram, Line, Stepline, Circles, Crosses, Area, Columns.
Usage: Choose style for chart readability.

Chart Plots
ROC% for 34 cryptocurrencies in selected style with unique colors.
Optional labels show ROC% and ticker if "Show Labels" is enabled.

Ranking Table Columns
  1. RANK: Current rank by ROC% (1 = highest).
  2. Δ RANK: Rank change (positive = up, with up/down arrow emojis).
  3. ASSET: Ticker in asset-specific colors.
  4. ROC%: Percentage change, asset-colored.
  5. Z-SCORE: Valuation with gradient (green: ≤ -1.7, yellow: 0, red: ≥ 1.7).
  6. SHARPE: Ratio with gradient (green: ≥ 0.1, yellow: 0, red: ≤ -0.1).
  7. SORTINO: Ratio with gradient (green: ≥ 0.3, yellow: 0, red: ≤ -0.3).



Table
  • RANK and Δ RANK: Spot top performers and momentum shifts.
  • ROC%: Compare momentum; higher is better.
  • Z-SCORE: Green suggests undervaluation, red suggests overvaluation.
  • SHARPE/SORTINO: Green indicates better risk-adjusted returns, red indicates worse.
  • NaN Values: Appear if data is insufficient; decrease Length or use longer timeframe.


Limitations
Data Availability: New assets (e.g., HYPE, PENGU) may show "NaN" if data is limited. Ensure timeframe has enough bars (>Smallest selected length).
Release Notes
V2

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.