PureBytes Links
Trading Reference Links
|
Hi All:
For those who are not interested in reading about stock investment, please
delete this message.
Last year or so, I tried to generate interest in taking advantage of a
certain seasonal tendency of the US stock market, namely, stock market
tends to go down sharply towards the last few months of the year, and
accelerates downwards especially towards the end of November to the
beginning of December, due to tax-loss selling pressure, and then after all
the selling is over, the market may (note: "may" only, not ncessarily "all
the time") go up afterwards, especially in January ("January" effect).
There wasn't much interest at the time.
Actually, I bought options instead, and it worked extremely well last year.
Hopefully this year, there will be more interest.
Here's a very simple "taxlossbuy" system, written with the quick editor.
The system is extremely crude, and has not much merit by itself. The point
I want to make is: hopefully those who invest in stocks and are interested
in this area will do some brainstorming, and come up with something more
useful.
I've tested this sytem with lots of optimization, and it works with some
stocks, not all. (You'll have to choose your own stocks.) Some of these
stocks are: IBM, INTC, UTX (If you insist that I'm doing "stock picking",
feel whatever you like. However, as far as I'm concerned, these are just
examples.) I use the last 3 years' data (Jun 1/96 to present). Whether
the sample size is too small is not my concern, nor whether optimization is
bad. That's my style of analysis.
Even if it works with some stocks, it does not mean that it will work this
year. So if you're interested in modifying the system and doing your
research, please proceed with caution.
The idea is like this:
1. Start buying from Oct 1 onwards till Dec 31 of the year.
2. Buy when the stock is in an uptrend (=above a certain longer-term simple
moving average),
and when the stock crosses above a short-term moving average (here, I use
the Kaufmann AMA).
3. Exit when:
a. stock crosses below the longer-term simple moving average;
or
b. you've stayed long enough.
4. There is no provision for multiple entries, or stop-loss or
profit-target. You can,
of course, modify the system so that it may include one or all of the above..
You can't apply the same parameters to all stocks. At least I don't. What
I do is to individually test each stock with lots of optimization.
For the first optimization, I use these parameters:
LEN1 from 1 to 7, increment 1
LEN2 from 20 to 50, increment 10 (note: maximum is 50; if you exceed
that, you need
to change the max number of bars the system will reference)
NDAYS from 20 to 70, increment 10
Later on, I'll refine the optimization pararemeters...
If anyone says this system is a piece of crap, you may be right. I don't
use this system myself. A friend of mine helped me out with a much more
improved system, which I use. The point is: if it's a piece of crap, you
experts out there, why don't you improve on it, and help those members out
there who are genuinely interested in trading stocks and not just reading
posts about jokes, US holidays, murders etc., or whining....
Here's the code:
nput: len1(5),len2(50),ndays(100);
IF (month(date)=10 or month(date)=11 or month(date)=12) and c crosses
above amak(c,len1) and c>average(c,len2) Then Buy on Close;
IF c crosses below average(c,len2) or barssinceentry>=ndays Then ExitLong
on Close;
Regards,
Wong
|