1 / 50

FinDEL A Language-Based Approach to Financial Analysis

FinDEL A Language-Based Approach to Financial Analysis. Principal Investigator: A/Prof Khoo Siau Cheng Co-Principal Investigator: A/Prof Chin Wei Ngan School of Computing External Collaborator: Professor Ng Kah Hwa Centre of Financial Engineering Contact: Khoosc@comp.nus.edu.sg.

jamal
Download Presentation

FinDEL A Language-Based Approach to Financial Analysis

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. FinDELA Language-Based Approach to Financial Analysis Principal Investigator: A/Prof Khoo Siau Cheng Co-Principal Investigator: A/Prof Chin Wei Ngan School of Computing External Collaborator: Professor Ng Kah Hwa Centre of Financial Engineering Contact: Khoosc@comp.nus.edu.sg

  2. Temporal Domain Time-series information are expressed using patterns Financial Forecasting Medical Informatics Weather Forecasting etc.

  3. Financial Patterns sell sell Head & Shoulder Flag Technical Analysis More on stock chart patterns: http://www.incrediblecharts.com/technical/chart_patterns.htm

  4. Medical Patterns buy Vitamin B12 Weekly Repeating Anemia Anemia Anemia Anemia Anemia Hemoglobin Week 1 Week 2 Week 3 Week 4 Abstracting Patterns of Anemia level from series of hemoglobin tests More on medical patterns: http://smi-web.stanford.edu/projects/resume/

  5. Control Chart Patterns System out of control More on process control chart patterns: http://deming.eng.clemson.edu/pub/tutorials/qctools/ccmain1.htm

  6. Problem Extracting useful information/patterns from temporal domain can be non-trivial:  The “usefulness” can be user-dependent, intuitively simple, but hard to specify.  Extracting information for explorative purpose requires sophisticated IT skill.

  7. Opportunities (User Perspective) A user-centered technology can bring the power of exploratory information extraction to domain experts and users  The technology should speak the same jargon as the domain experts.  The technology should emphasize on problem description rather than solution prescription.

  8. Opportunities (Technology Perspective)  Technology can be reused over a broad range of temporal domains: financial forecasting medical informative weather forecasting Unified base that can easily accommodate the advancement in technology neural network pattern recognition data mining 

  9. Research Objective of FinDEL Using programming language technology to provide a unified framework for  Supporting user-centered tools for extracting information from financial domains  Ensuring the adaptability of existing domain solutions to technology advances.

  10. Roles of a Language Domain Experts Users Language Constructs Algorithms Compilers

  11. Why is Language Important? It defines a representation (temporal abstract) that is:  Abstract enough to capture user-defined patterns  Concrete enough for numerous techniques to manipulate It defines a set of terminologies that is:  Abstract enough to match domain jargons  Accurate enough to ensure meaningful manipulations

  12. Embedded Language What Kind of Language is Good? Simple Elegant Extensible Manipulative

  13. Business Opportunities We have not seen any commercial products that are as expressive and versatile as what we have suggested. Some of the available products: Chart Pattern Recognition plugin for MetaStock Patterns (http://www.marketsonline.com/software/patterns.htm) Bull’s-Eye Broker (http://www.archeranalysis.com/beb/index.html) Please refer to slide 39 for more information

  14. Research Collaboration We need domain experts to help us in defining the problem, and in perfecting the techniques and solutions. Financial experts Researchers from the Centre of Financial Engineering

  15. A Prototype of FinDEL The following slides (16 – 38) Demonstrates how financial chart patterns can be effectively specified and manipulated by an elegant, concise, and yet “high-level” programming language. Technical detail is available the paper “Charting Patterns on Price History”, downloadable in http://www.comp.nus.edu.sg/~khoosc/research.html

  16. Outline • Introduction • Specifying Technical Indicators • Specifying Patterns • Simple Patterns • Composite Patterns • Pattern Definitions • Conclusion

  17. Design Objectives of aChart Pattern Language • Define patterns with the help of constraints and technical indicators. • The language should be “high-level ”. • It should be complete enough to specify all the well-known patterns. • Pattern definitions should be reusable and composable.

  18. Outline • Introduction • Specifying Technical Indicators • Specifying Patterns • Simple Patterns • Composite Patterns • Pattern Definitions • Conclusion

  19. Technical Indicator • A mathematical formula that quantifies the market behavior. • It is a time-series data. • Basics indicators: Low, high, close, open of a day Transaction volume of a day • open, low, high, close, volume

  20. Day 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 low 4.5 4.0 3.8 3.9 3.7 3.5 3.6 3.9 4.0 4.1 4.2 4.2 4.1 4.4 4.5 High 4.7 4.4 4.0 4.1 3.9 3.6 3.8 4.3 4.5 4.3 4.3 4.6 4.5 4.9 4.9 low 15 = Nothing low 3 = Just 3.9 high 10 = Just 4.3 Using Technical Indicators

  21. Composing Indicators Typical Price: tPrice :: Indicator Price tPrice = (high + low + close) / 3.0 tprice t gives value of typical price for t Indexing into price History: (#) operator: (high # 10) t = high (t-10) avgOfLast3 = (high#2 + high#1 + high)/3.0

  22. Moving Average • Denotes the trend of the market. • “n days moving Average” is calculated by averaging the prices of last n days. mvAvgt = (hight+hight-1+hight-2+…+hight-n+1)/n

  23. Day 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 low 4.5 4.0 3.8 3.9 3.7 3.5 3.6 3.9 4.0 4.1 4.2 4.2 4.1 4.4 4.5 High 4.7 4.4 4.0 4.1 3.9 3.6 3.8 4.3 4.5 4.3 4.3 4.6 4.5 4.9 4.9 Example movingAvg n = (high + high#1 + high#2 + …. + high#n)/n “10 days moving average”is, movingAvg 10 “10 days moving average” for 11th day is, movingAvg 10 11 movingAvg 10 11 = sum(…)/10 = Just 4.15 movingAvg 108 = Nothing

  24. Moving average Microsoft stock price cross below mvAvg SELL BUY price cross above mvAvg

  25. Buy and Sell signals buy = close `riseAbove` (movingAvg 14) sell = close `fallBelow` (movingAvg 14) f1 `riseAbove` f2 = (f1 > f2) && (f1 # 1) < (f2 # 1) f1 `fallBelow` f2 = (f1 < f2) && (f1 # 1) > (f2 # 1)

  26. Outline • Introduction • Specifying Technical Indicators • Specifying Patterns • Simple Patterns • Composite Patterns • Pattern Definitions • Conclusion

  27. Patterns • Simple Patterns • Bar, Up, Down, Horizontal, Support Line, Resistance Line

  28. Landmarks & sub-Components Landmarks are critical points of a pattern. returns the landmarks for e.g. a, b, c, d, e, f, g lms :: Patt -> [Bar] sub :: Patt -> [Patt] returns the sub-components for e.g. ab, bc, cd, de, ef, fg

  29. Operations on Patterns • Imposing constraints • Composing horizontally • Overlaying patterns

  30. Inside day t insideDay = bar ∞  u. let [t] = lms u in [ low t > low (t-1), high t < high (t-1) ] ∞ : Imposing Constraints ∞ :: Pattern -> Constraints -> Pattern

  31. Yesterday was an inside-day Inside Days Buy 1Million stocks

  32.  u. let [a,b] = lms u bigDown = down ∞ in [ high a – low b >F 10 ] Fuzzy Constraints Eg : ‘bigDown’ is a primitive down pattern, with the decrease in price being usually greaterthan 10 units. a b <F, >F ,=F are the fuzzy comparison operators

  33. hill = (up » down) ∞  h . let [a,b,c] = lms h in [low a =F low c] b c a Followed-By composition p1 p2 » :: Pattern -> Pattern -> Pattern

  34. Head & Shoulder head_shoulder = hill » hill » hill ∞ hs. let [a,b,c,d,e,f,g] = lms hs in [ high d > high b, high d > high f, high b =F high f ]

  35. p s Overlay Composition ◇ :: Pattern -> Pattern ->Pattern

  36. Overlay Composition rect = res ◇ sprt ∞  u. let [r,s] = sub u [m,n] = lms r in [slope r =F slope s, breakout r n] r breakout s

  37. Diamond diamond = ((res » res) ◇ (sprt » sprt)) ∞ u. let [rl,sl] = sub u [m,n] = sub rl [p,q] = sub sl [c,d] = lms q in [diverge m p, converge n q, breakout q d]

  38. Outline • Introduction • Specifying Technical Indicators • Specifying Patterns • Simple Patterns • Composite Patterns • Making Patterns Reusable • Conclusion

  39. Related Products • Most popular one is, • John Murphy’s Chart Pattern Recognition plugin for MetaStock (http://www.murphymorris.com/products/cpr.html) • Others, • Patterns (http://www.marketsonline.com/software/patterns.htm) • Bull’s-Eye Broker (http://www.archeranalysis.com/beb/index.html) • Fxtrek.com(http://www.fxtrek.com/universityEN/ai/ai_stock_trading01.asp) • http://www.pitstock.com/support/index.html • http://www.tarnsoft.com/headandshoulder.html

  40. Business Opportunities We believe our solution is unique in the marketplace technically advantageous more expressive than existing tools

  41. Research Opportunities • Efficient implementation • From graphical patterns to language • Pattern Mining • Similarity Pattern matching • Other domain applications

  42. User-Centered Tech: GUI Design Predictive Power of Technical Patterns Trading Strategy Algorithmic Tech: Analyzing use of patterns Optimizing use of pattern Discovery of Patterns Refinement of Patterns Related Mini-Projects

  43. Predictive Power of Patterns • To determine the ability of a pattern in determining the trend of the market performance • Tools required: • Statistical testing • Adjusting patterns and data for such test

  44. Trading Strategy • To enable user to make trading decision • Two phases: • On historical data • Real-time data • Tools required: • Extended CPL with trading operators

  45. Analyzing use of Patterns • A type system to ensure the correct use of patterns, and to identify potential optimization • Tools required: • Type-based/Constrain-based analysis • Possibly Cameleon system

  46. Optimizing use of Patterns • To improve the efficiency of pattern matching • Tools required: • Constraint solving • Meta-Haskell for the purpose of meta-programming

  47. Discovery of Patterns • To discover profitable patterns automatically • Tools required: • Genetic programming • Neural network • Machine learning • Statistical testing

  48. Refinement of Patterns • To refine a pattern so as to increase its predictive power • Tools required: • Machine learning • Statistical testing

  49. Projects in the future: • Inclusion of Financial Derivatives • Futures and Options • Running FinDEL in different platform • .NET platform • Compiled to FPGA • Mobile Computing • Application to other temporal domains • Medical Clinic tests

  50. Thank you Contact: Khoosc@comp.nus.edu.sg

More Related