Saturday 20 July 2013

Week of 2013 JL 19

IWM rose by 2.0% this week, to its highest value ever.  My account rose 0.7%.  The loss-floor has dropped to -9.3%.

End of week allocations:
Daily % gain
size
Max loss
Sym  Buy  Fri  Mon  Tue  Wed  Thu  Fri Beg   End
 
FNSR +0.1  10  +0.0  10  +0.0  10  -0.0  10  +0.1  10  -1.7 -1.5
UWM +0.1  10  -0.0  10  +0.1  10  +0.2  10  +0.2  10  -0.9 -0.6
URTY +0.1  10  -0.0  10  +0.1  10  +0.3  10  +0.3  10  -1.5 -1.3
IWM +24.4     +25.5     +24.9     +25.4     +26.2     +26.4    
me -6.1 -5.8 -6.0 -5.8 -5.6 -5.4
floor -6.1 -10.1 -9.8 -9.7 -9.5 -9.3

Double-TRIX trading model

The TLINE indicator doesn’t seem to work well (the longest steepest trendlines should be the most reliable ones, but they aren’t), so I have removed it.  Meanwhile, I still need something to avoid horrible results for ATML in the years 2000 and 2004.  Instead, I have added two new tests: “SMA(q)” and “Retest sale”.

Buy signal:
When all are true:
  • TRIX(q) > its EMA(2)
  • Either TRIX(q) < 0 OR TRIX(s) > its EMA(2)
  • close ≤ SMA(q)
  • Low > stop
For a daily trade, the signal is given after the daily close and so the purchase is at tomorrow’s opening price.  For hourly, signals are given on the hour 11am‥3pm and the purchase is immediate.
Sell signal:
When all are true:
  • TRIX(q) < its EMA(2)
  • TRIX(s) < its EMA(2)
For a daily trade, the signal is given after the daily close and so the sale is at tomorrow’s opening price.  For hourly, signals are given on the hour 11am‥3pm and the sale is immediate.
Retest sale:
When exactly w periods have passed after a purchase, if close < m times the purchase price, then sell (next day for daily, immediately for hourly).
Stop-price:
If close > SMA(s):
  • stop = CHANDELIER(c⁺,a⁺)
Otherwise:
  • stop = CHANDELIER(c⁻,a⁻)
For daily or hourly trades, the stop is recalculated once per day, after market close, and is used as the stop-price for the following day.  At any time, if low < stop, then we recognize that the shares were sold and the trade is over.

Here are the revised parameter values for the first four trades:
ATML
(daily)
FNSR
(daily)
IWM
(daily)
IWM
(hourly)
Trade ticker ATML FNSR UWM (2×) URTY (3×)
TRIX(q) 3 3 12 75
TRIX(s) 17 17 51 429
SMA(q) 9 1 3 1
SMA(s) 240 270 130 580
CHANDELIER(c⁺,a⁺) 27, 4.9 25, 6.0 32, 3.4 360, 12.9
CHANDELIER(c⁻,a⁻) 21, 4.2 22, 3.8 23, 2.7 110, 12.0
RETEST(w,m) 4, 1.01 3, 0.99 3, 1.00 21, 0.99

For the new RETEST function, w is always around 3 — maybe the 4 value for ATML is an artifact?  The m value is always around 1.00 — maybe it should always be exactly 1.00?

The new SMA(q) function is probably wrong.  Because it says not to buy if price is too high, that makes the system susceptible to missing out on run-ups if price rises too soon and then never falls below the SMA for weeks on end.  For FNSR it seems worse than useless.  For IWM, it nearly doubles the expected return at the daily level, but is useless at the hourly level???  This probably needs more work.

Here are some figures for ATML, showing simulated results for the last 22 years.  The “Hold” figure shows the result for using all my money to hold ATML all year, while “Trade” shows the effect of the double-TRIX trading strategy (using only 10% of my money).  Numbers shown with red background would have been disappointing:
YearHoldTrade   YearHoldTrade
1992+87%-1.0% 2003+160%+14.4%
1993+111%+4.4% 2004-35%-3.0%
1994+94%+2.7% 2005-21%+5.8%
1995+34%+2.1% 2006+96%+4.5%
1996+49%+2.5% 2007-27%-0.4%
1997-45%-0.8% 2008-34%+0.5%
1998-17%+4.1% 2009+50%+2.6%
1999+286%+7.1% 2010+183%+0.4%
2000-21%-0.1% 2011-34%-2.4%
2001-33%+3.0% 2012-2%+1.9%
2002-71%+9.6% 2013*+12%-0.4%
There are three kinds of disappointments: ⑴ ATML makes lots of money, but I get less than half of it; ⑵ ATML makes money but I lose that year [1992, 2013]; and ⑶ I lose 3.0% or more of my money in one year [2004].  For 2013, only the data for the first six months is shown.

Stock-trading robot

So far, so good!  This week the robot correctly updated its stop on URTY each day, and correctly decided not to sell anything.  Next week, I will have it automatically update the stops on FNSR and UWM (which were done manually this week) and it should also be ready to sell those tickers automatically when the trading model says to.

Ticker
Symbol
Buy dateBuy priceSell dateSell priceAcct Profit
ModelActualMAModelActual M  A  M  A 
FNSR MA 29 09:30 JL 15 09:30 $12.81 $18.48 (Not yet)
UWM JL 05 09:30 JL 15 09:30 $63.31 $67.95 (Not yet)
URTY JL 01 11:00 JL 15 09:30 $55.03 $63.70 (Not yet)

For FNSR, the opening price for JL 15 was $18.15, but I got a much worse price than that, perhaps because my purchase was not a round multiple of 100 shares.  This suggests that FNSR might not be a good choice for trading because I won’t actually get the prices that the simulator predicts.

For UWM, the purchase date should have been JL 05, not JL 03 as shown last week.

No comments:

Post a Comment