SlideShare a Scribd company logo
1 of 23
Integrating a Piecewise Linear Representation
   Method and a Neural Network Model for
       Stock Trading Points Prediction


      Pei-Chann Chang, Chin-Yuan Fan, and Chen-Hao Liu
                         TSMCC.2008

                   Presenter: Yu Hsiang Huang
                        Date: 2011-12-30
Outline
• Introduction
• IPLR Model
  – Piecewise Linear Representation
  – Stepwise Regression Algorithm
  – Genetic Algorithm
  – Back-propagation Network
• Experimental results
• Conclusion
Introduction
• Stock market
  – Highly nonlinear dynamic system
      • Interest rates, inflation rate, economic environments, political issues…

• Most resent research
  – Derive accurate models
  – Predict the future price of stock movement

• In this paper
  – Trading decision
      • Buy/Sell points
  – Critical role to make a profit
IPLR Model
                                    Candidate Stocks Screening
                                                       Selected stock
                                                 GA

                     Technical indexes          SRA                  Related input variable

no                        PLR             Turning point                    Trading signal

             Reach                                                   Expect output                input
           number of
          generation ?                     Calculate
                                            profit
                                                              Test             BP(train)
                 yes

              End                                              Trading decision

                                         Related input variables          BP               Buy/sell
     Related input variables
Genetic Algorithm

Initialization                                Randomly generate initial population

                                                                                                    50
                                          1    0    … 0       1                                     10
                                                                                                    0.8
                                                                                                    0.1


 Selection                       Fitness function                   roulette-wheel selection

                                                                     Tournament selection



Reproduction                     Crossover              Two-point                        Mutation



             genetic diversity




Termination                         # of generation , reach the best fitness value , …
IPLR Model
      Candidate Stocks Screening
                      Selected stock
                 GA



PLR         Turning point              Trading signal
Piecewise Linear Representation



Stock                          Turning
price                           point




              Turning
               point


         t1             t2               t3   t4   t5
                                                        date
                    segment1
Piecewise Linear Representation
Piecewise Linear Representation
                      Get trend of time series data




  Calculate trend Only in turning point
Piecewise Linear Representation
                       Derive the trading signal


      Tradition

Up  Down : 1 [sell]
Down  UP : 0 [buy]

                                              Not quite related to the
                                                  price variation
Piecewise Linear Representation
                          Derive the trading signal


Redefine the trading signals
IPLR Model
               Candidate Stocks Screening
                               Selected stock
                          GA

Technical indexes         SRA               Related input variable

   PLR               Turning point               Trading signal
Stepwise Regression Algorithm
Stepwise Regression Algorithm

                                           Apply by SPSS (Statistic Package for Social Science)




                          Calculate the significant value S

                    yes                                       no
X1
X2              Y
X3
 X4                                                       no
                                      Last X ?
      X5
           Xp                        yes
                                      Output
IPLR Model
               Candidate Stocks Screening
                               Selected stock
                          GA

Technical indexes         SRA               Related input variable

   PLR               Turning point                Trading signal

                                            Expect output            input


                                                    BP(train)
Back-propagation Network
IPLR Model
               Candidate Stocks Screening
                                Selected stock
                           GA

Technical indexes         SRA                 Related input variable

   PLR               Turning point                  Trading signal

                                              Expect output                input


                                       Test             BP(train)


                                        Trading decision

                    Related input variables        BP               Buy/sell
Back-propagation Network
                                              Trading decision

            Test data input to BP
Change of the trading signal pass through the boundary value:
Change is upward  sell
Change is downward  buy




                                                                 Boundary value : 0.508
IPLR Model
                                    Candidate Stocks Screening
                                                       Selected stock
                                                 GA

                     Technical indexes          SRA                  Related input variable

no                        PLR             Turning point                    Trading signal

             Reach                                                   Expect output                input
           number of
          generation ?                     Calculate
                                            profit
                                                              Test             BP(train)
                 yes

              End                                              Trading decision

                                         Related input variables          BP               Buy/sell
     Related input variables
Experimental results
Historic data : from 2004/01/02 to 2006/04/12
Training data : 2004/01/02 to 2005/09/30
Testing data : 2005/10/1 to 2006/04/12

Up-trend : 30-day moving average cross over 90-day moving average
Down-trend : 30-day moving average cross down 90-day moving average
Steady : no major tendency of 30-day moving average with 90-day moving average
Experimental results


 Up




Steady



Down
Experimental results
S&P500 : four years data [2000-2003]
Conclusion
• Trading decision > determine stock price itself
• IPLR
  – PLR : find turning point
  – GA : improve the threshold value for PLR
  – BPN : train the connection of the model
  – Significant amount of profit
• Clustering of financial time series data
• A different forecasting model
  – SVM , FNN,…
• A similar training pattern

More Related Content

What's hot

Best Swing Trading Indicators and Oscillators
Best Swing Trading Indicators and OscillatorsBest Swing Trading Indicators and Oscillators
Best Swing Trading Indicators and OscillatorsSwingTradingBootCamp
 
Candlestick charting basics steve nison
Candlestick charting basics   steve nisonCandlestick charting basics   steve nison
Candlestick charting basics steve nisonsrinivas raju k
 
Binary options strategies-how-make-money-in-binary-options-trading
Binary options strategies-how-make-money-in-binary-options-tradingBinary options strategies-how-make-money-in-binary-options-trading
Binary options strategies-how-make-money-in-binary-options-tradingThomas Jan
 
Candlestick Course
Candlestick CourseCandlestick Course
Candlestick Coursereadyforex
 
Price Action Trading.pdf
Price Action Trading.pdfPrice Action Trading.pdf
Price Action Trading.pdfShreya292338
 
Overview of price action trading
Overview of price action tradingOverview of price action trading
Overview of price action tradingChristineNelson17
 
Japanese standart is a profitable strategy by OLYMP TRADE
Japanese standart is a profitable strategy by OLYMP TRADEJapanese standart is a profitable strategy by OLYMP TRADE
Japanese standart is a profitable strategy by OLYMP TRADEOlymp Trade
 
RSI( Relative Strength Index) trading strategy -Forex Buffalo Forum
RSI( Relative Strength Index) trading strategy -Forex Buffalo ForumRSI( Relative Strength Index) trading strategy -Forex Buffalo Forum
RSI( Relative Strength Index) trading strategy -Forex Buffalo Forumforexbuffalo
 
Best strategies for trading
Best strategies for tradingBest strategies for trading
Best strategies for tradingTeyYeeShen
 
Stop Trading Support And Resistance The Wrong Way
Stop Trading Support And Resistance The Wrong WayStop Trading Support And Resistance The Wrong Way
Stop Trading Support And Resistance The Wrong WayNetpicksTrading
 
How to read japanese candlesticks
How to read japanese candlesticksHow to read japanese candlesticks
How to read japanese candlesticksJustForex
 
Support and resistance trading
Support and resistance tradingSupport and resistance trading
Support and resistance tradingmgeek007
 
Understanding Japanese Candlesticks in Forex Trading by valentino heavens
Understanding Japanese Candlesticks in Forex Trading by valentino heavensUnderstanding Japanese Candlesticks in Forex Trading by valentino heavens
Understanding Japanese Candlesticks in Forex Trading by valentino heavensValentino Heavens
 
Bollinger Bands - Here is how to trade them
Bollinger Bands - Here is how to trade themBollinger Bands - Here is how to trade them
Bollinger Bands - Here is how to trade themNetpicksTrading
 
Engulfing Candle Trading Strategy
Engulfing Candle Trading StrategyEngulfing Candle Trading Strategy
Engulfing Candle Trading StrategyForex Useful
 
Forex lesson 3 market trending
Forex lesson 3  market trendingForex lesson 3  market trending
Forex lesson 3 market trendingpipsumo traderfx
 
Trading With Candlestick Charts
Trading With Candlestick ChartsTrading With Candlestick Charts
Trading With Candlestick ChartsVivek Rattan
 

What's hot (20)

Best Swing Trading Indicators and Oscillators
Best Swing Trading Indicators and OscillatorsBest Swing Trading Indicators and Oscillators
Best Swing Trading Indicators and Oscillators
 
Candlestick charting basics steve nison
Candlestick charting basics   steve nisonCandlestick charting basics   steve nison
Candlestick charting basics steve nison
 
Binary options strategies-how-make-money-in-binary-options-trading
Binary options strategies-how-make-money-in-binary-options-tradingBinary options strategies-how-make-money-in-binary-options-trading
Binary options strategies-how-make-money-in-binary-options-trading
 
Candlestick Course
Candlestick CourseCandlestick Course
Candlestick Course
 
Price Action Trading.pdf
Price Action Trading.pdfPrice Action Trading.pdf
Price Action Trading.pdf
 
Overview of price action trading
Overview of price action tradingOverview of price action trading
Overview of price action trading
 
Japanese standart is a profitable strategy by OLYMP TRADE
Japanese standart is a profitable strategy by OLYMP TRADEJapanese standart is a profitable strategy by OLYMP TRADE
Japanese standart is a profitable strategy by OLYMP TRADE
 
RSI( Relative Strength Index) trading strategy -Forex Buffalo Forum
RSI( Relative Strength Index) trading strategy -Forex Buffalo ForumRSI( Relative Strength Index) trading strategy -Forex Buffalo Forum
RSI( Relative Strength Index) trading strategy -Forex Buffalo Forum
 
The Technical Analysis Guidebook
The Technical Analysis GuidebookThe Technical Analysis Guidebook
The Technical Analysis Guidebook
 
Best strategies for trading
Best strategies for tradingBest strategies for trading
Best strategies for trading
 
Stop Trading Support And Resistance The Wrong Way
Stop Trading Support And Resistance The Wrong WayStop Trading Support And Resistance The Wrong Way
Stop Trading Support And Resistance The Wrong Way
 
How to read japanese candlesticks
How to read japanese candlesticksHow to read japanese candlesticks
How to read japanese candlesticks
 
Support and resistance trading
Support and resistance tradingSupport and resistance trading
Support and resistance trading
 
Understanding Japanese Candlesticks in Forex Trading by valentino heavens
Understanding Japanese Candlesticks in Forex Trading by valentino heavensUnderstanding Japanese Candlesticks in Forex Trading by valentino heavens
Understanding Japanese Candlesticks in Forex Trading by valentino heavens
 
Bollinger Bands - Here is how to trade them
Bollinger Bands - Here is how to trade themBollinger Bands - Here is how to trade them
Bollinger Bands - Here is how to trade them
 
Forex trading strategies
Forex trading strategiesForex trading strategies
Forex trading strategies
 
Engulfing Candle Trading Strategy
Engulfing Candle Trading StrategyEngulfing Candle Trading Strategy
Engulfing Candle Trading Strategy
 
Forex lesson 3 market trending
Forex lesson 3  market trendingForex lesson 3  market trending
Forex lesson 3 market trending
 
Trading With Candlestick Charts
Trading With Candlestick ChartsTrading With Candlestick Charts
Trading With Candlestick Charts
 
Vivre du trading
Vivre du tradingVivre du trading
Vivre du trading
 

Recently uploaded

TriStar Gold Corporate Presentation - April 2024
TriStar Gold Corporate Presentation - April 2024TriStar Gold Corporate Presentation - April 2024
TriStar Gold Corporate Presentation - April 2024Adnet Communications
 
Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.Anamaria Contreras
 
Church Building Grants To Assist With New Construction, Additions, And Restor...
Church Building Grants To Assist With New Construction, Additions, And Restor...Church Building Grants To Assist With New Construction, Additions, And Restor...
Church Building Grants To Assist With New Construction, Additions, And Restor...Americas Got Grants
 
Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...
Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...
Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...ssuserf63bd7
 
digital marketing , introduction of digital marketing
digital marketing , introduction of digital marketingdigital marketing , introduction of digital marketing
digital marketing , introduction of digital marketingrajputmeenakshi733
 
Types of Cyberattacks - ASG I.T. Consulting.pdf
Types of Cyberattacks - ASG I.T. Consulting.pdfTypes of Cyberattacks - ASG I.T. Consulting.pdf
Types of Cyberattacks - ASG I.T. Consulting.pdfASGITConsulting
 
Jewish Resources in the Family Resource Centre
Jewish Resources in the Family Resource CentreJewish Resources in the Family Resource Centre
Jewish Resources in the Family Resource CentreNZSG
 
Planetary and Vedic Yagyas Bring Positive Impacts in Life
Planetary and Vedic Yagyas Bring Positive Impacts in LifePlanetary and Vedic Yagyas Bring Positive Impacts in Life
Planetary and Vedic Yagyas Bring Positive Impacts in LifeBhavana Pujan Kendra
 
EUDR Info Meeting Ethiopian coffee exporters
EUDR Info Meeting Ethiopian coffee exportersEUDR Info Meeting Ethiopian coffee exporters
EUDR Info Meeting Ethiopian coffee exportersPeter Horsten
 
Darshan Hiranandani [News About Next CEO].pdf
Darshan Hiranandani [News About Next CEO].pdfDarshan Hiranandani [News About Next CEO].pdf
Darshan Hiranandani [News About Next CEO].pdfShashank Mehta
 
Effective Strategies for Maximizing Your Profit When Selling Gold Jewelry
Effective Strategies for Maximizing Your Profit When Selling Gold JewelryEffective Strategies for Maximizing Your Profit When Selling Gold Jewelry
Effective Strategies for Maximizing Your Profit When Selling Gold JewelryWhittensFineJewelry1
 
How To Simplify Your Scheduling with AI Calendarfly The Hassle-Free Online Bo...
How To Simplify Your Scheduling with AI Calendarfly The Hassle-Free Online Bo...How To Simplify Your Scheduling with AI Calendarfly The Hassle-Free Online Bo...
How To Simplify Your Scheduling with AI Calendarfly The Hassle-Free Online Bo...SOFTTECHHUB
 
Fordham -How effective decision-making is within the IT department - Analysis...
Fordham -How effective decision-making is within the IT department - Analysis...Fordham -How effective decision-making is within the IT department - Analysis...
Fordham -How effective decision-making is within the IT department - Analysis...Peter Ward
 
Technical Leaders - Working with the Management Team
Technical Leaders - Working with the Management TeamTechnical Leaders - Working with the Management Team
Technical Leaders - Working with the Management TeamArik Fletcher
 
How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...
How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...
How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...Hector Del Castillo, CPM, CPMM
 
Unveiling the Soundscape Music for Psychedelic Experiences
Unveiling the Soundscape Music for Psychedelic ExperiencesUnveiling the Soundscape Music for Psychedelic Experiences
Unveiling the Soundscape Music for Psychedelic ExperiencesDoe Paoro
 
Memorándum de Entendimiento (MoU) entre Codelco y SQM
Memorándum de Entendimiento (MoU) entre Codelco y SQMMemorándum de Entendimiento (MoU) entre Codelco y SQM
Memorándum de Entendimiento (MoU) entre Codelco y SQMVoces Mineras
 
Strategic Project Finance Essentials: A Project Manager’s Guide to Financial ...
Strategic Project Finance Essentials: A Project Manager’s Guide to Financial ...Strategic Project Finance Essentials: A Project Manager’s Guide to Financial ...
Strategic Project Finance Essentials: A Project Manager’s Guide to Financial ...Aggregage
 

Recently uploaded (20)

TriStar Gold Corporate Presentation - April 2024
TriStar Gold Corporate Presentation - April 2024TriStar Gold Corporate Presentation - April 2024
TriStar Gold Corporate Presentation - April 2024
 
Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.
 
Church Building Grants To Assist With New Construction, Additions, And Restor...
Church Building Grants To Assist With New Construction, Additions, And Restor...Church Building Grants To Assist With New Construction, Additions, And Restor...
Church Building Grants To Assist With New Construction, Additions, And Restor...
 
Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...
Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...
Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...
 
digital marketing , introduction of digital marketing
digital marketing , introduction of digital marketingdigital marketing , introduction of digital marketing
digital marketing , introduction of digital marketing
 
Types of Cyberattacks - ASG I.T. Consulting.pdf
Types of Cyberattacks - ASG I.T. Consulting.pdfTypes of Cyberattacks - ASG I.T. Consulting.pdf
Types of Cyberattacks - ASG I.T. Consulting.pdf
 
Jewish Resources in the Family Resource Centre
Jewish Resources in the Family Resource CentreJewish Resources in the Family Resource Centre
Jewish Resources in the Family Resource Centre
 
Planetary and Vedic Yagyas Bring Positive Impacts in Life
Planetary and Vedic Yagyas Bring Positive Impacts in LifePlanetary and Vedic Yagyas Bring Positive Impacts in Life
Planetary and Vedic Yagyas Bring Positive Impacts in Life
 
EUDR Info Meeting Ethiopian coffee exporters
EUDR Info Meeting Ethiopian coffee exportersEUDR Info Meeting Ethiopian coffee exporters
EUDR Info Meeting Ethiopian coffee exporters
 
WAM Corporate Presentation April 12 2024.pdf
WAM Corporate Presentation April 12 2024.pdfWAM Corporate Presentation April 12 2024.pdf
WAM Corporate Presentation April 12 2024.pdf
 
Darshan Hiranandani [News About Next CEO].pdf
Darshan Hiranandani [News About Next CEO].pdfDarshan Hiranandani [News About Next CEO].pdf
Darshan Hiranandani [News About Next CEO].pdf
 
Effective Strategies for Maximizing Your Profit When Selling Gold Jewelry
Effective Strategies for Maximizing Your Profit When Selling Gold JewelryEffective Strategies for Maximizing Your Profit When Selling Gold Jewelry
Effective Strategies for Maximizing Your Profit When Selling Gold Jewelry
 
How To Simplify Your Scheduling with AI Calendarfly The Hassle-Free Online Bo...
How To Simplify Your Scheduling with AI Calendarfly The Hassle-Free Online Bo...How To Simplify Your Scheduling with AI Calendarfly The Hassle-Free Online Bo...
How To Simplify Your Scheduling with AI Calendarfly The Hassle-Free Online Bo...
 
The Bizz Quiz-E-Summit-E-Cell-IITPatna.pptx
The Bizz Quiz-E-Summit-E-Cell-IITPatna.pptxThe Bizz Quiz-E-Summit-E-Cell-IITPatna.pptx
The Bizz Quiz-E-Summit-E-Cell-IITPatna.pptx
 
Fordham -How effective decision-making is within the IT department - Analysis...
Fordham -How effective decision-making is within the IT department - Analysis...Fordham -How effective decision-making is within the IT department - Analysis...
Fordham -How effective decision-making is within the IT department - Analysis...
 
Technical Leaders - Working with the Management Team
Technical Leaders - Working with the Management TeamTechnical Leaders - Working with the Management Team
Technical Leaders - Working with the Management Team
 
How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...
How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...
How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...
 
Unveiling the Soundscape Music for Psychedelic Experiences
Unveiling the Soundscape Music for Psychedelic ExperiencesUnveiling the Soundscape Music for Psychedelic Experiences
Unveiling the Soundscape Music for Psychedelic Experiences
 
Memorándum de Entendimiento (MoU) entre Codelco y SQM
Memorándum de Entendimiento (MoU) entre Codelco y SQMMemorándum de Entendimiento (MoU) entre Codelco y SQM
Memorándum de Entendimiento (MoU) entre Codelco y SQM
 
Strategic Project Finance Essentials: A Project Manager’s Guide to Financial ...
Strategic Project Finance Essentials: A Project Manager’s Guide to Financial ...Strategic Project Finance Essentials: A Project Manager’s Guide to Financial ...
Strategic Project Finance Essentials: A Project Manager’s Guide to Financial ...
 

Integrating a piecewise linear representation method and a neural network model for stock trading points prediction

  • 1. Integrating a Piecewise Linear Representation Method and a Neural Network Model for Stock Trading Points Prediction Pei-Chann Chang, Chin-Yuan Fan, and Chen-Hao Liu TSMCC.2008 Presenter: Yu Hsiang Huang Date: 2011-12-30
  • 2. Outline • Introduction • IPLR Model – Piecewise Linear Representation – Stepwise Regression Algorithm – Genetic Algorithm – Back-propagation Network • Experimental results • Conclusion
  • 3. Introduction • Stock market – Highly nonlinear dynamic system • Interest rates, inflation rate, economic environments, political issues… • Most resent research – Derive accurate models – Predict the future price of stock movement • In this paper – Trading decision • Buy/Sell points – Critical role to make a profit
  • 4. IPLR Model Candidate Stocks Screening Selected stock GA Technical indexes SRA Related input variable no PLR Turning point Trading signal Reach Expect output input number of generation ? Calculate profit Test BP(train) yes End Trading decision Related input variables BP Buy/sell Related input variables
  • 5. Genetic Algorithm Initialization Randomly generate initial population 50 1 0 … 0 1 10 0.8 0.1 Selection Fitness function roulette-wheel selection Tournament selection Reproduction Crossover Two-point Mutation genetic diversity Termination # of generation , reach the best fitness value , …
  • 6. IPLR Model Candidate Stocks Screening Selected stock GA PLR Turning point Trading signal
  • 7. Piecewise Linear Representation Stock Turning price point Turning point t1 t2 t3 t4 t5 date segment1
  • 9. Piecewise Linear Representation Get trend of time series data Calculate trend Only in turning point
  • 10. Piecewise Linear Representation Derive the trading signal Tradition Up  Down : 1 [sell] Down  UP : 0 [buy] Not quite related to the price variation
  • 11. Piecewise Linear Representation Derive the trading signal Redefine the trading signals
  • 12. IPLR Model Candidate Stocks Screening Selected stock GA Technical indexes SRA Related input variable PLR Turning point Trading signal
  • 14. Stepwise Regression Algorithm Apply by SPSS (Statistic Package for Social Science) Calculate the significant value S yes no X1 X2 Y X3 X4 no Last X ? X5 Xp yes Output
  • 15. IPLR Model Candidate Stocks Screening Selected stock GA Technical indexes SRA Related input variable PLR Turning point Trading signal Expect output input BP(train)
  • 17. IPLR Model Candidate Stocks Screening Selected stock GA Technical indexes SRA Related input variable PLR Turning point Trading signal Expect output input Test BP(train) Trading decision Related input variables BP Buy/sell
  • 18. Back-propagation Network Trading decision Test data input to BP Change of the trading signal pass through the boundary value: Change is upward  sell Change is downward  buy Boundary value : 0.508
  • 19. IPLR Model Candidate Stocks Screening Selected stock GA Technical indexes SRA Related input variable no PLR Turning point Trading signal Reach Expect output input number of generation ? Calculate profit Test BP(train) yes End Trading decision Related input variables BP Buy/sell Related input variables
  • 20. Experimental results Historic data : from 2004/01/02 to 2006/04/12 Training data : 2004/01/02 to 2005/09/30 Testing data : 2005/10/1 to 2006/04/12 Up-trend : 30-day moving average cross over 90-day moving average Down-trend : 30-day moving average cross down 90-day moving average Steady : no major tendency of 30-day moving average with 90-day moving average
  • 22. Experimental results S&P500 : four years data [2000-2003]
  • 23. Conclusion • Trading decision > determine stock price itself • IPLR – PLR : find turning point – GA : improve the threshold value for PLR – BPN : train the connection of the model – Significant amount of profit • Clustering of financial time series data • A different forecasting model – SVM , FNN,… • A similar training pattern