Saturday, 11 February 2012

Week of 2012 FE 10

SPY fell by 0.1% this week, while my account rose by 1.0%.  To get this 1.0% gain, I had to lower my loss floor by 2.5%.

Euro news: The prime minister of Greece did not resign as threatened, but six (so far) of his cabinet ministers *have* resigned and one of his coalition partners (LAOS) has apparently left the coalition.  There is rioting in the streets of Athens and Thessaloniki.  On Sunday, the Greek Parliament is supposed to vote in favour of the bailout, but many politicans believe that a vote for the bailout would be career suicide.  Germany continues to insist that they will pull the financial plug if the Greeks don’t agree to the latest demands.  Increasing numbers of people are getting sick of this charade and wishing that The Powers That Be would stop pretending that Greece didn’t actually default two years ago.

│Daily % gain
size
│Max % loss│Results
Symb  Buy │ Fri   Mon   Tue   Wed   Thu   Fri │ Beg   End │
 
RWM  JA06 │ -8.6  17 -8.3  0 │ │ −5.1%
TZA#0  JA23 │ -17.2  12 -16.3  0 │ │ −9.0%
TNA  FE01 │ +9.0  17 +7.7  0 │ │ +0.5%
TZA#1  FE07 │ -0.7  10 -1.3  10 -0.1  21 +4.1  22 │ −15.2 −11.0 │
SPY │ +7.2 +7.1 +7.4 +7.7 +7.9 +7.1 │ │
me │ -2.2 -2.2 -2.2 -2.3 -2.2 -1.2 │ │
floor │ -2.2 -2.2 -3.9 -3.7 -5.2 -4.7 │ │

MACD-based swing trades

Ticker
Symbol
Buy dateBuy priceSell dateSell priceProfit
ModelActualMAModelActualMAMA
TZA#1 FE 07 15:00 $18.69 $18.67 (not yet)        
FE 09 11:00 FE 09 12:17 $18.79 $18.75

On Tuesday, as the 3pm hour approached, it was clear that there would be a “buy” signal for TZA, so I logged into Schwab Active Trader and waited.  As the seconds ticked by during the 15:00 minute, I received popup messages telling me that “I” had placed an order to buy TZA, that “my” order had executed successfully, and that “I” had placed a hard-stop order for $15.87.  I immediately deleted the hard-stop and replaced it with a 15% trailing stop, which initialized itself at exactly $15.87.  My robot had worked perfectly!

On Thursday at 11am, there was a “buy more” signal, but the robot didn’t do anything because my ISP had picked that day to screw around.  There were lengthy periods all day when ping got no reply from the server, or ping worked but ssh couldn’t log in, or I could log in but programs wouldn’t run because their execution environments were screwed up.  It seems that my ISP is trying to push me off the El Cheapo hosting that I already paid for up through September!  I thought again about buying a wall-wart plug computer and running the server in my house.  By the end of the day, the ISP had restored normal operations, so I still haven’t bought my own server for $165 (plus import duties).  Anyway, I bought the shares manually, 77 minutes later than the model but for slightly less money.

Surfing the oscillations

Everything always takes longer than expected!  Here is an hourly chart for IWM since the last cycle-low.  The beige line is supposed to be the “daily-cycle trendline” which remains unbroken after 52 days (usually there is a trendline-break every 35‒40 days).  The blue line connects the October and November lows; I think this is the “intermediate-cycle trend” which Toby Connor predicts will be broken soon (actually, he predicted that a week ago but it still hasn’t happened).

Note that FE03 through FE09 form an ”island top”. Last year, I found island tops were quite effective in predicting when the market would turn, but Thomas Bulkowski says that it is the *least* reliable pattern he knows!

Also note that IWM broke through its upper trendline around FE02 and has been in a ”bubble” ever since.  Some people say that the usual result after a bubble is that the stock will return to the price it had when the bubble started, which is now below the beige line.

Saturday, 4 February 2012

Week of 2012 FE 03

SPY rose by 2.2% this week, to its highest weekly close since July, while my account fell by 0.7% to its lowest weekly close ever.  The loss floor is now the same as my account balance because I am out of the market.

Euro news: The prime minister of Greece has announced that he will resign on Monday if a deal to avoid defaulting on his nation’s debts can’t be worked out over the weekend.  It seems Germany has decided that it is time for Greece to default, so there will be no deal.  It takes six weeks to do a “voluntary restructuring”, so if there is no deal this weekend then Greece will not be able to make the March 20th interest payment on its bonds.

US news: Friday’s unemployment report seemed like good news: unemployment fell to 8.3%!  The market loved it!  But one of the reasons why the unemployment number fell is that about 700,000 people gave up looking for work, so they no longer count (even though they’re still hurting).  Next week there will probably be a reaction low as traders realize that Friday’s report wasn’t quite as good as it first seemed.

This week’s pie chart includes a new black segment labelled <out>.  This is money that I have withdrawn from the account for living expenses.  The black segment will remain for the remainder of the year to prevent my account value from seeming to drop suddenly.  Withdrawn money is not a “loss”!

│Daily % gain
size
│Max % loss│Results
Symb  Buy │ Fri   Mon   Tue   Wed   Thu   Fri │ Beg   End │
 
RWM  JA06 │ -4.7  17 -4.1  17 -3.9  17 -5.9  18 -6.6  17 -8.6  17 │ −5.1 −5.1 │ −5.1%
TZA  JA23 │ -6.9 9 -3.7  12 -3.6  12 -9.7  12 -11.3  12 -17.2  12 │ −12.8 −12.1 │ −9.0%
TNA  FE01 │ +0.6  10 +2.0  10 +9.0  10 │ −15.1 −14.1 │ +0.5%
SPY │ +5.0 +4.7 +4.6 +5.6 +5.7 +7.2 │ │
me │ -1.5 -1.3 -1.2 -2.2 -2.2 -2.2 │ │
floor │ -2.2 -2.7 -2.7 -2.2 -2.2 -2.2 │ │

MACD-based swing trades

Ticker
Symbol
Buy dateBuy priceSell dateSell priceProfit
ModelActualMAModelActualMAMA
TZA JA 23 13:00 JA 23 13:26 $22.46 ⑽ $22.31 ⑽ FE 01 12:00 FE 01 12:12 $20.21 $20.16 -8.2% -9.0%
JA 30 11:00 $21.41 ⑽ $21.37 ⑶
TNA (Do not buy) FE 01 12:13   $57.81   FE 01 14:02   $58.21 +0.0% +0.5%

On Monday at 11am there was a “buy more” signal for TZA.  My trading robot finally bought something!  It bought within the same minute as the model called for, so “model buy-date” and “actual buy-date” are the same.  The buy-prices are different because TZA fell during that minute, from $21.41 at 11:00:00am to $21.37 at 11:00:20am when my order went through.

Problem: my robot bought the wrong number of shares!  The model called for 10% of my account to be invested, but the robot bought only 3%.  I fixed this bug, but decided not to manually buy the missing shares because I already had lots of RWM.  That turned out to be a good move because this TZA-swing was a loser (and RWM stopped out the same day).  The “actual profit” value looks worse because I bought fewer of the second tranche lower-priced shares, but my total dollar loss is less than what the model called for.

On Wednesday at 12pm there was a “sell” signal, but the robot didn’t sell due to yet another programming bug.  I fixed the bug and manually sold the shares.  Because the market jumped so much on Wednesday, I assumed that the model would call for buying TNA so I bought it manually—forgetting that I had recently changed the rules so TNA is not bought when PPO-signal is very high, as it was then.  So I reconceptualized TNA as a day-trade.  This turned out to be the wrong move because TNA had a nice pair of days after I sold it.  Oh well.

With the current parameters, the TZA swing-trading model has now had five losses in a row.  The last gain was NO 02.  Before that there had been four more losses, after a big gain on SE 23.  So really it’s been four bad months of almost continuous losses on TZA.  I can hardly wait for the market to turn.

Surfing the oscillations

Here is SPY for the last year.  Note the “Santa Rally” in the latter part of December, extending into February, just like this year.  Note how there is usually a downswing just after exceeding a previous high, and the market has just exceeded its high from last July.  Note how last July’s high was preceded by an “enthusiasm gap”, just like this latest high.  Note how last July’s high was followed by a week-long downswing, followed by a week of retrace, followed by several weeks of crash.  Note that the 200-day moving average is now at pretty much the same level as it was last July.

If past is prologue, then the market has now topped; it will swing down until FE 10, then swing back up FE 17, then head down towards a spike-low around MR 02.  However, MR 02 is too early; the market needs to drop around 17%-20% by MR 13 in order for Dr. Bernanke at the Fed to have a reasonable-seeming excuse to start printing US dollars like there’s no tomorrow, which he needs to do this summer in order to assure Obama’s re-election in November.  So something doesn’t *quite* add up here with these dates.

DanEric can barely contain himself, but he avoids calling a top because he got burned on that last month (as did many others, last month and in January 2011 as well).  Presumably, Lucas Papademos will resign as Greek P.M. on Monday, which will be taken as an excuse for a big gap-down (just like last July, when a Greek default was perceived as “imminent”).

I will wait for MACD to tell me when to short the market.

Monday, 30 January 2012

Week of 2012 JA 27

SPY rose by 0.2% this week, while my account fell by 1.0%.  I bought some TZA, so my loss floor dropped from -0.9% to -2.2%.  If the market goes up on Monday, I’ll probably get stopped out of RWM.

Spike-lows usually happen every 35‒40 days, but it has now been 42 days since the last one — unless it was that pitiful little down-spike at the open on JA24!  About the only hopeful news I have is that Goldman Sachs told their customers to go long the Russell 2000 on Thursday morning and the Russell hasn’t been that high since.  Assuming that Goldman never gives good advice and always screws over their own customers, this means that the top is in and so my ”short the Russell 2000” investments (RWM and TZA) will now start doing well.  Fingers crossed!

My personal finances are not doing well.  I have put in a request to Schwab to withdraw 10% of this money because I need it for living expenses.  As this is a retirement account for a country that I no longer live in, I can no longer make any deposits so all withdrawals are permanent.  Next week, I plan to add a black slice to the pie-chart, to be labelled “withdrawal”.  I made a withdrawal in 2010 (to prove that I could) but there were no withdrawals in 2011 because results were so poor.  It seems silly to keep drawing down the mortgage line-of-credit when I have so much cash sitting idle in this account.

│Daily % gain
size
│Max % loss│Results
Symb  Buy │ Fri   Mon   Tue   Wed   Thu   Fri │ Beg   End │
 
RWM  JA06 │ -2.9  17 -2.8  17 -3.4  17 -4.3  17 -4.1  17 -4.7  17 │ −5.1 −5.1 │
TZA  JA23 │ -0.8  10 -2.7  10 -5.3  9 -4.9  10 -6.9  9 │ −15.2 −12.8 │
SPY │ +4.8 +4.9 +4.7 +5.6 +5.1 +5.0 │ │
me │ -0.5 -0.5 -0.8 -1.2 -1.2 -1.5 │ │

RWM: Bought because DanEric thought that Minor wave (2) was over, but he has had to recant that prediction.  Now he predicts that the market will either bounce on Monday (and then head further downward) or bounce on Tuesday (and then head back up so I lose).  If it heads back up, I guess I’ll have to add DanEric to my list of “people whose predictions aren’t reliable enough to bet on”.

TZA: I am much less worried about this one, because I know that my MACD swing-trade algorithm is profitable on average, even though it occasionally has entire months of nothing but losing trades.

MACD-based swing trades

Ticker
Symbol
Buy dateBuy priceSell dateSell priceProfit
ModelActualMAModelActualMAMA
TZA JA 23 13:00 JA 23 13:26 $22.46 $22.31 (not yet)

Last weekend I updated the parameters.  On Monday there was a “buy” signal for TZA!  But the robot didn’t buy because its pricing data (via Schwab) was different from my pricing data (via stocksharts.com).  I made the trade manually and then fixed up the program to work correctly with Schwab’s data, which has only current-price and the high and low for the day so far (unlike stockcharts.com, which shows highs and lows for the last hour).

Saturday, 21 January 2012

Week of 2012 JA 20

SPY rose by 2.1% this week, while my account fell by 0.4%.  This week there is a new blue line, indicating the loss-floor.  If all stops trigger (currently there is only one), my account balance will fall to -0.9% for the year-to-date; last week the floor was -0.7%.

It has now been 37 days since the last spike-low on Nov. 25th.  Usually the spike-lows are every 35-40 days.  It was 46 days from 2009 NO 30 until 2010 FE 05, but that low’s downswing began after 35 days and as of today the market shows no sign of going down yet.

US markets were closed on Monday, for Dr. Martin Luther King Jr.’s birthday.  Friday was the Options Expiration day for this month.

│Daily % gain
size
│Max % loss│Results
Symb  Buy │ Fri   Mon   Tue   Wed   Thu   Fri │ Beg   End │
 
RWM  JA06 │ -1.5  10 -0.8  14 -2.2  17 -2.8  17 -2.9  17 │ −6.9 −5.1 │
SPY │ +2.7 +3.1 +4.2 +4.7 +4.8 │ │
me │ -0.1 -0.1 -0.4 -0.5 -0.5 │ │

RWM: Reset the trailing stop from 8% to 5%, but this had little effect because RWM’s recent price peak was almost 3% lower than the last peak seen before the reset.
      On Sunday, I lowered the buy-trigger from SPY=$130.50 to SPY=$130.25; on Tuesday SPY peaked at $130.29 at 9:50am, so Schwab bought RWM for me before I got out of bed.  Life was good!  On Wednesday, SPY peaked at $130.84 at the close, so I bought more RWM in the after-market.  Then SPY continued rising for the rest of the week.  :-(
      Some would claim that these additional purchases of RWM were wrong because I was “adding to a losing position”.  Well, maybe.  But I did not lower my stop-price, so each additional buy has a tighter stop than its predecessor.  Wednesday’s buy increased my profit potential by 0.3% while increasing my max-loss by only 0.1%.

MACD-based swing trades

This is now four weeks in a row with no swing trades!  I hope all those people who bought the “Santa rally” and the “January effect” are having a good time.  As for me, I will continue waiting for the bimonthly spike-low.

Bugfix: There was a typo in my robot trader’s code.  PPO(50,30,10) consists of three values: signal, moving-average, and histogram.  Instead of the ”signal” value, I think it was actually using the ”moving-average” value.  So I fixed that and then retuned.  I now test close>SMA(23) instead of close>SMA(20).  This doesn’t seem to help TNA any, but improves results for TZA slightly.  Maybe I should drop this test.
      TNA: max-signal was -0.7, now -0.1 (which is much more lenient). Rebuy-delta was 0.01, now 0.03 (better results during 2010, not much worse for 2011).
      TZA: max-signal was -0.55, now 0.00 (i.e., any positive PPO-signal for IWM is now “good enough” to buy TZA). Epsilon was 0.5, now 0.25. Neg-epsilon was -0.7, now -0.4.  Delta was 2.2, now 1.35. Neg-delta was 1.15, now 1.45. Rebuy-delta was 0.07, now 0.01.
      Epsilon for TNA remains at 0.4.  Because neg-epsilon for TZA used to be more than that but is now equal, there is no longer an overlap zone where TNA has received a “buy” signal but TZA has not received a ”sell”.

Results still aren’t so hot.  For the last 19 months, the TNA trader would have had 28 wins & 15 losses, for a total account-gain of 15%, while the TZA trader would have had 21 wins & 18 losses, for a total account-gain of 40%.  Nice overall gain, poor win:loss ratio!  I feel like something better should be possible.  With these parameters, my account value this year would already have sustained two losses of 0.8%, on JA 03 and again on JA 10.  That wouldn’t have been a fun way to start the year!

New parameter: ”max-rebuys” prevents the system from mindlessly buying ever more tranches – I have limited funds!  Set to 3 (for original buy plus three rebuys).  Theoretically this could allow me to raise the tranche size from 10% to 25%, to use up all available money with four tranches, but practically I think I have to stick with 20% to ensure that I can buy one tranche of TNA at the spike-low, at the same time that I sell the four tranches of TZA.  This change would double my overall-gains to 70%/year, but would make losses due to robot-trader bugs twice as large.  I think I’ll wait for some profits before trying this.

Friday, 13 January 2012

Week of 2012 JA 13

SPY rose by 0.9% this week, while my account fell by 0.1%. 

The market tends to make a spike-low every 35 to 40 days.  There have been 33 trading days since the last spike-low on Nov. 25th.

│Daily % gain
size
│Max % loss│Results
Symbol  since │ Fri   Mon   Tue   Wed   Thu   Fri │ Beg   End │
 
RWM  JA06 │ +0.1  6 -0.5  6 -1.3  10 -1.8  10 -2.0  10 -1.5  10 │ −7.8 −6.9 │
SPY │ +1.8 +2.0 +2.9 +2.9 +3.2 +2.7 │ │
me │ +0.0 -0.0 -0.1 -0.2 -0.2 -0.1 │ │

For this year, the SPY and me rows in the table now start at +0.0 on JA 01, rather than restarting at +0.0 each week.

RWM: Gapped down on Tuesday, so I bought more at a lower price (which effectively tightened my stop-loss).  I had a limit-order to buy a third tranche if SPY rose to $130.50 (just below major resistance), but that didn’t happen.
      Next week: consider tightening the stop to 5%.  The 8% stop is for index funds to be held for several months, but I have doubts that I can really bear to hold this thing so long.  If I’m going to sell it at the January spike-low, the correct trailing-stop value is 5%.

MACD-based swing trades

Still no swing trades this week!  Hopefully the Minor [3] wave has just begun today and will trend downward next week.  PPO-signal is now only 0.18 and PPO-histogram is -0.20, so my robot-trader won’t buy anything unless there is a sharp drop of maybe 2% to trigger the delta rule.

Friday, 6 January 2012

Week of 2012 JA 06

SPY rose by 1.8% this week, while my account did not change.  The chart has been rescaled and rebased so "0% change" now refers to the values at the beginning of this year.

│Daily % gain
size
│Max % loss│Results
Symbol  since │ Fri   Mon   Tue   Wed   Thu   Fri │ Beg   End │
 
IAU  DE16 │ -2.0  10 +0.6  10 +1.1  0 │ │ −4.1%
RWM  JA06 │ +0.1  6 │ −8.1 −7.8 │
SPY │ 0.0 +1.6 +1.8 +2.0 +1.8 │ │
me │ +0.0 +0.0 +0.0 +0.0 +0.0 │ │

Markets were closed on Monday, in observance of New Year’s Weekend.

RWM: Bought because DanEric has been saying since DE 23 that the market would turn South on or about JA 09, which is next week.  He seems to have been on a roll these last three months: his “Minor [2] double-zigzag with ending diagonal” analysis has been quite accurate all along.  I placed a fairly small bet, mainly because PPO-signal is not very high right now so my automated system won’t go short until the market drops significantly.

MACD-based swing trades

Still no swing trades this week!  Maybe next week, as Minor [3] begins.

Tuesday, 3 January 2012

Week of 2011 DE 30

SPY fell by 0.7% this week, while my account fell only 0.4%.  For the year, SPY fell less than 1% while my account fell more than 17%.  I should’ve just put my money in SPY and left it there all year!

I have rebased the chart so the beginning-of-2011 values are now 0% instead of 100%.  Next week I will rebase the chart again so this week’s ending values (which are also start-of-2012 values) will correspond to “0% change” on the chart.

│Daily % gain
size
│Max % loss│Results
Symbol  since │ Fri   Mon   Tue   Wed   Thu   Fri │ Beg   End │
 
IAU  DE16 │ +0.8  10 -0.1  10 -2.6  10 -3.1  10 -2.0  10 │ −4.0 −4.0 │ −4.1%
SPY │ 0.0 +0.1 -1.2 -0.2 -0.7 │ │
me │ 0.0 -0.1 -0.3 -0.4 -0.4 │ │

Markets were closed on Monday, in observance of Christmas.

IAU: Stopped out on Thursday, making a lower low.  This is not a good time to be holding gold.  I will wait awhile.

Going into New Year’s, my holdings are now 100% cash (including unsettled cash from sale of IAU).  Next year my “gains this year” and “gains from transactions initiated this year” will be the same, unlike this year when there was a 2% unrealized gain carryover from 2010 that kept tripping me up.

MACD-based swing trades

My automated trading system for TNA/TZA swing trades is live and seemingly operational!  But there were no swing trade set-ups this week, so it hasn’t actually done anything yet.

New rule: Do not buy TNA when PPO-signal > -0.7; do not buy TZA when PPO-signal < +0.55.  Along with the “tweaks” below, for TNA this rule improves the 2011 win:loss ratio from 22:14 to 16:7, avoiding many losses while keeping most gains.  Overall profit increases from 2.52% to 2.53%, so basically no change.  For TZA this improves the win:loss ratio from 11:8 to 9:3 and increases profit from 7.25% to 7.28%.

Tweaks: Increase TNA delta from 1.1 to 1.2; increase neg-delta from 0.35 to 0.40.  Decrease TZA neg-delta from 1.45 to 1.15.  In part these tweaks are needed to reduce the negative impact of the new PPO-signal rule, because otherwise the delta rule would just buy the stocks anyway!

The TNA swing-trading rules seem to work well now.  Average gain per swing is 4.6% for the last 12 months, with roughly 3:1 odds. For the last 18 months (all the data I have), the average gain is also 4.6% but the odds are only 2:1.

The TZA rule needs more work.  Average gain is 18% for 12 months, with 3:1 odds, but for 18 months the average gain is only 10.4% and again the odds are 2:1.  There are still several nasty -5% losses, such as the -5.6% loss for October 27th.  For TNA, I was able to eliminate the nasty -3% loss in October via the above tweaks; maybe the same can be done for TZA with some more tweaking.