Pages

01 March 2013

Monthly Tactical Asset Allocation System: Equity curve added

Writing the thinkscript code for an equity curve for the Tactical Asset Allocation System posed quite a challenge. Scripting a dynamical all in system seemed like solving the chicken and egg dilemma, but finally the study is ready to be published. The TAA-system is explained here.


The script plots a base line for the starting size of the account, a profit line showing the cumulative profit/loss for all closed trades and a live graph of the net liquidating value of the account (NLV). These last two values are also shown in chartlabels along with the open profit in real time for the trade of the current month and a live total profit percentage indicator (an idea by Aurelia, who offered greatly appreciated assistance in finalizing the script. Thanks T!).

Next to composing a personal "universe" of ETF's (defaults are EFA, IWM, SPY and TLT), the script furthermore allows to adjust the length and smoothing inputs for the ROC calculations (defaults: 60,5) to simplify backtesting. When for instance SPY is exchanged for VWO, the highest NLV is achieved with (60,1). The 60 days setting seems quite optimal though, just like Kevin McGrath's backtesting showed. Remember to adjust settings both for TAA_Rotation and for TAA_Equity.


When backtesting, please select a reference period which does not goes further back than the introduction date for any of the used ETF's. Because Vanguard introduced VWO in March 2005, on the chart above a time span of 5 years is used instead of 10 years. Please note that the statistical reliability of a backtest abates as the used time span is shorter and of course: historic results offer by no means any guarantee for the future!

A more aggressive approach would be selecting four triple leveraged ETF's: DZK, TNA, EDC and TMF (the 300% versions of the default universe). This combo may generate huge gains but be prepared for horrific drawbacks too (see chart below with in this case a 3 year time span because Direxion introduced TMF in April 2009). BTW, using inverse ETF's like SH seems not to improve profitability.


To share another idea for compiling an ETF-universe: consider the "middle road" with two triple leveraged ETF's and two of the original "index" ETF's: EDC, TNA, SPY and TLT. The profitability is mind blowing for such a simple system (another idea by Aurelia).


Not respecting the time span limitations of the selected ETF's may/will result in profit going "ballistic":


As usual the thinkscript is available in the comment section for free. Though the code is not donateware, your generosity would be very much appreciated!
Please share your comment's and idea's for improvement.

Do your own due diligence, trade safe and enjoy!

[Update March 10, 2013: nested "concat" statements added in TAA_Equity script]