Monday, 15 July 2013

Week of 2013 JL 12

IWM rose by 3.6% this week, to its highest value ever.  My account was unchanged.  The loss-floor remains at -6.1%.

No trades for me this week.

End of week allocations:
Daily % gain
size
Max loss
Sym  Buy  Fri  Mon  Tue  Wed  Thu  Fri Beg   End
 
IWM +20.8     +21.3     +22.4     +22.7     +24.2     +24.4    
me -6.1 -6.1 -6.1 -6.1 -6.1 -6.1
floor -6.1 -6.1 -6.1 -6.1 -6.1 -6.1

New double-TRIX trading model

There have been no changes to the robot’s trading models for eleven months (since “Week of 2012 AU 17”).  Since that time, there have been about 60 trades but the value of my account has gone approximately nowhere.  On June 24th, I went to a programmers’ meet-up and showed them some of the robot’s code.  They were flabbergasted that I have continued to work on this thing for 2½ years even though it has never made any money.  What kind of crazy crank must I be to do such a thing???  I decided to create a new model for next month’s meetup, perhaps one that would actually work for a change!

Buy signal:
When all are true:
  • TRIX(q) > its EMA(2)
  • Either TRIX(q) < 0 OR TRIX(s) > its EMA(2)
  • Low > stop
  • There is no trendline from TLINE(t,slopelimit,peakdist,slop) or there have been fewer than numsubpeaks under it.
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.
Stop-price:
If close > SMA(m):
  • 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.

CHANDELIER(c,a) is a standard technical indicator that I haven’t used before.  We call DONCHIAN(c,high) to find the ceiling, then “hang” our stop below that by subtracting a times ATR(c), the Average True Range for the period.

TLINE(t,slopelimit,peakdist,slop) is a new technical indicator I made up that is supposed to be a simplistic “trendline” generator.  We process each period as follows:
  • If there is a trendline and high is below it, the trend continues.  If trend÷highslop+1 then this is a possible subpeak; if more than peakdist periods have passed since the previous subpeak and/or the trendline-defining peak₁ or peak₂, then increment the number of subpeaks seen for this trend.
  • If high > peak₁, this is our new high-point.  It replaces peak₁ and there is no trendline.
  • Otherwise, we have a new peak₂.  Compute its slope (on a logarhythmic chart) as peak₂÷peak₁ where i is the number of periods that have elapsed since peak₁.
    • If this “ith root” ≥ slopelimit, the trendline is not steep enough to be usable so high becomes our new peak₁ and there is no trendline.
    • Otherwise, we rescan from peak₁ to count up the subpeaks for the new trendline.
  • At the end of each period, if peak₁ was more than t periods ago then it is too old, so replace peak₁ with peak₂ and rescan for a new peak₂ and possible subpeaks.

Here are the parameter values for the first four trades:
ATML
(daily)
FNSR
(daily)
IWM
(daily)
IWM
(hourly)
TRIX(q) 3 3 12 75
TRIX(s) 17 17 51 430
SMA(m) 230 260 130 580
CHANDELIER(c⁺,a⁺) 27, 5.0 25, 6.0 32, 3.7 290, 12.9
CHANDELIER(c⁻,a⁻) 23, 3.8 22, 3.8 23, 2.6 110, 12.1
TLINE(t,slopelimit,peakdist,slop) 23, 0.998, 2, 0.08 35, 0.995, 2, 0.08 56, 0.999, 2, 0.07 210, 0.9999, 3, 0.09
numsubpeaks 1 1 1 2
Trade ticker ATML FNSR UWM (2×) URTY (3×)

Currently, ATML does not have a “buy” signal but the other three do.  Should I buy now, or wait for the next “sell” and then buy on the following “buy” signal?  Usually I would wait, but Tim Knight wrote that he thinks the market is going much higher this summer, so I told my broker to buy FNSR, UWM, and URTY at Monday’s open.

Ticker
Symbol
Buy dateBuy priceSell dateSell priceAcct Profit
ModelActualMAModelActual M  A  M  A 
FNSR MA 29 09:30 JL 15 09:30 $12.81 ??? (Not yet)
UWM JL 03 09:30 JL 15 09:30 $61.24 ??? (Not yet)
URTY JL 01 11:00 JL 15 09:30 $55.03 ??? (Not yet)

No comments:

Post a Comment