Professional Documents
Culture Documents
Strategies
Garrison W. Greenwood and Richard Tymerski
Abstract— Investors are always looking for good stock market Computational intelligence (CI) offers a variety of useful
trading strategies to maximize their profit. Under the technical techniques for constructing trading rules via technical ap-
school of thought trading rules are developed by studying proaches. For example, Allen and Karjalainen [2] created
historical market data to find trends that investors can exploit.
These market trends tend to appear when certain features trading rules using genetic programming. The goal was to
(narrow range, DOJI, etc.) appear in the historical data. develop a function that returns either a ’buy’ or ’sell’ signal.
Unfortunately, these features often appear only in partial form, (Decisions to ’hold’ a stock were not implemented.) The
which makes trend analysis challenging. difference between an excess return1 and a simple buy-and-
In the paper we co-evolve fuzzy trading rules from market hold strategy2 over a finite training period measures the
trend features. We show how fuzzy membership functions
naturally handle partial form features in historical data. The co- fitness of a rule. The authors claim their evolved rules had
evolutionary process is formulated as a zero-sum, competitive reduced trading volatility, but their rules do not lead to higher
game to match how trading strategies are evaluated by broker- absolute returns than a buy-and-hold strategy. Not to be
age firms. Our experimental results indicate the co-evolutionary deterred, the authors claim some investors may still find their
process creates trading rule-bases that produce positive returns rule-base worthwhile.
when evaluated using actual stock market data.
Potvin et. al [3] also tried genetic programming to evolve
I. I NTRODUCTION investment rules. Their method was computationally ex-
pensive and tended to converge prematurely (no reported
The recent emergence of online trading has made the improvements after 50 generations). They too showed poorer
stock market accessible to small investors. Brokerage firms performance than a buy-and-hold approach, especially in a
work on behalf of investors to purchase quantities of a rising market. The authors claim their trading rules were
single stock. (Investors pay a small fee for every transaction.) “generally beneficial”, but only when the market is stable
Some discount brokerage firms provide little or no investment or falling.
advice, which means it is up to the small investor to come Dourra and Siy [4] used fuzzy logic to create a trading
up with their own investment strategies. Other brokerage strategy. The system inputs were momentum indicators, such
firms do advise investors when to buy or sell stock, but as the rate of change of stock prices over a defined period.
the underlying strategy is proprietary and for that reason is Gaussian membership functions and a fuzzy rule-base, hand-
not disclosed to outsiders. Strategies are continually refined crafted from expert’s knowledge completed the system. A
because markets can be volatile and good strategies that pro- Mamdani fuzzy implication method output a single value
duce high returns tend to attract more investment dollars— between 0 (strong sell) and 100 (strong buy). Their fuzzy
and higher commissions for the brokers! system was evaluated on 3 years of stock prices from
There are two schools of thought on developing investment several different companies. The investment returns, based
strategies. In the fundamental approach decisions about on buy or sell recommendations from the fuzzy system,
buying, selling or holding a company’s stock arise from a were exceptionally high—some yielding over 250% returns!
careful analysis of the the company’s books. On the other However, those returns should come as no real surprise since
hand, in the technical approach studying a company’s past the membership functions were deterministically adjusted to
trading activity can help predict future stock prices. In this fit the training data. Consequently, the membership functions
paper we focus on the technical approach. used for the Intel Corporation stock were different from
For decades people have proposed various technical trad- those used for the General Motors stock. Moreover, the rule
ing rules but the majority of this literature has found that, for antecedents were very sophisticated—some involved both
the most part, the investment rules just don’t work. Indeed, conjunctions and disjunctions of fuzzy variables—but the
one researcher [1] even went so far as to dismiss technical authors did not say how those rules were derived.
investment rule methods entirely! But the advent of more Lam [5] also constructed a fuzzy trading rule-base, but
powerful and inexpensive computers has promoted new and the rule-base was evolved with a genetic algorithm that
powerful data mining methods that can search high frequency selected a subset of rules from a set of 36 pre-defined fuzzy
market data for trading activity patterns. The reported demise
of the technical school of thought was clearly premature. 1 A risk-free return is the return of an asset, such as T-bills, with no
risk whatsoever. An excess return is the return received over and above a
G. Greenwood and R. Tymerski are both with the Electrical & Computer risk-free return.
Engineering Department at Portland State University, Portland, OR 97207– 2 In this strategy the investor buys a stock and then holds it for a long
0751 USA (email: greenwood,tymerski@ece.pdx.edu) time period, hoping to outlast any market fluctuations.
The formula for this membership function is argument for the NR4 membership functions which returns
4 Certain real parameter values must also be chosen. For example, the
0
x < − 21 percentage threshold input value is needed for the DOJI feature.
µ(x) = 2(x + 0.5) 1
−2 ≤ x < 0 (7) 5 There would be 2N total rules if both up-trend and down-trend days are
1 x≥0 predicted.
60 new days. The overlaps help mitigate market volatility. OVER A 150 TRADING PERIOD WITH AN INITIAL $400 BANK BALANCE .
Fig. 4. Typical trading behavior for the best fuzzy trading rule sets over a
90 trading period. Shares were bought whenever the desirability exceeded Fig. 5. Bank account balances for the top α firm strategy and the simple
0.8. investment strategy over a 90 day period of test market data starting at the
1200th trading day. Both accounts started with a $400 balance.
Table II shows the bank account balances for the top five
and bottom five trading strategies after completing the 150 Some interesting observations emerge from a close exam-
days of trading using the training database. Notice for both ination of Figures 5 and 6. The returns from buying and
firms the top five strategies had positive returns whereas selling stock every day indicates how the market is doing.
the bottom five strategies had negative returns. The positive The market data shows high volatility. Notice the market is
returns are considerably higher than the starting balance generally up for several weeks after the 1200th trading day
of $400. Remember the ending bank account balances are but reverses dramatically after the 1400th trading day. More
not due solely to buying stock at a reasonable price. Good to the point, the simple investment strategy had a +15.7%
performing strategies have a higher payoff by taking money return in the first trading period but a -8.2% return during the
out of the bank accounts of poorer performing strategies. second trading period. Clearly buying stock every day is not
This zero-sum game format matches how investors in the a good investment strategy. Conversely, the fuzzy rule-base