Friday 19 December 2014

Week of 2014 DE 12

(This is last week's summary, posted a week late).

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

End of week allocations:

Net 9% equities, 30% silver, 26% cash
% gain
size
Max loss
Sym Buy Fri Mon Tue Wed Thu Fri Beg End
ATML NO24 +1.0 14 +0.7 14 +0.9 14 +0.4 14 +0.7 14 +0.6 14 -0.6 -0.5
YHOO NO26 -0.2 13 -0.5 13 -0.8 13 -0.8 13 -0.8 13 -0.8 0 -1.1 -1.1
UWM NO28 +0.2 14 -0.1 14 +0.3 14 -0.3 14 -0.2 14 -0.5 14 -0.8 -0.9
AGQ DE04 -0.3 13 -0.1 14 +0.9 15 +1.0 15 +0.9 15 +0.9 15 -0.8 -0.1
URTY DE04 +0.3 14 -0.2 14 -0.6 14 -0.6 14 -0.6 14 -0.6 0 -1.6 -0.6
TNA DE08 -0.5 10 -0.5 10 -0.5 10 -0.5 0 -0.5 -0.5
TZA DE09 -0.7 11 -0.1 11 -0.3 11 +0.1 11 -0.8 -0.8
[cash] -0 0 -10 -10 -0 26
IWM   +2.2   +0.9   +2.6   +0.4   +0.8   -0.4
me -5.3 -7.2 -7.0 -7.3 -7.1 -7.2
floor -11.2 -10.6 -10.9 -10.6 -10.6 -10.5

URTY: The stop rose sharply Monday night because IWM fell below its SMA(s).

[cash]: Negative balances for much of the week — I bought TZA with unsettled funds, but kept it until the funds settled.

Stock-trading robot

Ticker
Symbol
Buy dateBuy priceSell dateSell priceAcct Profit
ModelActualMAModelActual M A M A
UWM NO 21 NO 28 12:58 $85.85 $85.72 (Not yet)
ATML NO 24 09:30 11:31 $7.41 $7.58 (Not yet)
YHOO DE 04 09:30 NO 26 09:30 $50.19 $51.56 DE 09 09:30 $48.75 $48.58 -0.40% -0.76%
AGQ DE 04 09:45 $42.03 (Not yet)
URTY DE 03 15:00 DE 04 11:00 $85.90 $86.52 DE 09 09:30 $82.89 $82.55 -0.86% -0.59%
TNA DE 08 11:00 DE 08 11:27 $77.70 $78.24 DE 08 15:00 14:13 $74.08 $74.10 -0.54% -0.53%
SRTY ¹ DE 08 15:00 (Skipped) $34.52 DE 09 13:00 $34.00 -0.16% +0.00%
TZA DE 09 10:00 $13.70 $13.72 (Not yet)
YHOO ² DE 10 (Skipped) $50.33 DE 11 $49.54 -0.24% +0.00%
YHOO ³ DE 12 (Skipped) $50.33 (Not yet)
SRTY ² DE 12 11:00 (Skipped) $35.63 (Not yet)

ATML: There is a “sell” order for Monday’s open.

TNA: Robot purchase failed due to not enough settled cash.  I put in a reduced order using available cash, but shouldn’t have bothered because the market dropped sharply right after that, and kept going until it hit my stop.

SRTY: Failed to buy on Monday due to lack of cash.  Failed to buy on Friday because robot ran out of memory at 10am.  I should add a batch job to reboot the server every morning.  I should try a newer version of Opera or maybe switching to Firefox to reduce memory leakage.

TZA: On Wednesday, IWM’s PPO rose above my cutoff line, but its price was falling so no “sell” order was issued.

YHOO ²: Skipped due to lack of cash.  Would have been a loser.

YHOO ³: Skipped due to lack of interest in bullish moves during what seems to be a downward trend.

Monday 8 December 2014

Week of 2014 DE 05

IWM rose by 0.9% this week, while my account fell 0.5%.  The loss-floor has fallen to -12.2%.

End of week allocations:

97% equities, 26% silver, 10% cash
% gain
size
Max loss
Sym Buy Fri Mon Tue Wed Thu Fri Beg End
[out] 11 20 20 20 20 20
URTY ¹ OC28 +1.3 15 +0.6 15 +0.6 15 +0.6 15 +0.6 0 -0.5 -0.5
ATML NO24 +0.5 13 +0.3 14 +0.6 14 +1.1 14 +1.0 14 +1.0 14 -1.1 -0.6
YHOO NO26 +0.0 13 -0.4 13 -0.3 13 -0.4 13 -0.3 13 -0.2 13 -1.1 -1.1
UWM NO28 -0.0 14 -0.4 14 -0.1 14 +0.1 14 -0.0 14 +0.2 14 -0.8 -0.8
SRTY ¹ DE01 +0.0 11 -0.2 10 -0.2 10 -0.2 10 -0.2 0 -0.8 -0.8
SRTY ² DE02 -0.1 11 -0.2 10 -0.2 10 -0.2 10 -0.6 -0.6
AGQ DE04 -0.0 14 -0.3 13 -0.8 -0.8
URTY ² DE04 +0.0 14 +0.3 14 -1.5 -1.6
[cash] 34 14 3 3 -10 -0
IWM   +1.3   -0.2   +1.0   +1.9   +1.4   +2.2
me -4.8 -6.5 -6.1 -5.6 -5.8 -5.3
floor -10.1 -9.8 -9.8 -9.1 -11.3 -11.2

[out]: Withdrew more money on Monday to put food on the table for my family.

URTY ¹: Sold at low-of-week.  :-(

ATML: Doing great!

[cash]: Negative balance on Thursday — I bought URTY with unsettled funds.

Stock-trading robot

Ticker
Symbol
Buy dateBuy priceSell dateSell priceAcct Profit
ModelActualMAModelActual M A M A
FRED OC 20 (Skipped) $14.31 DE 03 $14.27 -0.07% +0.00%
URTY ¹ OC 28 13:00 12:00 $79.36 $79.03 DE 01 11:00 $83.10 $83.11 +0.70% +0.64%
UWM NO 21 NO 28 12:58 $85.85 $85.72 (Not yet)
ATML NO 24 09:30 11:31 $7.41 $7.58 (Not yet)
YHOO DE 04 09:30 NO 26 09:30 $50.19 $51.56 (Not yet)
TZA DE 01 10:00 (Skipped) $13.71 DE 03 11:00 $13.07 -0.49% +0.00%
SRTY ¹ DE 01 12:00 $35.75 DE 02 10:00 $35.12 $35.10 -0.19% -0.22%
SRTY ² DE 02 13:00 $34.96 DE 03 10:00 $34.27 $34.29 -0.21% -0.23%
AGQ DE 04 09:45 $42.03 (Not yet)
URTY ² DE 03 15:00 DE 04 11:00 $85.90 $86.52 (Not yet)

FRED: Finally got a ”sell” signal.  I saved a small amount of money by skipping this trade.

YHOO: Finally got a ”buy” signal.  Would have saved money if I had entered the trade properly and not bought so soon.

TZA: This trade failed to go through, apparently due to a momentary glitch at Schwab.  I tried manually buying it at the same price later that day, but the limit-order was not reached so I gave up on it.

AGQ: Bought at low of day!  Then it went lower the next day.

URTY ²: Not sure why this trade was late.  It seemed okay at the time, but now the model says I should have bought earlier.

New trading models

I finally finished a project that’s been on hold for months: I have refactored the trading models so the common code is pulled out into a separate file of macros.  This makes it much easier to just code up a new model when I think of something.  Since none of my current short-selling models seem to work very well, I’ve tried a whole bunch of new short models in the last two weeks — but none of them work well enough to use.  Here are two examples:

Momentum model

Short: Before 4pm, when
  • TRIX(50,2) < 0
  • TRIX(14,6) < 0
  • hourly close < SMA(200)-0.8*STDDEV(200)
  • This hour’s True Range > 7*ATR(15)
Cover: Before 4pm, when
  • TRIX(14,6) > 0
Stop: Updated at 4pm, use the lesser of
  • EMA(25)
  • Low_since_purchase plus 4*ATR(15)

Basically, we short when slow-TRIX is favorable, price is below the lower Bollinger band, and has just dropped by a significant amount.  We cover when quick-TRIX is unfavorable.  There is a fixed stop at EMA and a trailing stop that’s based on the Average True Range rather than a fixed percentage.

Results using TWM (2× leveraged inverse ETF):
2002‥2007+1.1%
2008+1.8%
2009-0.1%
2010-1.1%
2011+0.5%
2012-0.4%
2013-0.1%

This just isn’t very impressive.  In order to avoid losing money during 2002‥2007, I can make only 2% during 2008, when the market dropped 33% in a month!  It dropped 20% in 2011 but I get only 0.5%.

Staircase model

Short: Before 4pm, when
  • Each of the last five hours has had a lower high than the previous one
  • Price is below stop
Stop: Updated every hour, use high from two hours ago.

This model has the problem that Schwab doesn’t give me hourly highs, just high-of-day-so-far, so I would have to use barchart.com whose quotes are delayed by 20 minutes.  So actually implementing this thing would be difficult.

Results using TZA (3× leveraged inverse ETF):
2002‥2007-7.8%
2008+2.3%
2009+0.1%
2010-1.4%
2011-0.8%
2012-1.3%
2013-0.1%

I studied the chart for 2008 while constructing this model — and it does okay for that year only!  It doesn’t manage to make anything in 2011 and its long-term average is a net loss.  Useless.

Friday 28 November 2014

Week of 2014 NO 28

IWM rose by 0.1% this week, while my account rose 0.6% — I beat the market for a change!  The loss-floor has fallen to -10.1%.

World news: OPEC met on Thursday.  The Saudis refused to listen to reason from the other ministers and insisted that they would continue to flood the world’s markets with their petroleum.  The spot price of oil dropped sharply after the announcement and has been falling ever since, down 13% in two days.  Copper, silver, and gold prices are also down — this is “deflation” because a dollar will now buy more of these commodities than it used to.

Holidays: US markets were closed on Thursday for Thanksgiving.  Friday was a half-day.

Seasonality: The week after Thanksgiving tends to be bearish, and we’ve now had four weeks of no-change which also suggest a reversal and a “down” market next week.  But who knows?  The central banksters might decide to run their printing presses overtime to counteract the deflationary impact of the Saudi oil glut.

End of week allocations:

99% equities, 34% cash USD
% gain
size
Max loss
Sym Buy Fri Mon Tue Wed Thu Fri Beg End
URTY OC28 +1.3 15 +1.8 16 +1.8 16 +1.9 16 +1.3 15 -0.7 -0.5
ATML NO24 +0.2 13 +0.2 13 +0.5 13 +0.5 13 -1.4 -1.1
YHOO NO26 +0.1 13 +0.0 13 -1.2 -1.1
UWM NO28 -0.0 14 -0.9 -0.8
IWM   +1.2   +2.4   +2.6   +2.9      +1.3
me -5.4 -4.7 -4.7 -4.1 -4.8
floor -7.3 -8.6 -8.4 -9.4 -10.1

Stock-trading robot

Ticker
Symbol
Buy dateBuy priceSell dateSell priceAcct Profit
ModelActualMAModelActual M A M A
FRED OC 20 (Skipped) $14.31 (Not yet)
URTY OC 28 13:00 12:00 $79.36 $79.03 (Not yet)
UWM NO 21 NO 28 12:58 $85.85 $85.72 (Not yet)
ATML NO 24 09:30 NO 24 11:31 $7.41 $7.58 (Not yet)
YHOO (Do not buy) NO 26 09:30 $51.56 (Not yet)

URTY: TRIX(q) was rising until Friday’s shitstorm.  Now it looks once again like this might sell next week.

UWM: Decided to buy this after all, so I put in a limit-order on Monday, which wasn’t filled until the second-to-last minute on Friday!  Not sure why I set a price of $85.72 instead of $85.85; possibly I was looking at stockcharts.com instead of my own records.  Due to the Saudi oil glut, the profit potential for this trade now looks quite poor unless the banksters start up their printing presses.

ATML: Opened Monday morning at $7.41, but very few shares traded at that price and jumped up to $7.80 within the first minute of the day.  Hours later the price came back down to my limit of $7.58, then it shot back up again over the following minutes.
      My model assumes that I will always get the opening price if it is below the limit-price, but I am a lowly retail customer and I can’t expect to get best execution under adverse market conditions where there are not enough shares to go around.

YHOO: Multiple “Buy” signals this week, but the model’s limit prices were not reached and there is no signal for next Monday.  Meanwhile, the order I put in Tuesday night specified a limit of $53.00 instead of the correct $51.34, so my order went through at Wednesday’s opening price.

Sunday 23 November 2014

Week of 2014 NO 21

IWM fell by 0.2% this week, while my account fell 0.5%.  The loss-floor has risen to -7.3%.

Seasonality: Next week is US Thanksgiving, which tends to be bullish.  But the last three weeks of no-change suggest a reversal and a “down” market next week.  But who knows?  The central banksters might decide to run their printing presses overtime.

End of week allocations:

45% equities, 74% cash USD
% gain
size
Max loss
Sym Buy Fri Mon Tue Wed Thu Fri Beg End
URTY OC28 +1.3 15 +0.9 15 +1.2 15 +0.7 16 +1.2 15 +1.3 15 -0.6 -0.7
UWM ¹ NO14 -0.1 14 -0.3 14 -0.1 14 -0.4 13 -0.5 13 -0.5 13 -1.0 -1.0
IWM   +1.4   +0.7   +1.1   +1.0   +0.0   +1.1
me -4.9 -5.5 -5.1 -5.8 -5.5 -5.4
floor -7.8 -7.7 -7.7 -7.7 -7.3 -7.3

Stock-trading robot

Ticker
Symbol
Buy dateBuy priceSell dateSell priceAcct Profit
ModelActualMAModelActual M A M A
FRED OC 20 (Skipped) $14.31 (Not yet)
URTY OC 28 13:00 12:00 $79.36 $79.03 (Not yet)
UWM ¹ NO 14 09:38 $86.01 NO 20 09:30 $82.97 $82.87 -0.51%
UWM ² NO 21 (Skipped) $85.85 (Not yet)

FRED: Would be +0.5 by now if I had bought it.

URTY: TRIX(s) went negative on Thursday at 3pm, but then TRIX(q) went positive on Friday at 10am, so no sale.  This trade is now a short-term hold until TRIX(q) goes negative again, which could happen on Monday.  Conditions still look favorable for getting out of this with a small profit.

UWM ¹: Did not go up after four days, so I got a “Sell” signal Wednesday night and sold at Thursday’s open — near the low of the week!

UWM ²: Indicators were still on a “Buy” signal Thursday night but I decided not to put in the order — which would have been filled Friday afternoon.  I suppose I could buy it next week, but the market looks very toppy so I don’t feel like it.

YHOO: “Buy” signals for Monday and Tuesday, but limit prices not reached.

ATML: “Buy” signal for Friday, but I didn’t put in the order and it wouldn’t have filled.  Another “buy” signal for next Monday.  I guess I’ll try for that one.

Sunday 16 November 2014

Week of 2014 NO 14

IWM rose by 0.1% again this week, while my account was unchanged.  The loss-floor has fallen to -7.8%.

Holiday: Tuesday was Remembrance Day (= “Veterans Day” in the US).  Markets were open, but trades did not settle.

End of week allocations:

87% equities, 60% cash USD
% gain
size
Max loss
Sym Buy Fri Mon Tue Wed Thu Fri Beg End
URTY OC28 +1.3 15 +1.5 15 +1.6 15 +1.8 16 +1.4 15 +1.3 15 -1.1 -0.6
UWM NO14 -0.1 14 -1.0 -1.0
IWM   +1.3   +1.9   +1.9   +2.4   +1.4   +1.4
me -4.9 -4.7 -4.6 -4.4 -4.8 -4.9
floor -7.2 -7.3 -7.2 -7.0 -6.8 -7.8

Stock-trading robot

Ticker
Symbol
Buy dateBuy priceSell dateSell priceAcct Profit
ModelActualMAModelActual M A M A
FRED OC 20 (Skipped) $14.31 (Not yet)
URTY OC 28 13:00 12:00 $79.36 $79.03 (Not yet)
UWM NO 14 09:38 $86.01 (Not yet)

URTY: The TRIX(s) indicator is flattening out.  This might sell soon.

UWM: Doesn’t look very hopeful, unless the market jumps next week.

YHOO: “Buy” signal for Monday.  Seems quite unlikely that the limit-price will be reached.

Monday 10 November 2014

Week of 2014 NO 07

IWM rose by 0.1% this week, while my account fell 0.7%.  The loss-floor has risen to -7.2%.

End of week allocations:

45% equities, 74% cash USD
% gain
size
Max loss
Sym Buy Fri Mon Tue Wed Thu Fri Beg End
TNA OC16 +5.1 26 +5.0 26 +4.4 26 +4.4 26 +4.4 26 +4.4 0 +1.76 +2.9
URTY OC28 +1.3 15 +1.2 15 +1.0 15 +1.1 15 +1.3 15 +1.3 15 -1.1 -1.1
IWM   +1.2   +1.1   +0.6   +0.8   +1.2   +1.3
me -4.2 -4.3 -5.2 -5.1 -4.9 -4.9
floor -9.9 -8.8 -7.2 -7.2 -7.3 -7.2

Stock-trading robot

Ticker
Symbol
Buy dateBuy priceSell dateSell priceAcct Profit
ModelActualMAModelActual M A M A
FRED OC 20 (Skipped) $14.31 (Not yet)
TNA OC 16 11:00 $59.41 $59.21 NO 04 11:00 $73.46 $73.42 +4.20% 4.17%
OC 20 11:00 $61.09 $61.15
URTY OC 28 13:00 12:00 $79.36 $79.03 (Not yet)

TNA: Excellent!  Bought near the bottom of the roller-coaster and sold near the top.

UWM, YHOO, ATML: “Buy” signals off and on all week, but limit-prices never reached.  All three of these have “buy” signals for Monday.

Monday 3 November 2014

Week of 2014 OC 31

IWM rose by 4.7% this week, while my account rose 3.8%.  The loss-floor has risen to -9.9%.

Over the last nine weeks, my account has risen 2% while IWM is unchanged.  Progress!  But, over the 27 weeks, my account is roughly unchanged while IWM is about 4% higher.  Going nowhere!

Financial news: On Wednesday, the US Fed confirmed that they will stop their $500 billion/year money-printing program to prop up the US stock market.  Then, the Bank of Japan announced a $700 billion/program money-printing program to prop up, among other things, the US stock market!  So it looks like the market has nowhere to go but up because one central bank or another will constantly print money as needed.

End of week allocations:

123% equities, 48% cash USD
% gain
size
Max loss
Sym Buy Fri Mon Tue Wed Thu Fri Beg End
TNA OC16 +1.8 24 +1.7 24 +3.6 25 +3.5 25 +4.1 26 +5.1 26 -0.6 +1.7
URTY ¹  OC23 +0.0 43 -0.8 41 -0.8 -0.8 -0.8 0 -0.8 -0.8
URTY ² OC28 +0.4 15 +0.3 14 +0.7 15 +1.3 15 -0.9 -1.1
IWM   -3.5   -3.6   -0.9   -1.1   -0.2   +1.2
me -8.0 -8.9 -6.5 -6.8 -5.8 -4.2
floor -11.1 -10.1 -10.7 -10.8 -9.9 -8.0

TNA: Doing great!  Max-loss will be going to +2.8 on Monday morning.

URTY ¹: Naturally, the market drops just far enough to hit my stop, then zooms higher.

Stock-trading robot

Ticker
Symbol
Buy dateBuy priceSell dateSell priceAcct Profit
ModelActualMAModelActual M A M A
FRED OC 20 (Skipped) $14.31 (Not yet)
TNA OC 16 11:00 $59.41 $59.21 (Not yet)
OC 20 11:00 $61.09 $61.15
URTY ¹ OC 23 11:00 $75.61 $75.73 OC 27 10:00 9:31 $73.96 $73.94 -0.33% -0.77%
(Nope) OC 24 12:00 $74.89
(Nope) OC 24 14:00 $75.21
URTY ² OC 28 13:00 12:00 $79.36 $79.03 (Not yet)

FRED: Skipped this buy because I thought the market would go down.  But it didn’t.  Would be up +1.2 by now if I had bought it!

UWM: “Buy” signals all week, but I didn’t put in the purchase orders and they wouldn’t have triggered anyway.  Another “buy” signal for Monday, but there’s no way it will trigger so I won’t bother.

ATML: “Buy” signal for Monday.  I think I’ll put in the order for this one.