shardison

D-VaR position sizing

shardison Updated   
The D-VaR position sizing method was created by David Varadi. It's based on the concept of Value at Risk (VaR) - a widely used measure of the risk of loss in a portfolio based on the statistical analysis of historical price trends and volatilities. You can set the Percent Risk between 1 (lower) and 1.5 (higher); as well as, cap the % of Equity used in the position. The indicator plots the % of equity recommended based on the parameters you set.
Release Notes:
Fixed error in percentile_rank formula where it was not accounting for rolling returns. Added a cap of 200% of max equity to position size to limit plot size run-up and reduce exposure to large DVAR calculation when tail-size is extremely small number (i.e. 0.0001, etc.).

Need seasonals for futures data on NQ, ES, YM, or other commodities. Check out www.agresticresearch.com.
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

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.

Want to use this script on a chart?