Adaptive Sharpe Ratio (Robust & Regime-Aware)Adaptive Sharpe Ratio (Robust & Regime-Aware) — ASR+
ASR+ (Adaptive Sharpe Ratio) on a daily chart, highlighting regime shifts and dynamically adjusted risk-aware performance.
WHAT IS ASR+
ASR+ (Adaptive Sharpe Ratio) is an enhanced version of the traditional Sharpe Ratio designed to remain statistically reliable in real market conditions.
It improves on the standard model by correcting for autocorrelation, fat tails, and regime-dependent volatility—factors that routinely distort conventional Sharpe readings.
The result is a more stable, realistic measure of risk-adjusted performance that adapts across timeframes, asset classes, and market environments.
WHY THIS MATTERS
The standard Sharpe Ratio assumes:
Stable volatility
Independent returns
Normally distributed returns
Real markets violate all of these assumptions.
Result: Sharpe can become inflated, unstable, and misleading—often underestimating risk, especially on lower timeframes.
ASR+ is designed to overcome these shortcomings.
WHAT “ROBUST” MEANS
ASR+ is built to resist common distortions:
Outliers & fat tails → adjusted
Skewed returns → penalized
Autocorrelation → corrected (HAC / Newey–West)
Small samples → estimation bias reduced
Result: more stable and realistic Sharpe values.
WHAT “REGIME-AWARE” MEANS
Markets change — volatility and behavior shift.
ASR+ adapts dynamically:
High volatility → stronger risk penalty
Calm markets → normalized evaluation
Regime shifts → reflected in real time
Result: avoids false confidence during risky conditions.
─────────────────────────────────────────
WHAT MAKES ASR+ DIFFERENT
─────────────────────────────────────────
🔹 HAC Autocorrelation Correction (Newey-West)
Uses a 4-lag Bartlett kernel to correct for serial correlation in returns. When returns are trending or mean-reverting, standard volatility estimates are biased. ASR+ adjusts variance to prevent Sharpe inflation during momentum regimes.
🔹 Cornish-Fisher Tail Adjustment
Incorporates skewness and excess kurtosis into the risk estimate. Markets with fat tails or negative skew carry more downside risk than standard deviation alone captures. This adjustment penalizes asymmetric or heavy-tailed return distributions at the 95% confidence level.
🔹 Volatility Regime Penalty
Detects when current volatility is elevated relative to its historical average and applies a dynamic penalty. ASR+ becomes more conservative exactly when standard Sharpe is most likely to mislead.
🔹 Small-Sample Uncertainty Correction
Applies a bias correction to the mean return estimate, accounting for statistical uncertainty from limited observations. Shorter lookbacks carry more estimation error, which ASR+ reflects.
🔹 Adaptive Risk Adjustment
All adjustments — tail risk, volatility regime, autocorrelation, and estimation uncertainty — are combined through an interaction-aware framework. This prevents double-counting while allowing interacting risk factors to generate appropriately compounded penalties. The total adjustment is capped to avoid over-penalization.
🔹 Multi-Asset, Multi-Timeframe Scaling
Automatically detects asset type (crypto, equities, forex, futures) and timeframe (seconds through monthly) and applies appropriate annualization.
Crypto → 365-day, 24-hour markets
Equities → 252-day, 6.5-hour sessions
No manual configuration required.
🔹 Extreme Value Moderation
During periods of high volatility or reduced estimation reliability, ASR+ moderates extreme Sharpe values in both directions. Positive readings may be reduced, while negative readings may move closer to zero, reflecting lower statistical confidence rather than a change in underlying performance.
🔹 Logarithmic Returns
ASR+ uses logarithmic (log) returns instead of arithmetic returns. Log returns are time-additive and more statistically consistent across timeframes, improving the stability and comparability of risk-adjusted performance, particularly over longer horizons and in the presence of compounding.
ADAPTIVE VS STANDARD SHARPE
Toggle between:
Standard Sharpe → baseline calculation (thinner line)
ASR+ → adjusted, real-world version (thicker line)
Use this to:
Detect inflated Sharpe values
Reveal hidden risk
Validate strategy robustness
─────────────────────────────────────────
REGIME CLASSIFICATION
─────────────────────────────────────────
Light theme view for clarity and accessibility. The same regime classification logic is applied across themes.
ASR+ colors both the plotted line and background for instant interpretation:
🔴 Red → Below 0 — Negative risk-adjusted return
⚫ Gray → 0 to 1 — Subpar performance
🟢 Green → 1 to 2 — Good performance
💚 Lime → Above 2 — Exceptional performance
─────────────────────────────────────────
KEY INPUTS & SETTINGS
─────────────────────────────────────────
→ Lookback Period
Minimum: 50 bars (Daily & Intraday), 36 (Weekly), 24 (Monthly)
Recommended: 63 (Daily), 100 (4H), 252 (1H), 500 (30M)
For high-volatility assets (e.g., growth stocks, crypto), longer lookbacks are recommended to reduce sensitivity to short-term trends
Short lookbacks during strong trending conditions can produce elevated readings that reflect momentum rather than sustainable risk-adjusted performance
→ Risk-Free Rate
Annualized (default 4.5%), adjustable to reflect prevailing rates
→ Show Adaptive vs Standard Sharpe
Plot both to visualize adjustment magnitude
→ EMA Smoother
Optional smoothing to reduce noise
→ Background Regime Colors
Fully customizable
─────────────────────────────────────────
WHO THIS IS FOR
─────────────────────────────────────────
→ Quantitative traders evaluating strategies
→ Multi-asset traders needing consistent metrics
→ Risk-conscious traders focused on efficiency, not just returns
→ Systematic traders monitoring regime shifts in real time
IMPORTANT
ASR+ is not a buy/sell signal.
It measures the quality of returns to support:
Strategy evaluation
Risk control
Position sizing
All calculations are based on confirmed historical data and do not rely on future values.
─────────────────────────────────────────
Built with statistical rigor for traders who demand more accurate evaluation tools.
─────────────────────────────────────────
Indicator

Indicator

Sharpe and Sortino Ratios with Date RangeThis indicator calculates the Sharpe and Sortino ratios using a chart symbol's periodic price returns.
I added the ability to calculate SORTINO and Sharpe based on CUSTOM DATES within the option menu.
It builds on the script here: by adding this feature.
A little about the Sortino Ratio.
www.nasdaq.com
I want equity market returns, but I don’t want equity market volatility. This is the sentiment many investors naturally feel. This sentiment often grows stronger as one approaches or is in the phase where they desire distributions from their savings to improve lifestyle. This is why there is a need for active management in the investment arena. The desire to control downside volatility, but also participate in the upside growth is a very fundamental human desire. The Sortino Ratio measures how well a particular investment meets this fundamental human desire.
There is the old adage, “volatility is the price you pay for returns.” However, what if we could measure the historical performance of an investment and see if it has given above average returns compared to the downside volatility. This is a simple division problem. It will tell us if the volatility “price we are paying for returns” is good. We can then compare that to other investments to see how they compare.
Let us take the return and subtract the risk-free interest rate and then simply divide that by the downside movement from the average. A basic division problem yielding a number that measures a very basic human desire: How well did this investment do compared to the downside risk it experienced.
In the world of financial analysis and investment management, ratios are abundant. There are many ratios that are truly important to a particular analysis. However, the sheer abundance of ratios that are available often overwhelms the casual investor, leading them to disregard ratios altogether. I would argue for those investors that desire a way to rank an investment by its ability to satisfy this very fundamental human desire, the Sortino Ratio is the number they need to consider.
Disappointing in the marketplace for research, the Sortino Ratio is not featured prominently. It is much easier to find the inflows a particular ETF has experienced than the Sortino Ratio. Inflows are important. They measure how much people are investing into an ETF. However, they are mostly only important to the fund manager, not the investor. What investors care about is the Risk-Adjusted Return. This is the Sortino Ratio.
Indicator

Dynamic Risk-Adjusted Performance Ratios with TableWith this indicator, you have everything you need to monitor and compare the Sharpe ratio, Sortino ratio, and Omega ratio across multiple assets—all in one place. This tool is designed to help save time and improve efficiency by letting you track up to 15 assets simultaneously in a fully customizable table. You can adjust the lookback period to fit your trading strategy and get a clearer picture of how your assets perform over time. Instead of switching between charts, this indicator puts all the critical information you need at your fingertips.
Sharpe Ratio -
Helps evaluate the overall efficiency of investments by comparing the average return to the total risk (measured by the standard deviation of all returns). Essentially, it tells you how much excess return you’re getting for each unit of risk you’re taking. A higher Sharpe ratio means you’re getting better risk-adjusted performance—something you’ll want to aim for in your portfolio.
Sortino Ratio -
Goes a step further by focusing only on downside risk—because let’s face it, no one worries about positive volatility. This ratio is calculated by dividing the average return by the standard deviation of only the negative returns. Perfect for those concerned about avoiding losses rather than chasing extreme gains. It gives you a sharper view of how well your assets are performing relative to the risks you’re trying to avoid.
Omega Ratio -
Offers a unique perspective by comparing the sum of positive returns to the absolute sum of negative returns. It’s a straightforward way to see if your wins outweigh your losses. A higher Omega ratio means your positive returns significantly exceed the downside, which is exactly what you want when building a strong, reliable portfolio.
This indicator is perfect for traders who want to streamline their decision-making process and gain an edge. Bringing together these three critical ratios into a single user-defined table makes it easy to compare and rank assets at a glance. Whether optimizing a portfolio or looking for the best opportunities, this tool helps you stay ahead by focusing on risk-adjusted returns. The customizable lookback period lets you tailor the analysis to fit your unique trading approach, giving you insights that align with your goals. If you’re serious about making data-driven decisions and improving your trading outcomes, this indicator is a game-changer for your toolkit.
Indicator

Indicator

Risk Radar ProThe "Risk Radar Pro" indicator is a sophisticated tool designed to help investors and traders assess the risk and performance of their investments over a specified period. This presentation will explain each component of the indicator, how to interpret the results, and the advantages compared to traditional metrics.
The "Risk Radar Pro" indicator includes several key metrics:
● Beta
● Maximum Drawdown
● Compound Annual Growth Rate (CAGR)
● Annualized Volatility
● Dynamic Sharpe Ratio
● Dynamic Sortino Ratio
Each of these metrics is dynamically calculated using data from the entire selected period, providing a more adaptive and accurate measure of performance and risk.
1. Start Date
● Description: The date from which the calculations begin.
● Interpretation: This allows the user to set a specific period for analysis, ensuring that all metrics reflect the performance from this point onward.
2. Beta
● Description: Beta measures the volatility or systematic risk of the instrument relative to a reference index (e.g., SPY).
● Interpretation: A beta of 1 indicates that the instrument moves with the market. A beta greater than 1 indicates more volatility than the market, while a beta less than 1 indicates less volatility.
● Advantages: Unlike classic beta, which typically uses fixed historical intervals, this dynamic beta adjusts to market changes over the entire selected period, providing a more responsive measure.
3. Maximum Drawdown
● Description: The maximum observed loss from a peak to a trough before a new peak is achieved.
● Interpretation: This shows the largest single drop in value during the specified period. It is a critical measure of downside risk.
● Advantages: By tracking the maximum drawdown dynamically, the indicator can provide timely alerts when significant losses occur, allowing for better risk management.
4. Annualized Performance
● Description: The mean annual growth rate of the investment over the specified period.
● Interpretation: The Annualized Performance represents the smoothed annual rate at which the investment would have grown if it had grown at a steady rate.
● Advantages: This dynamic calculation reflects the actual long-term growth trend of the investment rather than relying on a fixed time frame.
5. Annualized Volatility
● Description: Measures the degree of variation in the instrument's returns over time, expressed as a percentage.
● Interpretation: Higher volatility indicates greater risk, as the investment's returns fluctuate more.
● Advantages: Annualized volatility calculated over the entire selected period provides a more accurate measure of risk, as it includes all market conditions encountered during that time.
6. Dynamic Sharpe Ratio
● Description: Measures the risk-adjusted return of an investment relative to its volatility.
● Choice of Risk-Free Rate Ticker: Users can select a ticker symbol to represent the risk-free rate in Sharpe ratio calculations. The default option is US03M, representing the 3-month US Treasury bill.
● Interpretation: A higher Sharpe ratio indicates better risk-adjusted returns. This ratio accounts for the risk-free rate to provide a comparison with risk-free investments.
● Advantages: By using returns and volatility over the entire period, the dynamic Sharpe ratio adjusts to changes in market conditions, offering a more accurate measure than traditional static calculations.
7. Dynamic Sortino Ratio
● Description: Similar to the Sharpe ratio, but focuses only on downside risk.
Interpretation: A higher Sortino ratio indicates better risk-adjusted returns, focusing solely on negative returns, which are more relevant to risk-averse investors.
● Choice of Risk-Free Rate Ticker: Similarly, users can choose a ticker symbol for the risk-free rate in Sortino ratio calculations. By default, this is also set to US03M.
● Advantages: This ratio's dynamic calculation considering the downside deviation over the entire period provides a more accurate measure of risk-adjusted returns in volatile markets.
Comparison with Basic Metrics
● Static vs. Dynamic Calculations: Traditional metrics often use fixed historical intervals, which may not reflect current market conditions. The dynamic calculations in "Risk Radar Pro" adjust to market changes, providing more relevant and timely information.
● Comprehensive Risk Assessment: By including metrics like maximum drawdown, Sharpe ratio, and Sortino ratio, the indicator provides a holistic view of both upside potential and downside risk.
● User Customization: Users can customize the start date, reference index, risk-free rate, and table position, tailoring the indicator to their specific needs and preferences.
Conclusion
The "Risk Radar Pro" indicator is a powerful tool for investors and traders looking to assess and manage risk more effectively. By providing dynamic, comprehensive metrics, it offers a significant advantage over traditional static calculations, ensuring that users have the most accurate and relevant information to make informed decisions.
The "Risk Radar Pro" indicator provides analytical tools and metrics for informational purposes only. It is not intended as financial advice. Users should conduct their own research and consider their individual risk tolerance and investment objectives before making any investment decisions based on the indicator's outputs. Trading and investing involve risks, including the risk of loss. Past performance is not indicative of future results. Indicator

Indicator

Indicator

Cobra's CryptoMarket VisualizerCobra's Crypto Market Screener is designed to provide a comprehensive overview of the top 40 marketcap cryptocurrencies in a table\heatmap format. This indicator incorporates essential metrics such as Beta, Alpha, Sharpe Ratio, Sortino Ratio, Omega Ratio, Z-Score, and Average Daily Range (ADR). The table utilizes cell coloring resembling a heatmap, allowing for quick visual analysis and comparison of multiple cryptocurrencies.
The indicator also includes a shortened explanation tooltip of each metric when hovering over it's respected cell. I shall elaborate on each here for anyone interested.
Metric Descriptions:
1. Beta: measures the sensitivity of an asset's returns to the overall market returns. It indicates how much the asset's price is likely to move in relation to a benchmark index. A beta of 1 suggests the asset moves in line with the market, while a beta greater than 1 implies the asset is more volatile, and a beta less than 1 suggests lower volatility.
2. Alpha: is a measure of the excess return generated by an investment compared to its expected return, given its risk (as indicated by its beta). It assesses the performance of an investment after adjusting for market risk. Positive alpha indicates outperformance, while negative alpha suggests underperformance.
3. Sharpe Ratio: measures the risk-adjusted return of an investment or portfolio. It evaluates the excess return earned per unit of risk taken. A higher Sharpe ratio indicates better risk-adjusted performance, as it reflects a higher return for each unit of volatility or risk.
4. Sortino Ratio: is a risk-adjusted measure similar to the Sharpe ratio but focuses only on downside risk. It considers the excess return per unit of downside volatility. The Sortino ratio emphasizes the risk associated with below-target returns and is particularly useful for assessing investments with asymmetric risk profiles.
5. Omega Ratio: measures the ratio of the cumulative average positive returns to the cumulative average negative returns. It assesses the reward-to-risk ratio by considering both upside and downside performance. A higher Omega ratio indicates a higher reward relative to the risk taken.
6. Z-Score: is a statistical measure that represents the number of standard deviations a data point is from the mean of a dataset. In finance, the Z-score is commonly used to assess the financial health or risk of a company. It quantifies the distance of a company's financial ratios from the average and provides insight into its relative position.
7. Average Daily Range: ADR represents the average range of price movement of an asset during a trading day. It measures the average difference between the high and low prices over a specific period. Traders use ADR to gauge the potential price range within which an asset might fluctuate during a typical trading session.
Utility:
Comprehensive Overview: The indicator allows for monitoring up to 40 cryptocurrencies simultaneously, providing a consolidated view of essential metrics in a single table.
Efficient Comparison: The heatmap-like coloring of the cells enables easy visual comparison of different cryptocurrencies, helping identify relative strengths and weaknesses.
Risk Assessment: Metrics such as Beta, Alpha, Sharpe Ratio, Sortino Ratio, and Omega Ratio offer insights into the risk associated with each cryptocurrency, aiding risk assessment and portfolio management decisions.
Performance Evaluation: The Alpha, Sharpe Ratio, and Sortino Ratio provide measures of a cryptocurrency's performance adjusted for risk. This helps assess investment performance over time and across different assets.
Market Analysis: By considering the Z-Score and Average Daily Range (ADR), traders can evaluate the financial health and potential price volatility of cryptocurrencies, aiding in trade selection and risk management.
Features:
Reference period optimization, alpha and ADR in particular
Source calculation
Table sizing and positioning options to fit the user's screen size.
Tooltips
Important Notes -
1. The Sharpe, Sortino and Omega ratios cell coloring threshold might be subjective, I did the best I can to gauge the median value of each to provide more accurate coloring sentiment, it may change in the future.
The median values are : Sharpe -1, Sortino - 1.5, Omega - 20.
2. Limitations - Some cryptos have a Z-Score value of NaN due to their short lifetime, I tried to overcome this issue as with the rest of the metrics as best I can. Moreover, it limits the time horizon for replay mode to somewhere around Q3 of 2021 and that's with using the split option of the top half, to remain with the older cryptos.
3. For the beginner Pine enthusiasts, I recommend scimming through the script as it serves as a prime example of using key features, to name a few : Arrays, User Defined Functions, User Defined Types, For loops, Switches and Tables.
4. Beta and Alpha's benchmark instrument is BTC, due to cryptos volatility I saw no reason to use SPY or any other asset for that matter. Indicator

Indicator

Indicator
