Log in to see Cloud of Tags

Wealth-Lab Wiki

TASC 2012-10 | Seasonal Strategy with Leveraged ETFs (Gardner)

RSS

Traders' Tip text

Mr. Gardner presented legacy WealthScript code in the article, so we’ll provide WealthScript Version 6 C# code here. Not satisfied testing with the short history of the leveraged ETFs (DBC and DDM) since 2006, we ran 12-year (8/2000 to 8/2012) simulations on 10 Sector ETFs (IXP, XLB, XLE, XLF, XLI, XLK, XLP, XLU, XLV, and XLY) using 10% of equity sizing on $100,000 starting capital, optimizing on the moving average period. While all periods produced solid returns, a smooth profit peak occurred when using a 30-bar period. With a maximum equity drawdown of only ­-14.7%, annualized gain was 7.9% equating to a $147,896 net profit, which includes $15,475 in dividends. Only years 2002 and 2008 had negative returns of -1.0% and -2.4%, respectively.

Figure 1. The Buy and Hold comparison emphasizes how the strategy “rachets up” equity while evading multiple drawdown periods between May and October. (Inset: annual period returns.)

Image

WealthScript Code (C#)

using System; using System.Collections.Generic; using System.Text; using System.Drawing; using WealthLab; using WealthLab.Indicators;

namespace WealthLab.Strategies { public class GardnerSeasonal : WealthScript { StrategyParameter _period; public GardnerSeasonal() { _period = CreateParameter("Period", 50, 10, 100, 5); } protected override void Execute() { DataSeries sma = SMA.Series(Close, _period.ValueInt); PlotSeries(PricePane, sma, Color.Blue, LineStyle.Solid, 2); for(int bar = GetTradingLoopStartBar(5); bar < Bars.Count; bar++) { if (IsLastPositionActive) { Position p = LastPosition; if (Datebar.Month == 5) SellAtMarket(bar + 1, p); } else { if (Datebar.Month == 10 && Closebar > smabar ) BuyAtMarket(bar + 1); } } } } }


Robert Sucher
wealth-lab.com

Important Disclaimer: The information provided by Wealth-Lab is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security.  The owner of Wealth-Lab.com assumes no liability resulting from the use of the material contained herein for investment purposes. By using this web site, you agree to the terms of this disclaimer and our Terms of Use.


ScrewTurn Wiki. Some of the icons created by FamFamFam.