Home   >   User Resources   >   Online Help   >   apaReturns.BoomBust
 

 

Function index Version 3.0.0

apaReturns.BoomBust(ReturnTimeSeries, MinDrawdown, OutputType, DoSplit, MinDrawdownLength, DoShowCumReturnsOtherwiseBoomBustReturns)

Excel=apaReturns.BoomBust(ReturnTimeSeries, MinDrawdown, OutputType, DoSplit, MinDrawdownLength, DoShowCumReturnsOtherwiseBoomBustReturns)

Result

Identifies retrospective boom and bust phases of a return time series, based on high-water-mark drawdown episodes. The output has the length and orientation of ReturnTimeSeries, or two columns if DoSplit is TRUE; each observation is assigned to the phase that ends at or after it. Entries without figures contain 0. If DoShowCumReturnsOtherwiseBoomBustReturns is TRUE, the output instead contains the cumulative returns, grouped into a boom and a bust column, for charting.

Syntax

ReturnTimeSeries: r x 1 (or 1 x r) vector of simple returns in decimal form (0.01 = +1%) in chronological order

MinDrawdown: optional minimum peak-to-trough drawdown in [0, 1) required to retain a bust phase, e.g. 0.1 for 10%; default 0, i.e. every drawdown episode is retained

OutputType: optional output type; 0 (default): return since phase start; 1: phase indicator with +1 = boom, -1 = bust, +2 = provisional boom, -2 = provisional bust; 2: phase number in chronological order

DoSplit: optional; TRUE: boom figures in the first and bust figures in the second column (r x 2, or 2 x r for a row vector), with 0 where a phase does not apply; FALSE (default): one vector

MinDrawdownLength: optional minimum length of a drawdown in periods, i.e. the number of observations from peak to trough, required to retain a bust phase; default 0, i.e. no length requirement

DoShowCumReturnsOtherwiseBoomBustReturns: optional; TRUE: cumulative returns since the start of the sample, W(t) - 1, with boom phases in the first and bust phases in the second column (r x 2, or 2 x r for a row vector) and #N/A where a phase does not apply; OutputType and DoSplit are then ignored; FALSE (default): output as defined by OutputType and DoSplit

Algorithm

The wealth index starts at 1 one period before the first return and compounds the returns, W(t) = (1 + r(1)) x ... x (1 + r(t)).

A drawdown episode begins at a running high-water mark, continues while wealth remains below it and ends when wealth recovers to or exceeds it. For equal high-water marks the most recent one is the peak; for equal lows the first one is the trough. Episodes with a drawdown W(trough) / W(peak) - 1 of at least MinDrawdown in magnitude and a peak-to-trough length of at least MinDrawdownLength periods are retained.

Bust phase: from a retained peak to the subsequent trough of the same episode. Boom phase: from the previous retained trough, or the start of the sample, to the next retained peak. The interval from the last retained trough to the last observation is a provisional boom phase. An unrecovered final drawdown is a provisional bust phase.

Return since phase start: W(t) / W(start) - 1, i.e. each phase is rebased separately and starts at zero.

Cumulative returns (DoShowCumReturnsOtherwiseBoomBustReturns = TRUE): W(t) - 1 in the column of the phase that contains t. Each phase also shows the observation at which it starts, i.e. the last observation of the preceding phase, so this boundary value appears in both columns and consecutive boom and bust segments join without a gap when the two columns are plotted as line series.

Remarks

Turning points are identified retrospectively, so the results are descriptive and not a trading signal. The trough of a provisional bust phase can still be revised lower. Smaller or shorter drawdown episodes are absorbed into the surrounding boom phase, so boom phases can contain temporary declines and bust phases temporary rallies; this is not a zig-zag turning-point algorithm. Blank or non-numeric cells are omitted, not imputed, and are returned as 0 (as #N/A for cumulative returns); returns of -100% or less produce an error. The sample start and end affect the identified phases.

To chart the phases, plot both columns of the cumulative-return output as line series with different colours against the dates. Excel line charts leave #N/A entries as gaps when the setting Show #N/A as an empty cell is active and empty cells are shown as gaps (the defaults under Select Data, Hidden and Empty Cells). Replacing #N/A by 0 would draw the lines down to zero.