BlueCapitalTrading

BCT Buy And Hold w/ Advanced Statistics

BlueCapitalTrading 已更新   
This is a script designed to simulate a buy and hold strategy in the chart that its applied to.

Tradingview backtester is really limited in the statistics it gives you based on equity and information of open trades. For that reason many of the buy and hold scripts suffer from the same problem, a lack of useful statistics about your buy and hold strategy.

This script allows you to filter a specific buy and hold period (or use the whole data available in the tradingivew chart) and get useful statistics based on equity on a bar by bar basis.

Date Range Filtering
This allows you to chose a specific period to test the buy and hold strategy and to visualize the statistics.
We include 3 main tables which offer useful information so you can compare your strategy vs buy and hold strategy.
This 3 tables are:

Draw Downs Table
This table shows the Current P/L, Current Draw Down, Average and Maximum Draw Downs based on the equity of the buy and hold strategy calculated by candle. This can show you how much average and maximum loss or pain you would have to go through in order to stick to the buy and hold strategy.

Custom Statistics Table
This table shows useful advanced statistics to compare the buy and hold strategy to other strategies.
CAGR: Compounded annual growth rate is the industry standard in terms of showing annualized returns for any strategy or investment.
Annualized Return ($)
Trade Duration (Days): Self explanatory, displays how long the buy and hold trade was open or is open counted in days.
Max Stagnation Period (Days): Measures the Maximum time taken between new equity highs.
Average Draw Down : Average value of all draw downs from equity highs over the period (sampled 1 time per candle).
Maximum Draw Down : Largest draw down from equity highs in the whole period.
Return / Avg DrawDown: Advanced Proprietary statistic in which the annualized (non compounding) return is divided by the Average Draw Down (displayed in the Draw Downs Table)
Return / Maximum DrawDown: Advanced statistic in which the annualized (non compounding) return is divided by the Maximum Draw Down (displayed in the Draw Downs Table)
CAGR / Avg DrawDown: Advanced Proprietary statistic in which the CAGR (compounding) is divided by the Average Draw Down (displayed in the Draw Downs Table)
CAGR / Maximum DrawDown: Advanced Proprietary statistic in which the CAGR (compounding) is divided by the Maximum Draw Down (displayed in the Draw Downs Table)

Note: All the advanced statistics show, in slightly different ways, how much a strategy compensates you in relation to the risk taken. In other words you can see this as a way to quantify risk adjusted returns between multiple strategies. We prefer using the CAGR based advanced Statistics as they give a more universal value to compare across multiple strategies and asset classes.

In Sample / Out Of Sample Custom Stats (IS/OOS) Table
This table shows similar statistics as the Custom Statistics Table but is able to break down the backtest period into segments, this is useful when testing strategies as it can be used to test optimization quality. In this Buy and Hold strategy this can be used to visualize the stats of 2 periods at the same time and compare them without need to change settings or use another instance of the script.
All the Stats are the same as in the Custom Statistics Table with the difference of some being removed and the table being constructed in a way that facilitates the comparison of stats between In Sample, Out Of Sample and Full periods
版本注释:
Corrected a small mistake in Max Draw Down % Calculation, the value was being underestimated. It should now be corrected (draw down is calculated on equity taken at a time per candle interval.

Added the In Sample period start date to the IS / OOS table
版本注释:
Corrected an issue with the inputs order.

受保护脚本
该脚本是闭源发布的,您可以自由使用它。您可以收藏它以在图表上使用。您无法查看或修改其源代码。
免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?