Engineering Management Graduate Seminar - PowerPoint PPT Presentation

1 / 31
About This Presentation
Title:

Engineering Management Graduate Seminar

Description:

... in stock prices for monetary benefits. Difficult and complex to perform. ... Genetic algorithms may help find the optimum membership values of the fuzzy system. ... – PowerPoint PPT presentation

Number of Views:56
Avg rating:3.0/5.0
Slides: 32
Provided by: UMR
Category:

less

Transcript and Presenter's Notes

Title: Engineering Management Graduate Seminar


1
Engineering Management Graduate Seminar
  • Intelligent Technical Analysis for
  • Stock Prediction
  • By
  • Vamsi Krishna Bogullu

2
Introduction
  • Stock market analysis
  • To predict the trend in stock prices for monetary
    benefits.
  • Difficult and complex to perform.
  • Broadly classified into
  • Fundamental analysis
  • Technical analysis

3
Introduction
  • Fundamental analysis
  • The value of a stock is related to growth,
    dividend payout, interest rates, risk, and other
    fundamental factors.
  • Choose companies with strong combinations of the
    various fundamental factors.

4
Introduction
  • Technical Analysis
  • Price discounts all information.
  • All information regarding the price of a stock is
    contained in the price itself.
  • Has long history for helping to predict movement
    in a financial time series.
  • Has noise.
  • Based on the assumption that history repeats
    itself.

5
Introduction
  • Often more than one technical indicator is used
    to predict the stock trends and to reduce risks.
  • Gives contradictory results.
  • No precise thresholds.
  • Great uncertainty in deciding upon the correct
    indicator.
  • Subjectively based and varies between analysts.
  • Experience is needed.

6
Model Development
  • GoalUse fuzzy logic for technical analysis to
    give the system decision making capabilities
    similar to humans.
  • Fuzzy logic is used to incorporate the imprecise
    nature of technical indicators.
  • Only the most commonly used guidelines were used
    as heuristics for the system.

7
Fuzzy Logic
  • Fuzzy logic is used to encode human knowledge
    into the system using linguistic variables.
  • Fuzzy sets give the degree of correctness/associat
    ion of a particular attribute between the range 0
    and 1.
  • Fuzzy sets are obtained with the help of fuzzy
    membership functions.
  • The common membership functions are
  • Triangular
  • Trapezoidal
  • Gaussian

8
Technical Indicators
  • One of the commonly used technical indicators is
    the moving average.
  • A combination of two or more moving averages with
    different time periods are often used for finding
    stock price trends.
  • Moving averages are also used within many other
    technical indicators.

9
Technical Indicators
  • The moving average ya at time t of a signal y is
  • ya
  • T the time interval over which the average is
    calculated.
  • If ya is below y, the trend is positive.
  • If ya is above y, the trend is negative.
  • Exponential Moving Average
  • Calculated by applying a percentage of todays
    price to yesterdays moving average value.

10
Technical Indicators
  • MACD (Moving Average Convergence /Divergence)
    and Williams R indicators are used.
  • MACD is a lagging indicator.
  • Williams R is a leading indicator.
  • MACD is the commonly used indicator to study the
    relationship between two exponential moving
    averages.

11
Technical Indicators
  • The MACD is the difference between a 26-day
    exponential moving average and a 12-day
    exponential moving average.
  • A 9-day exponential moving average of the MACD is
    the signal line.
  • Exponential moving average places more weight on
    the recent trends.

12
Technical Indicators
  • The chart illustrates the MACD indicator for
    Cisco Systems stock for the time period
    6/5/98 to 11/10/98.
  • The solid line is the MACD line and the dotted
    line is the signal line.

SELL
SELL
SELL
BUY
BUY
BUY
BUY
13
Technical Indicators
  • Williams R
  • Leading indicator.
  • Momentum indicator.
  • Measures the overbought and oversold levels.
  • n 14 is used since a short term analysis is
    being done.

14
Technical Indicators
  • Chart illustrates the Williams R indicator for
    Cisco Systems stock for the time period 6/5/98
    to 11/10/98.
  • Each time the chart formed a trough below 80 a
    buy position is taken, while a sell position is
    taken for a peak above 20.

15
Fuzzy Technical Analysis
  • The slope of the MACD signifies the trend.
  • The distance between the MACD and the signal line
    helps in taking a buy or sell position.
  • Fuzzy logic helps the system to take the BUY or
    SELL positions prior to the crisp cutting of the
    MACD and the signal line.

16
Fuzzy Technical Analysis
  • The following rules are incorporated into the
    system
  • (where d is the distance between the MACD and
    signal line and s is the slope of the MACD
    line)
  • IF -d is less and -s is steep, THEN the sell
    signal is STRONG
  • IF -d is less and -s is flat, THEN the sell
    signal is WEAK
  • IF -d is less and s is steep, THEN the buy
    signal is STRONG
  • IF -d is more and s is flat, THEN the buy signal
    is WEAK
  • IF d is less and s is steep, THEN the buy
    signal is STRONG
  • IF d is less and s is flat, THEN the buy signal
    is WEAK
  • IF d is less and -s is steep, THEN the sell
    signal is STRONG
  • IF d is more and -s is flat, THEN the sell
    signal is WEAK

17
Fuzzy Technical Analysis
  • For a given input of d and s, the membership
    values of the linguistic variables less, more,
    steep, and flat are fuzzified between 0 and 1.
  • The rules are executed and the fuzzified values
    of the linguistic variables Strong and Weak
    are found.
  • These values are defuzzied to give the confidence
    of the signal between 0 and 1.

18
Fuzzy Technical Analysis
  • In Williams R the BUY and SELL positions are
    generated when the Williams R value is above
    or below the 80 and 20 levels, respectively.
  • As technical indicators do not have precise
    thresholds and vary among analysts, fuzzy logic
    can be used to get the membership values of the
    linguistic variables around 80 and around
    20

19
Fuzzy Technical Analysis
  • The following rules were added to the system
  • If the value is around -80, THEN the signal is
    BUY
  • If the value is around -25, THEN the signal is
    SELL
  • The rules are executed to get the BUY or SELL
    signal.
  • The confidence of BUY and SELL signals lie
    between 0 and 1.

20
Strategies to Combine the Indicators
  • The following strategies have been tested
  • BUY/SELL when the confidence of at least one of
    the indicators crosses the threshold value
  • BUY/SELL when the confidences of both the
    indicators cross the threshold value
  • BUY when the confidence of at least one indicator
    crosses the threshold and SELL when the
    confidences of both the indicators cross the
    threshold.
  • BUY when the confidences of both the indicators
    cross the threshold and SELL when the confidence
    of at least one of these indicator crosses the
    threshold.
  • After testing with these strategies, the
    following strategy was used
  • BUY when the confidences of both the indicators
    cross the threshold and SELL when the confidence
    of at least one of these indicator crosses the
    threshold.

21
Results
  • The system has been tested on 6 different stocks.
  • The system has been tested for both long and
    short trading.
  • Results show the profit or loss obtained for a
    single dollar invested over the time period
    (4/16/98 to 4/16/01).
  • Reinvestment was used.

22
Results

23
Points to Ponder
  • Trading rules are difficult to develop and
    experience is needed.
  • Developing trading strategies when the number of
    indicators is greater than two is difficult.
  • May be biased.
  • Neural networks can be used to develop the
    trading rules and for combining different
    technical indicators with out the human error.

24
Neural Networks
  • Useful for non-linear problems.
  • No rules/assumptions are needed.
  • Can learn from the data.

25
Neural Networks
  • Feed forward neural network with back propagation
    is used.
  • The network predicts the BUY or SELL signal for
    the next day.
  • Different architectures have been tested.
  • The original data set of 720 days is divided into
    two sets.
  • Training set 520 days of data.
  • Testing set 200 days of data.

26
Neural Networks
  • Inputs
  • The fuzzified values of the distance and slope
    from the MACD indicator.
  • MACD and Signal line (for direction).
  • The fuzzified values of the linguistic variables
    around 80 and around 25 of the Williams
    R indicator.
  • Target
  • 0 or 1 depending upon the next days stock price.
  • 1 Increase in price
  • 0 Decrease in price.

27
Results
  • The percentage correctness in predicting the
    direction of the stocks is shown in the following
    tables
  • Table1 Fuzzified MACD and Fuzzified Williams
    R.
  • Table2 MACD and Williams R indicators.

Table 1
Table 2
28
Points to Ponder
  • The fuzzy neural system gives better results for
    predicting the direction.
  • The mean of the first network in table 1 is
    greater than the mean of any network within table
    2.
  • In table 2, for some stocks, most networks give
    less than 50 percent accuracy in predicting the
    direction.
  • By changing the membership values of the fuzzy
    system, the correct prediction of the direction
    changes.
  • Genetic algorithms may help find the optimum
    membership values of the fuzzy system.

29
Genetic Algorithms
  • Genetic algorithms are used to find the optimum
    solution in a problem space.
  • The common operations of the genetic algorithm
  • Cross over
  • Mutation
  • Reproduction
  • After each generation the fitness function is
    calculated and the chromosomes are selected for
    the next generation.
  • This continues until the optimum solution is
    found.

30
Future Work
  • For the proposed fuzzy-neural system the triangle
    membership function is used.
  • The width of the membership function and the
    distance of the vertex is coded into the
    chromosome.
  • The fitness function will be the profit or loss
    in dollar amounts calculated from the
    fuzzy-neural system.

31
Questions?
Write a Comment
User Comments (0)
About PowerShow.com