Falcon Invoice Discounting: Unlock Your Business Potential
Buy and Hold Strategy
1. Comparison of the Buy and Hold Strategy
with Trading System of Technical Rules
Enhanced by ANN and GA
Case Study: Tehran Stock Exchange
By:
K.Dehghan Manshadi
Sep 2012
2. Table of Contents
• Definitions
• Goals of the research
• Previous Research
• Study steps
• Technical Rules as the trading system parts
• GA structure used
• ELMAN Network
• Testing Hypothesis Approach
• Key Results
2
4
5
8
10
15
18
20
22
3. Some Definitions
Trading
System
Technical
Analysis
Trading
Policy
Using set of tools and techniques in order to make investment
decisions
Methods and strategies used to forecast future prices based
on different factors e.g. past prices, volume, trends ,..
One turning point is a point in time where one price trend
change into another one. In general there are 3 main trends:
upward, downward, and uniform trends
Turning
Points
The approach that one trader choose in order to do his/her
trades to gain from positions he/she gets in the market
2
4. Table of Contents
• Definitions
• Goals of the research
• Previous Research
• Study steps
• Technical Rules as the trading system parts
• GA structure used
• ELMAN Network
• Testing Hypothesis Approach
• Key Results
2
4
5
8
10
15
18
20
22
5. Research Goals
Resear
ch OBJ.
• Dependency of Parameter
setting to Investors Experience
• Different Signals from different
Trading Rule at the same Time
• Difficulty of changing different
signals from different rules to
one trading decision
Difficulties for using Technical
Analysis
Key Issues
Technical Rules are based on
parameters that if are set properly,
will lead to profitable positions in
market. The main challenge
regarding technical rules are their
different mechanism to produce
trading signals. This will result in
different signals by different rules
at the same time. And this will
mixed the traders.
Building Up the new Intelligent Trading System to omit the
Dependency of investments to Investors experience
4
6. Table of Contents
• Definitions
• Goals of the research
• Previous Research
• Study steps
• Technical Rules as the trading system parts
• GA structure used
• ELMAN Network
• Testing Hypothesis Approach
• Key Results
2
4
5
8
10
15
18
20
22
7. Studies Categorization
Category
one
Studies done to develop scientific
framework for formulating TA
Netcci, Brok,
Murphi, Bollinger,
Achelis, Osle
Category
Two
Category
Three
Category
Four
StudiesCategories
Focus of the Research's Top Researchers
Studies done to investigate the
forecasting power of technical rules
compered to other forecasting tools
Studies done to evaluate the statistical
aspects and quality of the rules outputs.
Studies done to optimize the TA
indicators and rules and developing
new trading tools
Fama, Blume, James,
Chang,
Osler,Alexander
Scatchell
Thomson, Williams,
Bollinger
5
8. Previous Research's
Alejandro
Rodríguez
Researcher Year Subejct Key Take Away
Using ANN to enhance the TA
indices
ANN had a remarkable effect
on TA indices performance
2011
Xiaowei Lin
Using GA to improve the
forecasting parameters in TA
and enhancing the ESN
parameters to reach better
forecasted turning point
The system based on GA
resulted in more profitability
compared with B&H strategy2011
Liu, Chang ,
et.al Building up an efficient
forecasting model in order to
producing trading signals
CBDWNN had a better
performance than other
studied models
2009
Baba,Inoue,
& Yanjun
Establish a system composed
of ANN and GA to forecast
the TOPIX in future market
The composite model had a
good performance in
forecasting the market Index
2002
Kuo, Chen
and Hwang
Intelligent system to support
decision making based on GA
and fuzzy ANN
The new system enables
quantification of qualitative
variables affecting stock price2001
6
9. Table of Contents
• Definitions
• Goals of the research
• Previous Research
• Study steps
• Technical Rules as the trading system parts
• GA structure used
• ELMAN Network
• Testing Hypothesis Approach
• Key Results
2
4
5
8
10
15
18
20
22
10. Study steps and Trading System Architecture
Setting
Parameters by
GA and Turning
Point Diagnoses
Network
Build up and
Training
Testing
Hypothesis and
Assess the
performance
The society and
selected Sample
Society: Stocks in
Tehran 50 Company
Indices
Sample: randomly
chosen 15 stocks
Timeframe: 8 years
2005-2012
Suitable training of
the GA parameters
for each trading rule
to forecast the
trading signals
Changing different
trading signals from
different rules to
one trading signal
with the help of
ELMAN network
Calculating the
portfolio %return by
considering uniform
weighting across all
assets and running
Mann Whitney non-
parametric Test
TradingSystemArch.
8
11. Table of Contents
• Definitions
• Goals of the research
• Previous Research
• Study steps
• Technical Rules as the trading system parts
• GA structure used
• ELMAN Network
• Testing Hypothesis Approach
• Key Results
2
4
5
8
10
15
18
20
22
12. Technical Rules – 1 of 4
Golden
Cross
and Dead
Cross
Simple MA is a popular
technical indicator which
calculates the mean price in a
specified period in which
MA(N) means long-term MA
while MA(n) means short-term
MA. Cross section of these two
represent a trading point.
Approach FigureParameters
Moving
Average
Envelope
MA envelope forms a channel
or zone of commitment around
a MA. If price breaks the upper
band in downtrend, then it is
time to buy; if it breaks through
the lower band in uptrend,
then it is time to sell
MA(n)
MA(N)
10
13. Technical Rules – 2 of 4
Relative
strength
Index
System
RSI ranges from 0 to 100.
Generally, if the RSI rises above
overbought
level (usually 80), it indicates a
selling signal; if it falls below
oversold level (usually 20), it
indicates a buying signal.
Approach FigureParameteres
Rate of
change
Index
The divergence of different
ROCs can indicate possible
reversal of price trend.
Generally, when long-term ROC
reaches a new high while short-
term ROC locates near the
equilibrium line (usually with
the value of 100), the price will
possibly fall down; similarly,
when long-term ROC reaches a
new low while short-term
ROC is near the equilibrium
line, the price may ascend
11
14. Technical Rules – 3 of 4
Stochastic
System
In the up-trend, it tries to
measure when the closing
price would get close to the
lowest price in the given
period; in the down-trend,
it means when the closing
price would get close to the
highest price in the given
period.
The crossover of %K and %D
lines may indicate meaningful
reversal in price trend.
Approach FigureParameters
• C:close price at now
• LL :lowest price in the period
• HH :highest price in the priod
12
15. Technical Rules – 4 of 4
Hammer
and
Hanging
man
Indicates price reversal in the
future
Approach FigureParameters
Dark
Cloud
Cover
Indicates price reversal in the
future
ndC :next day close price
pdO :previous day open price
Piercing
Line
Indicates price reversal in the
future
Engulfing
Pattern
Indicates price reversal in the
future
13
16. Table of Contents
• Definitions
• Goals of the research
• Previous Research
• Study steps
• Technical Rules as the trading system parts
• GA structure used
• ELMAN Network
• Testing Hypothesis Approach
• Key Results
2
4
5
8
10
15
18
20
22
17. GA Structure – Fitness Function
Genetic Structure- Buy Position
If Ti is a buy position, then there are three
states for fitness function:
B) If Sj is a sell signal then we should have
punishment for wrong identification
If the Ti is an expected selling position then
the fitness function will be build in a similar
way.
15
1
2
3
4
5
6
7
8
9
18. GA Steps
GA Structure – Key Steps
Considering following chromosome structure
for each feasible solution
Creating a random society as chromosomes
with above structure
Calculating the fitness function for each
chromosome
In order to generating the next generation,
some current chromosomes are selected as
parents
F (Position) = 2- sp + 2 *(sp -1) * (pos-1) / (n-1)
With the following equations each pare of parents
reproduce new spring:
Offspring 1 = Parent 1 * (rand1) + Parent 2 * (1-rand1)
Offspring = Parent 1 * (rand ) + Parent 2 * (1-rand )
Next step is to produce new generation.
Next generation is composed of the best
current springs and new springs.
Parameters and Specifications of the used GA:
Population: 50
Gen: 300
GGAP: 0.8
Parent selection approach:
Roulette wheel selection
New spring creation approach:
Recombination
Mutation probability: 0.1
Policy to create new generation: keeping 10% of the
best current springs+ keeping 10% of the worst
current springs+ the random springs of the old and
new generation
P1 p2 P3 …… Pn
16
1
3
2
5
4
6
7
19. Table of Contents
• Definitions
• Goals of the research
• Previous Research
• Study steps
• Technical Rules as the trading system parts
• GA structure used
• ELMAN Network
• Testing Hypothesis Approach
• Key Results
2
4
5
8
10
15
18
20
22
20. ELMAN Network
NetworkArchitectureNetworkSpecification
• Recurrent Network with two layer
• The recurrent specification of the network enable detecting time varying
trends – high approximating power
• The main difference of ELMAN with other 2layers networks is to have a
recurrent relationship in layer one – delay in this layer keep the past values
in the network to use them in future.
18
21. Table of Contents
• Definitions
• Goals of the research
• Previous Research
• Study steps
• Technical Rules as the trading system parts
• GA structure used
• ELMAN Network
• Testing Hypothesis Approach
• Key Results
2
4
5
8
10
15
18
20
22
22. Testing Hypothesis Approach
Implica
tions
• To what extend we can rely on historic
data?
• How much data is suitable to train the
network?
• It’s a rule of thumb that using more data
to train the Network don’t result in better
performance all the time
• Price time series nonstationary and
changing behavior
Challenges with the Network Rolling Window Approach
If the time series behavior trough the time is nonstattionary, it means
some characteristics of the series such as noise as well as the forecasting
parameters change trough the time . Therefore using a static model lead
to weak forecast.
P-Value of the Mackinnon statistic in dickey-
Fuller test for most of the stocks is
remarkable(very big) and the unit root
hypothesis is rejected that admit the
nonstationary of the price time series in our
sample
20
23. Table of Contents
• Definitions
• Goals of the research
• Previous Research
• Study steps
• Technical Rules as the trading system parts
• GA structure used
• ELMAN Network
• Testing Hypothesis Approach
• Key Results
2
4
5
8
10
15
18
20
22
24. The system performance in diagnosing turning points
0
20
40
60
80
100
120
140
No. of Correct Signals
No. of incorrect Signals
No. of Zero Signals in Windows
Signals %Frequency
Correct Signals 31%
Zero Signals 61%
Wrong Signals 8%
Implica
tion
The developed trading system have a good performance in diagnosing
trading points
22
25. Comparison between B&H Strategy and the developed Trading System
performance
151%
-10%
24%
48%
77%
49%
17%
26% 29%
44%
-20%
0%
20%
40%
60%
80%
100%
120%
140%
160%
window1 window2 window3 window4 window5
%RETURN
Implica
tion
Both Strategy performance are remarkable. The trading system in
all window had positive performance
23
Buy and Hold
Trading System
26. Testing Hypothesis
Implica
tion
Statistically there is no significant difference between the returns in
B&H strategy and the intelligent Trading System
Non-ParametricTestParametricTest
No significant
difference
between
performance
of the two
strategy
5α
24
27. Conclusions
Suggestionsforfuture
studies
KeyResults • TA like the buy and hold strategy possess the potential for profitability in
Iran Market
• Both Active and Passive Strategies can be profitable in Iran Stock Market
• Artificial Intelligence can help improve the performance of technical
Analysis rules
• The variance of returns in B&H strategy is more than suggested trading
system
• Good performance of the technical analysis can approve the weak
efficiency of the market.
• Comparison of the trading system based on technical rules with other trading
strategies such as momentum and reverse.
• In this study the weights of different assets assumed equal. Rebalancing the
portfolio trough the time can be good option to enhance the trading system
performance.
• Using more technical rules to build the system
• Using other artificial intelligence techniques to set the technical parameters
• Considering other factors like volume of the trades in trading system to
moderate the sensitivity of the system to price changes.
25
Notas do Editor
D. Whitley, “The GENITOR Algorithm and Selection Pressure: Why Rank-Based Allocation of Reproductive Trials is Best”, Proc. ICGA 3, pp. 116-121,Morgan Kaufmann Publishers, 1989.