sortDrawdowns(findDrawdowns(R)) Gives the drawdowns in order of worst to best

sortDrawdowns(runs)

Arguments

runs

pass in runs array from findDrawdowns to be sorted

Details

Returns a sorted list:

  • return depth of drawdown

  • from starting period

  • to ending period

  • length length in periods

References

Bacon, C. Practical Portfolio Performance Measurement and Attribution. Wiley. 2004. p. 88

See also

DownsideDeviation maxDrawdown findDrawdowns sortDrawdowns chart.Drawdown table.Drawdowns table.DownsideRisk

Examples

data(edhec) findDrawdowns(edhec[,"Funds of Funds", drop=FALSE])
#> $return #> [1] 0.00000000 -0.00770000 0.00000000 -0.01326634 0.00000000 -0.07069135 #> [7] 0.00000000 -0.03877182 0.00000000 -0.03737506 0.00000000 -0.01627767 #> [13] 0.00000000 -0.00150000 0.00000000 -0.02601701 0.00000000 -0.00040000 #> [19] 0.00000000 -0.01742180 0.00000000 -0.01843796 0.00000000 -0.01490000 #> [25] 0.00000000 -0.01655473 0.00000000 -0.02220000 0.00000000 -0.20591447 #> #> $from #> [1] 1 3 5 10 14 17 27 40 44 45 54 55 60 62 63 66 74 75 76 #> [20] 88 95 99 103 106 107 113 118 128 130 131 #> #> $trough #> [1] 1 3 5 11 14 22 27 41 44 47 54 57 60 62 63 70 74 75 76 #> [20] 92 95 100 103 106 107 115 118 128 130 144 #> #> $to #> [1] 3 5 10 14 17 27 40 44 45 54 55 60 62 63 66 74 75 76 88 #> [20] 95 99 103 106 107 113 118 128 130 131 153 #> #> $length #> [1] 3 3 6 5 4 11 14 5 2 10 2 6 3 2 4 9 2 2 13 8 5 5 4 2 7 #> [26] 6 11 3 2 23 #> #> $peaktotrough #> [1] 1 1 1 2 1 6 1 2 1 3 1 3 1 1 1 5 1 1 1 5 1 2 1 1 1 #> [26] 3 1 1 1 14 #> #> $recovery #> [1] 2 2 5 3 3 5 13 3 1 7 1 3 2 1 3 4 1 1 12 3 4 3 3 1 6 #> [26] 3 10 2 1 9 #>
sortDrawdowns(findDrawdowns(edhec[,"Funds of Funds", drop=FALSE]))
#> $return #> [1] -0.20591447 -0.07069135 -0.03877182 -0.03737506 -0.02601701 -0.02220000 #> [7] -0.01843796 -0.01742180 -0.01655473 -0.01627767 -0.01490000 -0.01326634 #> [13] -0.00770000 -0.00150000 -0.00040000 0.00000000 0.00000000 0.00000000 #> [19] 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 #> [25] 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 #> #> $from #> [1] 131 17 40 45 66 128 99 88 113 55 106 10 3 62 75 1 5 14 27 #> [20] 44 54 60 63 74 76 95 103 107 118 130 #> #> $trough #> [1] 144 22 41 47 70 128 100 92 115 57 106 11 3 62 75 1 5 14 27 #> [20] 44 54 60 63 74 76 95 103 107 118 130 #> #> $to #> [1] 153 27 44 54 74 130 103 95 118 60 107 14 5 63 76 3 10 17 40 #> [20] 45 55 62 66 75 88 99 106 113 128 131 #> #> $length #> [1] 23 11 5 10 9 3 5 8 6 6 2 5 3 2 2 3 6 4 14 2 2 3 4 2 13 #> [26] 5 4 7 11 2 #> #> $peaktotrough #> [1] 14 6 2 3 5 1 2 5 3 3 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 #> [26] 1 1 1 1 1 #> #> $recovery #> [1] 9 5 3 7 4 2 3 3 3 3 1 3 2 1 1 2 5 3 13 1 1 2 3 1 12 #> [26] 4 3 6 10 1 #>