All posts by admin

RSI Everything (Part 1)

A long time ago a friend of mine worked for a professional sports franchise.  However, as low man on the totem pole he didn’t make a lot of money.  So to supplement things he got a job at a small local television station as the Producer for a show that featured local bowling on Sunday mornings.  No, seriously.  And he wasn’t the only guy trying to “make it.”  The guy who was hired as the actual on air broadcaster had aspirations too.  So he would routinely treat each frame as something akin to the ninth inning of the seventh game of the World Series.  As a result he sometimes went a little overboard on the hyperbole.  To wit:  One day when the “local legend” – a woman who had won every local bowling title and award that was ever created – stepped up to the line with her ball in hand, the broadcaster intoned for all (roughly 12) viewers to hear, “Anything that you can do with a bowling ball, this woman has done!”
My poor friend almost peed his pants.
Anyway, the only reason I bring this up is that as a still non-recovering “numbers geek” (“Hi, my name is Jay”), I sometimes feel like “anything you can do with a couple of numbers, I’ve done it.”  One case in point is the simple RSI (Relative Strength Index) indicator. Created by Welles Wilder I’m guessing 40 some odd years ago, this simple oscillator has helped to trigger roughly a bazillion trades.  But some of us are not content to leave well enough alone.  And so for better or worse we torture the darn thing until it is “different” (and hopefully – though not necessarily – better, for “better” is in the eye of the beholder).  So (True Confession Time) I have an indicator I follow that I’ve called RSI Everything (for reasons that will become painfully obvious very soon), which combines four, um, variations, on the venerable RSI.  i will cover the first two in this article .
There are many ways to calculate these things but in this article I will be including code from AIQ Expert Design Studio.  Not much in the way of “rocket science” so the indicators can be easily adapted by those of you using one of the roughly twelve bazillion other charting packages available these days.
Measure #1. RSIAll
Figure 1 displays ticker AAPL with the 2-day, 3-day and 4-day RSI indicators drawn below the bar chart with the values for each appear in the lower right hand corner. 1
Figure 1 – AAPL with 2-day, 3-day and 4-day RSI indicators (Courtesy: AIQ TradingExpert Pro)
In a nutshell, the 2-day is more sensitive than the 3-day and the 3-day is more sensitive than the 4-day.  Most traders pick their “favorite” day window and stick with it.  Nothing wrong with that.  But RSIAll is calculated simply by taking the latest value for the 2-day, 3-day and 4-day RSI and dividing by three.  This appears in Figure 2.2
Figure 2 – AAPL with RSIAll indicator (Courtesy: AIQ TradingExpert Pro)
In a nutshell, low RSIAll readings within an uptrend are considered “bullish”, while high RSIAll reading within a downtrend are considered “bearish.”  Of course, the trick is defining how low is “low” and how high is “high”.  As with most indicators there are no “magic numbers.”  That being said, 15 on the oversold side and 85 on the overbought side are probably a good place to start.
The AIQ Code for RSIAll is as follows:
Define days2 3.
U2 is [close]-val([close],1).
D2 is val([close],1)-[close].
AvgU2 is ExpAvg(iff(U2>0,U2,0),days2).
AvgD2 is ExpAvg(iff(D2>=0,D2,0),days2).
RSI2 is 100-(100/(1+(AvgU2/AvgD2))).
Define days3 5.
U3 is [close]-val([close],1).
D3 is val([close],1)-[close].
AvgU3 is ExpAvg(iff(U3>0,U3,0),days3).
AvgD3 is ExpAvg(iff(D3>=0,D3,0),days3).
RSI3 is 100-(100/(1+(AvgU3/AvgD3))).
Define days4 7.
U4 is [close]-val([close],1).
D4 is val([close],1)-[close].
AvgU4 is ExpAvg(iff(U4>0,U4,0),days4).
AvgD4 is ExpAvg(iff(D4>=0,D4,0),days4).
RSI4 is 100-(100/(1+(AvgU4/AvgD4))).
RSIAll is (RSI2+RSI3+RSI4)/3.
Measure #2. RSIROC
OK, for the record RSIROC is an abbreviation of another indicator I concocted with an even more arcane name titled RSIROCExpAve.  The code (and a relatively weak attempt at an explanation in English) follows below:
ThreeDayROCRSI is (RSI3-valresult(RSI3,3)).
RSIPlusROCRSI is (RSI3-50)+ThreeDayROCRSI.
RSIROC is (expavg(RSIPlusROCRSI, 2)).
So what is that all about?  This indicator basically builds in the 3-change in the RSI indicator itself to measure the momentum of RSI.  OK, here goes:
Line 1 subtracts the 3-day RSI value from 3 days ago from today’s 3-day RSI value.
Line 2 subtracts 50 points from today’s 3-day RSI and then adds in the value calculated above.
Line 3 creates a two-day exponential moving average of values calculated each day in Line 2 (i.e., yesterday’s RSIROC value is multiplied by 0.6667 and today’s RSIPlusROCRSI value is multiplied by 0.3333 and the two values are added together to create today’s RSIROC value.
Example:
-Yesterday’s RSIROC value was 45
-Today’s 3-day RSI is 30
-3-day value three days go was 60 then:
ThreeDayROCRSI = (30-60) or -30
RSIPlusROCRSI is (30-50) + (-30) = -50
RSIROCExpAve is ((45 * 0.6667) + (-50 * 0.3333) = 13.33
Ticker GOOG with the RSIROC indicator plotted appears in Figure 3. 3
Figure 3 – Ticker GOOG with indicator RSIROC (Courtesy: AIQ TradingExpert Pro)
In a nutshell, the higher above 0 the RSIROC reading the more overbought the security in question, and the lower below 0 the RSIROC reading the more oversold the security in question.  Readings of +60 or more and -60 or less seem like reasonable areas of “extreme” readings.  The most likely use for this indicator is to look for low readings when price is above the 200-day moving average (as a potential buying opportunity) and for high trading when price is below the 200-day moving average (as a potential shorting opportunity).
n RSI Everything Part 2 I will detail the other two parts of the indicator and how the pieces go together.
In the meantime, don’t try anything crazy with a bowling ball.
Jay Kaeppel  
Chief Market Analyst at JayOnTheMarkets.com and AIQ TradingExpert Pro (http://www.aiq.com) client
http://jayonthemarkets.com/
Jay has published four books on futures, option and stock trading. He was Head Trader for a CTA from 1995 through 2003. As a computer programmer, he co-developed trading software that was voted “Best Option Trading System” six consecutive years by readers of Technical Analysis of Stocks and Commodities magazine. A featured speaker and instructor at live and on-line trading seminars, he has authored over 30 articles in Technical Analysis of Stocks and Commodities magazine, Active Trader magazine, Futures & Options magazine and on-line at www.Investopedia.com.

Another VIX(Like) Oversold Indicator

A while back I wrote about some “VIX-like” indicators that can be applied to stocks, ETF, futures, etc.  Well, today let’s add one more to the mix.  This one – which for (clear) lack of a better name –I refer to as VixRSI14x (Note to myself: you really have to come up with a better way of naming these things).
It combines a “vix-like” indicator with the standard 14-day RSI.  Also, whereas VIX moves higher as price declines, I flip this one on its head to create negative indicator readings align with price declines and oversold conditions.
The Calculations
A word of warning: if indicator calculations make your head hurt you might want to skip this section and go down to the charts below. The VIXRSI14x indicator combines the standard 14-day Welles Wilder RSI with Larry Williams VixFix indicator as follows.
A = Highest close in last 22 trading days
B = A – today’s low
C = (((B – A) / A) * 100) + 50
VixFix = C
The 14-day RSI is calculated using the standard Wilder RSI formula found in most charting programs (AIQ TradingExpert code is found below)
VixRSI14 is calculated as follows:
D = 3-day exponential average of Daily VixFix readings
E = 3-day exponential average of daily 14-day RSI readings
F =D/E
VixRSI14 = F
This indicator as designed will typically rise in value as prices decline.  In order to create an overbought/.oversold indicator that moves in line with price, the value is inverted as follows:
VixRSI14x = ((1/VixRSI14)*100)-100.
(Hey I warned you to skip ahead to the charts)
The following is code or AIQ TradingExpert Design Studio:
!VixFix calculations
hivalclose is hival([close],22).
vixfix is (((hivalclose-[low])/hivalclose)*100)+50.
!14-day Rsi calculations
Define days14 27.
U14 is [close]-val([close],1).
D14 is val([close],1)-[close].
AvgU14 is ExpAvg(iff(U14>0,U14,0),days14).
AvgD14 is ExpAvg(iff(D14>=0,D14,0),days14).
RSI14 is 100-(100/(1+(AvgU14/AvgD14))).
VixRSI14 is expavg(vixfix,3)/expavg(RSI14,3).
VixRSI14x is ((1/VixRSI14)*100)-100.
The Resulting Indicator
Now I would like to claim that VixRSI14x is a highly accurate timing tool that picks tops and bottoms with uncanny accuracy.  And the truth is, at times it sorta does.  On the other side of the coin one could probably make an argument that this is just one more “Overbought/Oversold” indicator.  I will leave the more industrious to draw their own conclusions.
A few “suggestions” for highlighting potential bullish opportunities:
1) Consider looking for situations when SPY is oversold or bouncing off of a low as a catalyst to look for buy signals among the stocks and/or ETFs you follow (One possibility is to look for VixRSI14x to drop below -16 and then turn up).
2) When looking at individual stocks and ETFs look for upside reversals from -32 or below.
3) Look for signals on stocks/ETF that are above their 200-day moving averages.
4) Consider taking profits on the first good “pop” and letting the rest ride.
A Few Charts
On 2/2/15 the VixRSI14x indicator for ticker SPY reversed to the upside after dropping below-16. See Figure 1.
1Figure 1 – SPY with -16 or lower oversold VixRSI14x signals (Courtesy: AIQ TradingExpert)
A sampling of stocks that met the criteria listed above on 2/2/15 appears in Figures 2 through 5 below.
2Figure 2 – Ticker UNTD (Courtesy: AIQ TradingExpert)
3Figure 3 – Ticker VRSN (Courtesy: AIQ TradingExpert)
4Figure 4 – Ticker WDC (Courtesy: AIQ TradingExpert)
5Figure 5 – Ticker YHOO; no upside follow through from multiple signals  (Courtesy: AIQ TradingExpert)
Some of these experienced an immediate “pop”, while others – most notably YHOO – have gone nowhere.  This is fairly typical.  As with most things in trading, some signals work while others do not. As with any kind of oversold indicator there is never any guarantee that every signal for every stock will be followed by rainbows and unicorns.  This suggests that industrious traders might consider looking for some sort of “confirming” indicator to highlight trades that they believe have the best potential for moving higher.
Summary
So is “VixRSI14x” the “next big thing”, or simply just another oscillator that rises when price rises and falls when price falls?  My experience suggest that it is “someplace in between.”
My experience also suggests that that  is not necessarily a bad place to be.
Jay Kaeppel  
Chief Market Analyst at JayOnTheMarkets.com and AIQ TradingExpert Pro (http://www.aiq.com) client
http://jayonthemarkets.com/
Jay has published four books on futures, option and stock trading. He was Head Trader for a CTA from 1995 through 2003. As a computer programmer, he co-developed trading software that was voted “Best Option Trading System” six consecutive years by readers of Technical Analysis of Stocks and Commodities magazine. A featured speaker and instructor at live and on-line trading seminars, he has authored over 30 articles in Technical Analysis of Stocks and Commodities magazine, Active Trader magazine, Futures & Options magazine and on-line at www.Investopedia.com.

Global market breakout starts

February 22, 2015: Global market breakout starts
This post from Donald Dony (AIQ seminar speaker). 
After over six months of
concern that the 6-year old world bull market was coming to an end, a
collective upside breakout has developed.

Lead,
first by the U.S. markets, and then one-by-one, global equity markets started
to follow and advance.

Japan’s Nikkei, one of the key world indexes, broke to a new high in Q4 and
then advanced to a new 10-year high in February.

The collective STOXX Europe 600 surged to a new post 2009 level in Q1 and is
set to retest the old 2007 high of 400.31 in the weeks to come.

Even commodity-laden indexes like the Australia’s All Ordinaries (ASX) and
Canada’s TSX, are breaking out and advancing to new levels.

Numerous other key world indexes such as India’s BSE, Hong Kong’s Hang Seng and
China’s Shanghai are also following in the upward trend.

Bottom line: We see this positive outlook continuing into Q2 and believe many
world indexes will achieve new highs in 2015.

Investment approach: We suggest investors remain long in 2015 and weight
portfolios toward non-commodity industry groups and indexes. The lower chart
highlights our rationale. The S&P 500 has outperformed the Commodity
Research Bureau Index since 2012.

Donald W. Dony, FCSI, CFTe, MFTA
D. W. Dony and Associates Inc.
4973 Old West Saanich Rd.
Victoria, BC  V9E 2B2
Ph. 250-479-9463
Fax. 250-479-9417

www.technicalspeculator.com

Detecting Flags In Intraday Charts

The AIQ code based on Markos Katsanos’ article in Stocks & Commodities magazine, “Detecting Flags In Intraday Charts,” is provided at www.TradersEdgeSystems.com/traderstips.htm, and is also shown here:

!DETECTING FLAGS IN INTRADAY CHARTS

!Author: Markos Katsanos, TASC December 2014

!Coded by: Richard Denning 10/18/14



!USER DEFINED FUNCTIONS:

C is [close].

Name is description().



!COMPLETED FLAG PATTERN:

FLAG is [Flag].

FLAG_breakoutup if FLAG > 0.

FLAG_breakoutdn if FLAG < 0.



!EMERGING FLAG PATTERN:

e_FLAG is [eFLAG].

e_FLAGup if e_FLAG > 0.

e_FLAGdn if e_FLAG < 0.



!REPORTS TO LIST ALL FLAG PATTERS:

ShowAllCompleted if C>0 and FLAG <> 0.

ShowAllEmerging if C>0 and e_FLAG <>0.

The AIQ program has a chart-pattern recognition module that operates only in daily mode. I am providing code to find both completed flag patterns and also emerging flag patterns.
In Figure 10, I show a chart of G-III Apparel Group Ltd., which shows a flag pattern completed on June 25, 2014 (green up arrow), when the price broke above the down-sloping flag top. Although the volume was above average on the breakout, the follow through was lacking.
Sample Chart

FIGURE 10: AIQ. This sample chart shows G-III Apparel Group Ltd. (GIII) with a completed flag pattern (indicated by the green up arrow).
Note that I did not code exits for the pattern, as the built-in exits can be used to experiment with the flag pattern entry. Note also that the AIQ version of flags does not match exactly the intraday flags that are defined by Katsanos in his article.
—Richard Denning
info@TradersEdgeSystems.com
for AIQ Systems

It “Bean” a Good Time of Year

In case you were not aware of it, I have a “thing” for seasonal trends.  Certain commodities are especially well known for exhibiting “seasonal” – or “cyclical”, if you prefer – trends.  I’ve talked a bit recently about crude oil and energies.
Another market that fits the bill is Soybeans.  Specifically beans have a tendency to show strength between early February and mid-June.
The Test
Even more specifically we will look at soybean performance as follows:
*From the close on the 8th trading day of February through the close on the 15th trading day of June since 1978.
Technical Note: The data that I am using or this test is based on a “continuous” contract which strings together the “front month” (i.e., most heavily traded) over time.  Essentially this data base simply captures the dollar value of the daily price change for the “front month” soybean futures contract and strings them together.
Also, commodity pricing and contract values can cause one to have a headache. To wit: Soybean futures contract are priced in dollar and sense for 50,000 bushels of soybeans.  So each $0.01 (one cent) move in the price of a bean contract is worth $50.  If soybeans advance from $8.00 a bushel to $9.00 a bushel, then the value of the contract increases by $5,000 ($50 a cent x 100 cents). Is this commodity trading stuff exciting, or what?
Figure 1 displays the July 2014 Soybean contract.
beans 
Figure 1 – July 2014 Soybeans
The good news is that if a trader had bought soybeans in February 2014 and sold them in June 2014 he would have made a nice profit.  The bad news – as you can see on the far right hand side of the chart starting in around late May – is that he made a lot more money before giving a good chunk back in early July.
And this raises an important point: No one is suggesting that this be used as a mechanical approach to trading.  Well, OK, not unless you can answer “Yes” to the following three questions:
  1. Are you already ridiculously wealthy?
  2. Do you understand the meaning of the phrase “small lot size”?
  3. Do you know how to place a stop-loss order?
If you can answer “Yes” to the three questions above you are free to trade this method mechanically (although for the record I am not making a recommendation here, just highlighting an “interesting” trend).
Everybody else – well at least anyone else who is inclined to and willing to trade soybean futures – might consider the idea of looking for buying opportunities within this favorable time frame, rather than simply buying and holding.
Still, to get the idea of how useful this information might be let’s go back to our mechanical approach and consider…..
The Results
Figure 2 displays the (hypothetical) equity curve generated by holding a long position of 1 contract of soybeans during the seasonally favorable February into June period since 1978.
beans1
Figure 2 – Equity curve of long 1 soybean contract during seasonally favorable period
Figure 3 displays the year-by-year results.  I need to repeat here that these numbers were generated by buying March soybeans, then selling that contract in late February and buying the May contract and then selling the May contract in late April and buying the July contract (no seriously, is this commodity trading stuff exciting, or what?).
So I make no claim that these numbers are exactly what a trader would have experienced in real-time trading.  Also, there is no slippage or commissions deducted.  The purpose of this exercise is not so much to highlight the “raw dollars” but rather the fairly consistent persistence of the favorable trend within the annual time frame.
End of Period (YYMMDD) $+(-) Cumulative
0
780621 $5,813 $5,813
790621 $4,438 $10,250
800620 ($1,375) $8,875
810619 ($1,288) $7,588
820621 $119 $7,706
830621 $769 $8,475
840621 $5,150 $13,625
850621 ($63) $13,563
860620 $656 $14,219
870619 $3,600 $17,819
880621 $21,744 $39,563
890621 $306 $39,869
900621 $1,994 $41,863
910621 ($244) $41,619
920619 $1,713 $43,331
930621 $2,650 $45,981
940621 ($75) $45,906
950621 $2,469 $48,375
960621 $3,781 $52,156
970620 $3,106 $55,263
980619 ($1,350) $53,913
990621 ($1,281) $52,631
621 ($238) $52,394
10621 $463 $52,856
20621 $3,006 $55,863
30620 $3,294 $59,156
40622 $2,544 $61,700
50621 $10,919 $72,619
60621 $363 $72,981
70621 $3,856 $76,838
80620 $11,200 $88,038
90619 $10,050 $98,088
100621 $1,288 $99,375
110621 ($4,163) $95,213
120621 $10,475 $105,688
130621 ($125) $105,563
140620 $4,638 $110,200
Figure 3 – Soybeans (approximate) Year-by-Year during Feb-June seasonally favorable period (1978-2015); Includes roll overs from one contract month to another along the way
For the record, during the seasonally favorable period for soybeans:
*Up 27 times (73% of the time)
*Down 10 times (27% of the time)
*Average gain during Up years = +$4,459
*Average loss during Down years = -$1,020
*Two biggest Up years = +$21,744 (1988) and +11,200 (2008)
*Two biggest Down years = -$4,162 (2011) and -$1,375 (1980)
In a nutshell, this period has seen beans rise 2.7 times more often than they decline and the average win/loss ratio is almost 4.4-to-1.  These are values that we highly trained quantitative analyst types often refer to – using our highly technical quantitative jargon – as “pretty darn good.”
For the record the favorable period for beans in 2015 already started at the close of trading on 2/11/15.  During the first two days of this time frame March beans were up 12.75 cents (+$637.50). May beans were up 14 cents ($700) and July beans were up 14.25 cents ($712.50).
So far so good?  OK, I have to admit its a little early for that.
Summary
So should everyone be rushing to buy soybeans before the “train leaves the station.”  Surely not.  First off, let’s be honest – most people will never trade soybeans futures, nor should they. Still, as those who like to drop clichés every once in awhile to try to make themselves look smarter than they actually are (“Hi, my name is Jay”) just remember that “Knowledge is Power.”  For the record, at this point you now know more about how to make money trading soybeans than a lot of the people who currently do trade them.
One last note, although it is very thinly traded there is an ETF that tracks the price of Soybeans (ticker SOYB).  Those not inclined to trade futures contracts might take a look at buying shares of this ETF (did I mention that it is very thinly traded?)