Monday, 29 September 2014

Week of 2014 SE 26

IWM fell by 2.5% this week, while my account fell 1.7% to its lowest value ever.  The loss-floor has risen to -9.8%.  My account is all-cash for now.

End of week allocations:

89% cash USD
% gain
size
Max loss
Sym Buy Fri Mon Tue Wed Thu Fri Beg End
YHOO JL22 +3.0 18 +2.2 17 +2.2 17 +2.2 18 +2.2 0 +2.2 +2.2
URTY SE17 -0.3 14 -0.8 14 -0.8 14 -0.8 14 -0.8 0 -0.7 -0.7
TNA SE18 -0.7 21 -1.0 21 -1.0 21 -1.0 21 -1.0 0 -1.0 -1.0
SRTY ¹ SE19 -0.1 11 +0.4 11 +0.3 11 +0.3 11 +0.3 11 +0.3 0 -0.6 -0.6
SRTY ² SE23 -0.0 11 -0.2 11 -0.2 11 -0.2 11 -0.8 -0.5
SRTY ³ SE25 +0.1 11 -0.1 11 -0.4 -0.4
TZA SE25 -0.0 11 -0.3 11 -0.9 -0.7
IWM   -1.0   -2.4   -3.3   -2.7   -4.4   -3.5
me -8.1 -9.2 -9.2 -9.4 -9.3 -9.8
floor -10.0 -10.1 -10.0 -9.4 -10.8 -9.8

YHOO: Excellent!  Stopped out the next day after the Alibaba IPO.

SRTY: Timing is still poor.  Profits and losses for this week cancel each other out.

IWM: Dividend payment of 30.46¢ per share on SE 24.  I have multiplied all historical prices in my database by 0.997260 to prevent indicator-drift.

Stock-trading robot

Ticker
Symbol
Buy dateBuy priceSell dateSell priceAcct Profit
ModelActualMAModelActual M A M A
YHOO JL 22 09:30 $33.48 $33.56 SE 22 10:42 $39.19 $39.18 +2.28% +2.24%
URTY SE 17 13:00 $84.11 $84.08 SE 22 10:00 09:44 $79.57 $79.45 -0.77% -0.76%
TNA SE 18 11:00 $74.00 $74.04 SE 22 10:00 09:30 $70.42 $70.43 -0.97% -0.98%
SE 19 11:00 $73.61 $73.65
SRTY ¹ SE 19 14:00 $38.86 SE 23 10:00 $40.28 $40.27 +0.34% +0.33%
SRTY ² SE 23 14:00 $41.54 SE 24 12:00 $40.73 -0.13% -0.23%
SRTY ³ SE 25 10:00 $41.67 SE 26 15:00 $41.38 -0.07% -0.11%
TZA SE 25 11:00 $16.54 $16.56 SE 26 15:00 $16.17 $16.16 -0.25% -0.28%

YHOO: Sold after two months for ≈17% more than I paid for it!  Unfortunately, losses elsewhere ate up all these gains.

URTY: Seemingly-significant stop-slippage on this sale, yet the account-profit somehow came out well anyway.

SRTY: The purchase and sale prices were right on the nose, but profits were off.  Presumably this is because model-profit is based on the corresponding prices of IWM and sometimes arbitrage fails to keep IWM and SRTY in sync with each other.

TZA: It’s too bad that indicators were just slightly too bullish at the last hour of trading this week.  If the market crashes in October, I’ll probably wish this hadn’t sold.  But if we have a big rally next week, then it will have been a good move.

ATML: “Buy” signal for Monday.  Doesn’t look very promising, especially since Springheel Jack says “all longs should be counter-trend now” but ATML seems to be matching the broad market’s moves.  But the calculated stop-price is quite close to purchase-price so there isn’t much risk.

Friday, 26 September 2014

Week of 2014 SE 19

(Yes, I know this post is a week late.)

IWM fell by 1.2% this week, while my account fell 1.9%.  The loss-floor has risen to -10.0%.

Market news: The market was not happy with the FOMC meeting, which announced a continuation of the tapering of Quantitive Easing (= money-printing to finance the US deficit).  If the market does crash in October this year, pundits will probably say that it began with today’s big drop; a trendline dating back to the March 2009 bottom has been broken.

Political news: Scotland voted “No” on secession.  Of course there are some complaints about vote-rigging, but it looks like the issue is settled “for a generation“.  The Scottish prime minister has said he will resign after this loss.  Oh, and war continues in Ukraine and Greater Syria.

Health news: A volcanic eruption continues in Iceland, causing minor local coughing from the pollution, but European air-travel is unaffected so nobody else cares.  Also, Ebola is up to 1½ million cases in Africa, but very few white people are getting sick so it’s not worth reporting on the network news shows in North America.

End of week allocations:

Net 90% net equities, 25% cash USD
% gain
size
Max loss
Sym Buy Fri Mon Tue Wed Thu Fri Beg End
YHOO JL22 +3.7 19 +3.6 18 +3.7 18 +3.6 18 +3.4 18 +3.0 18 +2.0 +2.2
TNA ¹ SE11 -0.3 10 -0.5 10 -0.5 10 -0.5 10 -0.5 0 -0.5 -0.5
SRTY ¹ SE12 -0.1 11 +0.2 11 +0.2 11 +0.2 11 +0.2 0 -0.4 -0.4
SRTY ² SE16 -0.0 11 -0.2 11 -0.2 11 -0.2 11 -0.3 -0.3
URTY SE17 -0.1 14 +0.1 14 -0.3 14 -0.5 -0.7
TNA ² SE18 -0.0 11 -0.7 21 -0.5 -1.0
SRTY ³ SE19 -0.1 11 -0.6 -0.6
IWM   +0.2   -0.9   -0.6   -0.4   +0.2   -1.0
me -6.2 -6.2 -6.1 -6.5 -6.4 -8.1
floor -8.3 -7.7 -7.6 -8.5 -9.0 -10.0

YHOO: Doing reasonably well.  Might sell next week if this downtrend continues.  Perhaps Alibaba’s IPO was the “top tick” before the crash?

URTY: Robot tried another “FOMC play”.  Once again, the market was not happy with the FOMC results.

TNA ²: Ouch!  Robot bought a second tranche just before the market tanked.  This does not look good.  I expect a loss next week.

Stock-trading robot

Ticker
Symbol
Buy dateBuy priceSell dateSell priceAcct Profit
ModelActualMAModelActual M A M A
YHOO JL 22 09:30 $33.48 $33.56 (Not yet)
UWM SE 11 09:30 (Skipped) $83.97 SE 16 09:30 $81.94 -0.35% +0.00%
TNA ¹ SE 11 15:00 $76.66 SE 15 10:00 09:39 $73.02 $73.00 -0.52%
SRTY ¹ SE 15 11:00 SE 12 14:00 $38.46 $37.57 SE 15 15:00 $38.60 +0.03% +0.25%
SRTY ² SE 16 15:00 $38.35 SE 17 10:00 $37.65 $37.67 -0.20% -0.22%
URTY SE 17 13:00 $84.11 $84.08 (Not yet)
TNA ² SE 18 11:00 $74.00 $74.04 (Not yet)
SE 19 11:00 $73.61 $73.65
SRTY ³ SE 19 14:00 $38.86 (Not yet)

UWM: Would have been a loser.  Good thing I skipped it.

SRTY: Okay, so the wrongly-timed SRTY ¹ was a winner, while the correctly-timed SRTY ² was a loser.  Of course!

Monday, 15 September 2014

Week of 2014 SE 12

IWM fell by 0.9% this week, while my account fell 0.4%.  The loss-floor has risen to -8.3%.

Next week: The FOMC has their meeting, which often causes market uncertainty (will they print A LOT or A WHOLE LOT?).  The ECB will start their TLTRO, which involves printing up money and handing it out to European banks, who will probably use it to buy US stocks and puff up that market.  Oh, and there’s the independence referendum in Scotland; only one recent poll has said that the pro-independence side might win, but that was enough to cause a nosedive in the value of the UK £.

End of week allocations:

16% net equities, 47% cash USD
% gain
size
Max loss
Sym Buy Fri Mon Tue Wed Thu Fri Beg End
YHOO JL22 +2.4 17 +3.3 18 +2.9 18 +3.0 18 +3.1 18 +3.7 19 +0.9 +2.0
URTY AU25 +0.0 14 +0.1 14 -0.4 14 -0.1 14 +0.1 14 -0.4 13 -0.8 -1.5
UWM SE04 +0.0 14 +0.1 1 -0.3 14 -0.2 14 -0.2 14 -0.2 14 -0.7 -0.7
TZA SE09 +0.0 11 -0.2 10 -0.4 10 -0.4 10 -0.6 -0.4
SRTY ¹ SE10 -0.2 10 -0.2 10 -0.2 10 -0.5 -0.5
TNA SE11 -0.0 11 -0.3 10 -0.5 -0.5
SRTY ² SE12 -0.1 11 -0.4 -0.4
IWM   +1.1   +1.2   +0.0   +0.6   +1.3   +0.2
me -5.8 -4.8 -6.0 -6.0 -5.9 -6.2
floor -8.9 -8.6 -8.9 -9.1 -9.3 -8.3

YHOO: Doing great!  But Alibaba’s IPO next Friday might be the news that sets off a “buy the rumour, sell the news” situation with Yahoo.  I will let my robot decide when to sell.  As of now, I have a “guaranteed” +2.0% gain for my account!

UWM, TZA, SRTY, TNA: Whiplash!  Somehow I should find a way to make my system lose less money during these “indecisive” periods.

Stock-trading robot

Ticker
Symbol
Buy dateBuy priceSell dateSell priceAcct Profit
ModelActualMAModelActual M A M A
YHOO JL 22 09:30 $33.48 $33.56 (Not yet)
URTY AU 25 12:00 $87.01 $87.11 SE 12 15:00 $85.01 $84.07 -0.38% -0.41%
UWM ¹ SE 04 SE 04 15:11 $85.29 $85.30 SE 10 09:30 $83.96 $84.02 -0.24% -0.23%
TZA SE 09 15:00 $??.?? $14.67 SE 11 15:00 $??.?? $14.21 -0.34% -0.35%
SRTY ¹ SE 10 10:00 $??.?? $37.99 SE 10 13:00 $??.?? $37.45 -0.14% -0.18%
UWM ² SE 11 09:30 (Skipped) $??.?? (Not yet)
TNA SE 11 15:00 $??.?? $76.66 (Not yet)
SRTY ² (Do not buy) SE 12 14:00 $37.57 (Not yet)

UWM: Sold Wednesday, due to failed retest (price wasn’t up by at least 0.5% after three days).  But conditions were still favourable so the robot generated a “Buy” signal for Thursday, which I decided to skip.

SRTY ²: Due to quote-glitch from Schwab, the robot bought this even though the corrected data at end-of-day says that STDEV(5) wasn’t actually above its EMA(12).  I have added an override rule to the robot so it realizes that I currently own this and need to select an exit-time.

Channel-based trading model

I tried creating a new trading model, but I don’t think it works well enough to use.
  • Buy when price > high of last donchian-H hours, on the hour but not at 10am or 4pm.
  • Sell when price < low of last donchian-L hours.  Update this stop every hour.

Results were okay, but then I tried using my PEAKFREQ(140,8) indicator to choose the Donchian-channel widths.

PEAKFREQdonchian-Hdonchian-LResults 2003‥2011Results 2012‥2013
5155546.1%6.7%
666110
713118
820121
91062
101831
111449
121346
13929
14434
15450
16556
single1412126.3%12.4%

This is not right.  Note that the donchian-H and donchian-L parameters do not progress smoothly as PEAKFREQ is varied.  This implies that the fundamental relationship (if there is one) is getting swamped by random glitches where certain “lucky” values for the parameters happen to have done much better in the past than they will in the future.  I had hoped that using nine years of data for the back-test would reduce this effect, but apparently it’s not enough.

Also note that tuning the parameters by PEAKFREQ nearly doubles the gains for the back-test period, but cuts gains in half for the forward-test period.  Based on these results, I am not justified in making any prediction as to how this algorithm would perform if placed into production.  Oh well.

Friday, 5 September 2014

Week of 2014 SE 04

IWM fell by 0.1% this week, while my account rose 0.4%.  The loss-floor has fallen to -8.9%.

US markets were closed on Monday for Labor Day.

Financial news: Friday’s Non-Farm Payroll report was bad: only 142,000 American jobs were created last month, vs. 220,000 expected.  U6 unemployment is now officially 12.2%, about half its value at the height of the Great Depression.  Sy Harding’s usual rule is that a bad NFP causes the market to drop for three days.  Richard Chappell expects a 1% decline from recent highs.

End of week allocations:

87% equities, 44% cash USD
% gain
size
Max loss
Sym Buy Fri Mon Tue Wed Thu Fri Beg End
YHOO JL22 +2.0 17 +2.3 17 +2.1 17 +2.3 17 +2.4 17 +0.5 +0.9
URTY AU25 +0.1 14 +0.3 14 +0.1 14 -0.1 14 +0.0 14 -0.6 -0.8
UWM SE04 -0.1 14 +0.0 14 -0.8 -0.7
IWM   +1.2      +1.8   +1.1   +0.7   +1.1
me -6.2 -5.7 -6.1 -6.2 -5.8
floor -8.4 -8.2 -8.2 -8.9 -8.9

YHOO: Continuing to do very well!

Stock-trading robot

Ticker
Symbol
Buy dateBuy priceSell dateSell priceAcct Profit
ModelActualMAModelActual M A M A
YHOO JL 22 09:30 $33.48 $33.56 (Not yet)
URTY AU 25 12:00 $87.01 $87.11 (Not yet)
UWM SE 04 SE 04 15:11 $85.29 $85.30 (Not yet)

UWM: Buy-signal for Tuesday; limit-price not reached.  Buy-signal for Thursday was successful.

ATML: “Buy” signals for Tuesday, Wednesday, and Thursday; limits not reached.

TRIX-based trading model: review of results

The TRIX/CHANDELIER-based trading model was put into production on 2013 JL 15, over a year ago.  There were some ramp-up issues, so let’s review the actual gains during the twelve months from August to July, compared with the model gains from that period, from 2012, and the annual averages from 2003‥2011:

Ticker ’13 AU‥’14 JL Average year
actual model 2012 ’03‥’11
ATML +2.4% +0.4% +3.4% +3.3%
FNSR -1.7% -5.4% +5.6% +5.5%
YHOO +0.0% +0.6% +3.3% +2.2%
UWM -1.4% -0.4% +1.3% +2.5%
AGQ* +2.7% +1.0% +6.9% +6.8%
FRED -0.8% +0.4% -3.3% +3.4%
URTY -2.1% -0.9% +4.2% +6.5%
Total -0.9% -4.3% +21.4% +30.2%

*: AGQ starts in 2007, so the long-term average is based on only five years instead of nine.

The overall trend we see here is that 2012 is either equivalent to the preceding nine years or worse, while the 2013/2014 period is markedly worse on nearly every ticker.  So much for the power of forward testing!  I think the basic problem is that “swing trading” has not been effective these past two years.  Some years are like that; you have to hold on until your approach starts working again.