SPY rose by 0.5% this week,
while my account fell 0.7%.
The loss-floor is now -7.7%.
Market news: The bears are licking their chops! Robert Prechter, of
Elliot Wave Theory fame, has started sending out emails about his
“drop like a rock scenario”. Cycle analysis has convinced some traders that
the market will start dropping next week, hitting its usual bi-monthly low
around August 7th (last year the decline was July 25th..August 9th). Of
course, nothing ever goes as planned on the stock market, so I will wait for
a “short” signal from my indicators.
Friday’s allocations:
|
| Daily % gain | │ | Max loss |
Sym |
Buy |
│ |
Fri |
Mon |
Tue |
Wed |
Thu |
Fri |
│ |
Beg |
|
End |
|
TZA |
JL11 |
│ |
-0.6 |
14 |
-0.6 |
14 |
-0.6 |
14 |
-0.6 |
0 |
|
|
|
|
│ |
|
|
|
|
TNA |
JL18 |
│ |
|
|
|
|
|
|
-0.3 |
15 |
-0.4 |
15 |
-0.8 |
14 |
│ |
-1.1 |
|
-1.0 |
UPRO |
JL19 |
│ |
|
|
|
|
|
|
|
|
-0.0 |
15 |
-0.0 |
15 |
│ |
-0.0 |
|
-0.0 |
SRTY |
JL20 |
│ |
|
|
|
|
|
|
|
|
|
|
+0.1 |
15 |
│ |
-0.9 |
|
-0.9 |
|
SPY |
|
│ |
+8.2 |
|
+7.9 |
|
+8.7 |
|
+9.5 |
|
+9.7 |
|
+8.7 |
|
│ |
me |
|
│ |
-7.0 |
|
-7.0 |
|
-7.0 |
|
-7.2 |
|
-7.4 |
|
-7.7 |
|
│ |
floor |
|
│ |
-7.0 |
|
-7.0 |
|
-7.0 |
|
-8.0 |
|
-8.0 |
|
-7.7 |
|
│ |
|
UPRO: Non-robot day trade. I tried to catch the end-of-day ramp
on Thursday, but the ramp was too small and didn’t cover my trading costs.
I did this trade by eye, but afterward it turned out that I would have
gotten substantially the same results using MACD(10,30,20) on the 1-minute
chart (which I had backtested some months ago).
Stock-trading robot
Ticker Symbol | | Buy date | | Buy price | | Sell date | | Sell price | | Acct Profit |
| Model | Actual | | M | A | | Model | Actual | | M | A | | M | A |
|
TNA |
|
JL 18 13:00 |
|
$55.89 |
$55.91 |
|
JL 20 12:00 |
|
$52.92 |
|
-0.8% |
|
SRTY |
|
JL 20 11:00 |
|
$45.50 |
$45.57 |
|
(Not yet) |
JL 20 15:00 |
|
|
$47.00 |
|
|
+0.1% |
|
TNA: Rats! The stupid model said to buy this at (what
turned out to be) Wednesday’s high of the day. Should reprogram the model
to *wait* for a retrace before buying — although in this case that
would merely have reduced the loss.
SRTY: The robot’s real-time quotes from Schwab differ by
pennies from the model’s on-the-hour quotes from Stockcharts.com. In this
case, the divergence was enough to produce a spurious “sell” signal. I’m
not sure what to do in such cases. Should I buy back what should not have
been sold? Use a limit order to try to get it back at the sale-price
(reducing profit by 0.03% for the two extra transaction fees)? For now, I
have replaced the robot’s quote archive with the model’s data and added a
temporary rule to the model:
IF time = "2012-07-20 15:00" THEN sell SRTY
This causes the robot to realize that it doesn’t currently own
SRTY,
so it will buy anew on Monday if the downtrend resumes.
PPO-based swing trades
How to change the TNA/TZA models so they wait for a
retrace after a breakout? Perhaps I need a new indicator
RETRACE(size,significance) which will calculate a retrace
of size percent of the distance from the most recent peak to a recent
bottom. Significance would somehow have to define “recent bottom”
— perhaps a number of hours of rising prices that must follow it?
Before trying that, I decided to try replacing the PPO-based model with
something simpler: how about a TRIX+MACD model? For my bearish tests
on IWM, I ended up using TRIX(22,2) and MACD(10,60,13): short when
TRIX < 0 and MACD > 0 and falling; cover when TRIX > 0 or MACD >
0 and rising. This works okay, but not as well as the PPO-based model. The
problem seems to be that “waiting for the retrace” is not generally a good
idea, at least for bearish swings. I suppose I should try a bullish test, to
see whether this approach works better for those, but I haven’t done that.
For last August’s crash, the TRIX+MACD model would have waited until August
2nd before shorting (because that is how long it took for MACD to go briefly
above zero before crashing) while the PPO model would have shorted on July
26th. As a result, the TRIX+MACD model would have increased my account by
only 11.5% on that crash, while PPO would have made 18.9%. For 2008..2011
as a whole, the TRIX+MACD model’s TZA profits would have been
31.5%, while the PPO model’s would have been 61.9%. I think I’ll stick with
the PPO model.
To get some use out of this abandoned research, I have added the TRIX rule
to the TNA/TZA models. This helps only slightly:
for TNA the four-year profit was 47.7% and win:loss ratio was
29:16, now it’s 50.7% and 29:15. For TZA the old results were
61.9% and 23:17, now 66.3% and 21:13. Much of these profit-increases come
from retuning the models, since TRIX is blocking some bad trades so now
they don’t need to be blocked by other indicators.
Bull swing (TNA) |
Bear swing (TZA) |
|
Buy signal: |
|
- Time = 11am–3pm, on the hour
- PEAKFREQ(140,8) ≤ 11
- TRIX(23,2) > 0
- This hour’s price > 99.9% of previous hour’s price
- This hour’s price > stop
- This hour’s price > SMA(30)
- This hour’s price > max of preceding 26 hourly prices
- PPO(8,71,1) < +2.0
- PPO(8,71,12) > +0.4
- PPO(8,71,12) has gone below -0.25 since last sale
- STDDEV(80) < its EMA(43)
|
- Time = 10am–3pm, on the hour
- PEAKFREQ(140,8) ≤ 11
- TRIX(23,2) < 0
- This hour’s price < 100.1% of previous hour’s price
- This hour’s price < stop
- This hour’s price < SMA(77)
- This hour’s price < min of preceding 32 hourly prices
- PPO(10,57,1) > -2.0
- PPO(10,57,10) < -0.1
- PPO(10,57,10) has gone above +0.28 since last sale
- STDDEV(29) < its EMA(25)
|
|
Alternate buy signal: |
|
- Time = 11am–3pm, on the hour
- This hour’s price > SMA(30)
- This hour’s PPO(8,71,12) minus its value from 35 hours ago > +2.6
- It has been at least 6 hours since last sale.
|
- Time = 10am–3pm, on the hour
- This hour’s price < SMA(77)
- This hour’s PPO(10,57,10) minus its value from 22 hours ago < -2.35
- It has been at least 10 hours since last sale.
|
|
Buy-more signal: |
|
- Time = 10am–4pm, on the hour
- Either
- PPO(8,71,12) has risen by at least 0.006 during each of the last two hours
- PPO(8,71,12) has changed by less than ±0.006 during the last hour and rose by at least 0.006 during each of the preceding two hours
- PPO(8,71,12) fell by at least 0.006 during the two hours before that.
- STDDEV(80) < its EMA(43)
- Have bought 2 or fewer tranches so far
- If signal received at 10am or 4pm, postpone purchase to 11am
|
- Time = 10am–4pm, on the hour
- Either
- PPO(10,57,10) has fallen by at least 0.025 during each of the last two hours
- PPO(10,57,10) has changed by less than ±0.025 during the last hour and fell by at least 0.025 during each of the preceding two hours
- PPO(10,57,10) rose by at least 0.025 during the two hours before that.
- STDDEV(29) < its EMA(25)
- Have bought 4 or fewer tranches so far
- If signal received at 4pm, postpone purchase to 10am 10am or
|
|
Sell signal: |
|
- Time = 11am–3pm, on the hour
- 99.9% of this hour’s price < previous hour’s price
- This hour’s PPO(8,71,12) < -0.25
- PPO(8,71,12) has gone above +0.4 since original purchase
|
- Time = 10am–3pm, on the hour
- 100.1% of this hour’s price > previous hour’s price
- This hour’s PPO(10,57,10) > +0.30
- PPO(10,57,10) has gone below -0.1 since original purchase
|
|
Alternate sell signal: |
|
- Time = 11am–3pm, on the hour
- This hour’s PPO(8,71,12) minus its value from 35 hours ago < -2.05
- It has been at least 6 hours since last purchase.
|
- Time = 10am–3pm, on the hour
- This hour’s PPO(10,57,10) minus its value from 22 hours ago > +0.58
- It has been at least 10 hours since last purchase.
|
|
Stop update: |
|
- Time = 10am
- Calculate new stop = lowest price seen in preceding 22 hours.
- Raise new stop to 95.0% of the highest price seen in preceding 22 hours, if less than that
- If I don’t currently own TNA, replace stop with the newly-calculated value. Otherwise:
- Discard new stop (and keep the old one) if the new value is lower
- Sell now if lowest price of last 22 hours occurred during the last hour
- Otherwise, convert the IWM-based stop to the corresponding TNA price and update the standing stop-order at Schwab
|
- Time = 10am
- Calculate new stop = highest price seen in preceding 22 hours.
- Lower new stop to 104.6% of the lowest price seen in preceding 22 hours, if greater than that
- If I don’t currently own TZA, replace stop with the newly-calculated value. Otherwise:
- Discard new stop (and keep the old one) if the new value is higher
- Sell now if highest price of last 22 hours occurred during the last hour
- Otherwise, convert the IWM-based stop to the corresponding TZA price and update the standing stop-order at Schwab
|
Additional models
Currently I have two bullish models (TNA=swing and
URTY=trend) and two bearish models (TZA=swing and
SRTY=news). What if I want to add a third model, such as a bullish
news trade? There are only two pairs of ETFs that offer 3× leverage on the
value of the Russell 2000 basket of stocks. However, there is also a pair of
ETNs: RTLA and RTSA. The ETF/ETN distinction doesn’t seem
to matter much: there are no tax differences since I am using a retirement
account, and the tail risk if Barclay’s Bank were to go belly-up doesn’t
seem much different since leveraged derivatives are “side bets with the
banksters” which lose all their value if the world’s financial system collapses,
whether bought via an ETF or an ETN. The trading volume of RTLA is
abysmal—less than one trade per day—but does that really matter
for a synthetic instrument whose shares get created on-the-fly when someone
wants to buy them?
On Monday, I watched the market. The good news is that Barclay’s (or
whoever the market maker is) updates their bid/ask prices for RTLA
every few seconds, even though days go by between trades. The bad news is
that the spread tends to be around 7¢, versus maybe 2¢ for TNA.
At 12:48, the offering price for RTLA was $64.65,
while IWM could be had for $79.34. By 13:32, the bid
for IWM had gone down by 0.3% while the bid for RTLA went
down by 0.6%, which is only 2× even though it says “3×” on the tin.
Multi-day charts show 3× performance for RTLA, but intraday
performance (at least for early Monday afternoon) was only 2×. It looks
like RTLA is not suitable for news trades, which often take only a
few hours from purchase to sale.