Sunday, 26 February 2012

Week of 2012 FE 24

SPY rose by 0.4% this week, while my account and loss floor were un­changed because I was out of the market all week.

US markets were closed on Monday for Presidents’ Day.

Daily % gain
size
Max % lossResults
Symb  Buy Fri   Mon   Tue   Wed   Thu   Fri Beg   End
 
TZA  FE07 -2.1  21 -0.1  21 +2.1  0 −1.8%
SPY +8.7 +8.7 +8.4 +8.9 +9.1
me -2.6 -2.6 -2.6 -2.6 -2.6
floor -2.6 -2.6 -2.6 -2.6 -2.6

MACD-based swing trades

There were no swing trades this week.

Results from old parameters
YearTNATZA
200810:25-5.7%14:20+5.0%
200919:17+5.2%11:25-5.2%
201011:10+9.7%7:9-2.4%
201118:7+10.3%13:11+30.0%

Archival data: Last July, when I began to use hourly IWM prices for trading, the stockcharts.com website offered only one year of historical data, so I had only back to June ’10 which was about 2,600 hourly data-points.  Recently, stockcharts.com have started to offer ten years of hourly data!  That’s about 17,000 data-points.  So I downloaded and converted their charts (back to January ’08) into my arrays of numbers, to see how well my trading parameters would have done in prior years.  Results were awful!  The parameter-values that worked so well in 2011 were ineffective in prior years: a 40% gain for 2011, but 7% in 2010, 0% in 2009, and -0.7% in 2008.  The win:loss ratios were also bad.  It looks like I tuned things too closely for the way things went in 2011, which was not typical of market behaviour in other years.

Results from new parameters
Year TNA TZA
2008 9:10+9.3%: +2.3%, -1.3%, +2.1%, +6.1% 8:9+14.2%: +1.2%, +1.6%, -3.3%, +14.7%
2009 7:7+11.1%: +6.2%, -1.3%, +6.2%, +0.0% 6:7+2.9%: +1.7%, -1.6%, +0.7%, +2.2%
2010 8:5+1.7%: +2.9%, -1.2%, -0.2%, +0.2% 9:3+9.3%: +3.2%, +4.7%, +2.7%, -1.3%
2011 7:9+8.1%: +3.7%, +4.3%, -1.6%, +1.7% 8:11+18.6%: +0.5%, -0.7%, +20.0%, -1.3%

Above is the new tuning, whose main claim to fame is that it makes a profit in each year on both tickers.  But the win:loss ratio is still bad in over half of the cases.  In 2010, the overall profit would have been 11%, while in 2011 it would have been almost 27%.  (In reality, I lost money in 2011 because I didn’t use this system.)

Also shown above are profits for individual quarters: the TNA system lost money for consecutive quarters (Q2 and Q3 of 2010), but those were both good quarters for TZA.  Combining TNA and TZA, 11 of the 16 quarters were profitable.  No quarter lost more than 3% and there were two quarters with 20% gains.  Over four years, this system would have earned 75% profit, while SPY lost 6% during the period!  If this thing works, I can double my tranche-size for even more profits — to make 150% over four years.

Here are the new swing-trading rules:  The parts highlighted in yellow describe new program code.
LongShort
General:
  • Use IWM’s price-chart for calculations, but buy TNA for leverage.
  • Indicator-params: use PPO( 8, 71, 12 ) and SMA( 15 ).
  • Use IWM’s price-chart for calculations, but buy TZA for inverse leverage.
  • Indicator-params: use PPO( 10, 60, 12 ) and SMA( 75 ).
Buy if:
  • PPO_histogram > 0.4
  • PPO_signal < 1.8
  • Price > SMA.
  • Price has risen from an hour ago.
  • Price is higher than at any of the preceding 33 hours.
  • PPO_histogram has been below -0.2 since the last time the Alternative-sell rule was used.
  • PPO_histogram < -0.1
  • PPO_signal > -2.6
  • Price < SMA.
  • Price has fallen from an hour ago.
  • Price is lower than at any of the preceding 34 hours.
  • PPO_histogram has been above 0.27 since the last time the Alternative-sell rule was used.
Alternatively, buy if:
  • PPO_histogram has risen by at least 2.9 over the last 33 hours.
  • At least 5 hours have passed since the last time there was a buy or sell.
  • PPO_histogram has fallen by at least 4.1 over the last 22 hours.
  • At least 10 hours have passed since the last time there was a buy or sell.
Buy more if:
  • PPO_histogram rises by at least 0.02 for each of two hours, then falls by at least 0.02 for two more hours.  A “no-change” hour may occur between the rising hours and the falling ones.
  • Have bought 3 or fewer tranches so far.
  • PPO_histogram falls by at least 0.03 for each of two hours, then rises by at least 0.03 for two more hours.  A “no-change” hour may occur between the falling hours and the rising ones.
  • Have bought 3 or fewer tranches so far.
Sell if:
  • PPO_histogram < -0.2
  • Price has fallen during the last hour.
  • PPO_histogram has been above 0.4 since the last time the Alternative-buy rule was used.
  • PPO_histogram > 0.27
  • Price has risen during the last hour.
  • PPO_histogram has been below -0.1 since the last time the Alternative-buy rule was used.
Alternatively, sell if:
  • PPO_histogram has fallen by at least 2.7 over the last 33 hours.
  • At least 5 hours have passed since the last time there was a buy or sell.
  • PPO_histogram has risen by at least 0.6 over the last 22 hours.
  • At least 10 hours have passed since the last time there was a buy or sell.
Regardless of above, at any time of day, sell immediately if:
  • Price falls to 95% of highest seen so far.
  • Price rises to 105.3% of lowest seen so far.

Here is a chart showing how the above rules interact with the last four years of data:

(The underlying price-data’s colour changes from grey to brown halfway through the chart due to my workaround for bugs in the stockcharts.com program.)

Note the long straight sections with no trades (April 2009, July 2009, March/April 2010, October/November 2010, November 2011).  Also note some short straight sections that have only loser trades (April 2008, Setember 2008, November 2009, December 2011).  This swing-trading system requires volatility!  It doesn’t make any money when the market is being boring and just going up day after day.  I need another system for detecting low-volatility periods and profiting from them.  Perhaps I will use TRIX for that, and have it trade URTY and SRTY instead of TNA and TZA.

No comments:

Post a comment