Downside Upside VolRatio
- Indicateurs
- Version: 1.0
- Activations: 5
# Downside Upside Vol Ratio - Risk asymmetry
*Category: Volatility | Difficulty: intermediate | Window: separate window below the chart | Markets: Universal (Forex, indices, commodities, crypto, stocks) | Suggested timeframes: H1, H4, D1*
## Short description
> Computes two separate semi-deviations, one on negative returns only and one on positive ones, and reports their proportion. It measures an asymmetry standard deviation conceals.
### Overview
Standard deviation treats an upward and a downward move of the same size as identical contributions to risk. For someone holding a position they are not remotely identical: one is profit and the other is loss, and knowing which of the two tends to be more violent on that market changes management. This indicator separates the two components by computing two distinct semi-deviations and reports their proportion as a percentage. A value above fifty means declines are more violent than advances: a market that rises slowly and falls abruptly, typical of equity indices. Below fifty the opposite holds, common in commodities during supply crises, where rallies are sudden and declines gradual.
### How the calculation works
1. For every bar the logarithmic return versus the previous close is computed.
2. Negative and positive returns are collected separately, and exactly zero ones are excluded from both groups.
3. For each group the root of the mean of squares is computed, which is the semi-deviation of that side.
4. The downside risk share is the negative semi-deviation divided by the sum of both, as a percentage.
5. If either side gathers fewer than InpMinSide observations the value is set to fifty: comparing two estimates based on very few data has no value.
6. The colouring thresholds are symmetric around fifty, computed automatically from the configured threshold.
### How to use it
- On a market with a high downside share, stops on a long position must be wider than those on a short of the same size.
- A sudden rise in the downside share signals the market is changing character, often before the trend turns.
- Use it to choose a preferential direction: trading the side where moves are more violent offers a better return to time ratio.
- The central grey zone indicates a substantially symmetric market, where ordinary standard deviation is sufficient.
- Comparing the share across correlated instruments helps pick the one whose asymmetry best suits your strategy.
### Who it is for and on which timeframes
It suits traders working both directions who want to calibrate stops and sizes differently for longs and shorts, and those selecting instruments by their own style. It works from H1 to D1, where the return sample is large enough and not spread dominated. It is particularly informative on equity indices and commodities, where asymmetry is structural and well documented; on forex asymmetries are generally milder and more variable over time.
### Practical example of reading a signal
On an equity index in D1 the downside risk share sits steadily around 63: declines are systematically more violent than advances, as is well known for this asset class. A trader working long on this index draws two practical consequences. The first is that a stop computed on overall volatility is too tight, because overall volatility averages slow advances and fast declines together. The second is that the same position size exposes a potential loss larger than the symmetric potential gain. The reasonable correction is to cut size by about a quarter relative to what a symmetric measure would suggest.
## Input parameters
| Parameter | Default | Description |
|---|---|---|
| `InpWindow` | 60 | Number of bars analysed. It must be wide enough to gather enough observations on both sides. |
| `InpSignalPeriod` | 10 | Period of the signal average overlaid on the histogram. |
| `InpSkewLevel` | 60.0 | Asymmetry beyond which risk is deemed unbalanced. The opposite threshold is computed automatically by symmetry. |
| `InpMinSide` | 5 | Minimum observations required per side. Below this threshold the value stays at fifty and the histogram grey. |
## Advantages / strengths
- It measures a real and well documented asymmetry that standard deviation, by construction, cannot detect.
- It has a direct and quantifiable bearing on differentiated sizing of long and short positions.
- A fixed percentage scale symmetric around fifty, immediately interpretable.
- The minimum per side observation check avoids producing unfounded values.
## Limitations and warnings
- On short windows or strongly directional markets one side gathers few observations and the indicator stays neutral.
- Semi-deviation is sensitive to extreme values: a single isolated crash can shift the value for the whole window.
- The measured asymmetry is historical and does not guarantee repetition: it is a tendency, not a rule.
- It provides no directional information on price, only on the shape of the return distribution.
**No repaint:** values printed on a closed bar are never modified afterwards.
**Disclaimer.** This product is a technical analysis tool, not an automated trading system, and it offers no profit guarantee whatsoever. Financial markets carry the risk of total loss of the invested capital. Past performance is not indicative of future results. Every signal must be confirmed with your own analysis, a money management plan and prior testing on a demo account. The author is not responsible for trading decisions taken on the basis of this indicator.
## Suggested tags / keywords for MQL5
`volatility`, `asymmetry`, `semi deviation`, `downside risk`, `risk management`, `position sizing`, `no repaint`, `statistics`
