eb526c428cf3b7c76bba3191cbc7d521.ppt
- Количество слайдов: 50
Fin. DEL 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 1
Temporal Domain Time-series information are expressed using patterns Financial Forecasting Medical Informatics Weather Forecasting etc. 2
Financial Patterns sell Head & Shoulder Flag Technical Analysis More on stock chart patterns: http: //www. incrediblecharts. com/technical/chart_patterns. htm 3
Medical Patterns buy Vitamin B 12 Weekly Repeating Anemia Hemoglobin Anemia Week 1 Anemia Week 2 Anemia 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/ 4
Control Chart Patterns System out of control More on process control chart patterns: http: //deming. eng. clemson. edu/pub/tutorials/qctools/ccmain 1. htm 5
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. 6
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. 7
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 8
Research Objective of Fin. DEL 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. 9
Roles of a Language Domain Experts Users Language Constructs Algorithms Compilers 10
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 11
What Kind of Language is Good? Simple Elegant Embedded Language Extensible Manipulative 12
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 Meta. Stock 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 13
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 14
A Prototype of Fin. DEL 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 15
Outline n n n Introduction Specifying Technical Indicators Specifying Patterns n n Simple Patterns Composite Patterns Pattern Definitions Conclusion 16
Design Objectives of a Chart Pattern Language n n 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. 17
Outline n n n Introduction Specifying Technical Indicators Specifying Patterns n n Simple Patterns Composite Patterns Pattern Definitions Conclusion 18
Technical Indicator n n n 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 n open, low, high, close, volume 19
Using Technical Indicators Day 0 low High 1 2 3 4. 5 4. 0 3. 8 4. 7 4. 4 4. 0 4 5 6 7 8 9 10 11 12 13 14 3. 9 3. 7 3. 5 3. 6 3. 9 4. 0 4. 1 4. 2 4. 1 4. 4 4. 5 4. 1 3. 6 3. 8 4. 3 4. 5 4. 3 4. 6 4. 5 4. 9 3. 9 low 15 = Nothing low 3 = Just 3. 9 high 10 = Just 4. 3 20
Composing Indicators Typical Price: t. Price : : Indicator Price t. Price = (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) avg. Of. Last 3 = (high#2 + high#1 + high)/3. 0 21
Moving Average n n Denotes the trend of the market. “n days moving Average” is calculated by averaging the prices of last n days. mv. Avgt = (hight+hight-1+hight-2+…+hight-n+1)/n 22
Example moving. Avg n = (high + high#1 + high#2 + …. + high#n)/n “ 10 days moving average” is, moving. Avg 10 “ 10 days moving average” for 11 th day is, moving. Avg 10 11 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. 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. 6 4. 5 4. 9 moving. Avg 10 11 = sum(…)/10 = Just 4. 15 moving. Avg 10 8 = Nothing 23
Microsoft stock price cross below mv. Avg SELL BUY price cross above mv. Avg Moving average 24
Buy and Sell signals buy = close `rise. Above` (moving. Avg 14) sell = close `fall. Below` (moving. Avg 14) f 1 `rise. Above` f 2 = (f 1 > f 2) && (f 1 # 1) < (f 2 # 1) f 1 `fall. Below` f 2 = (f 1 < f 2) && (f 1 # 1) > (f 2 # 1) 25
Outline n n n Introduction Specifying Technical Indicators Specifying Patterns n n Simple Patterns Composite Patterns Pattern Definitions Conclusion 26
Patterns n Simple Patterns n Bar, Up, Down, Horizontal, Support Line, Resistance Line 27
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 28
Operations on Patterns n n n Imposing constraints Composing horizontally Overlaying patterns 29
∞ : Imposing Constraints ∞ : : Pattern -> Constraints -> Pattern Inside day t inside. Day = bar ∞ u. let [t] = lms u in [ low t > low (t-1), high t < high (t-1) ] 30
Inside Days Yesterday was an inside-day Buy 1 Million stocks 31
Fuzzy Constraints Eg : ‘big. Down’ is a primitive down pattern, with the decrease in price being usually greater than 10 units. a b big. Down = down ∞ u. let [a, b] = lms u in [ high a – low b >F 10 ] <F, >F , =F are the fuzzy comparison operators 32
Followed-By composition p 1 p 2 » : : Pattern -> Pattern hill = (up » down) ∞ h. let [a, b, c] = lms h in [low a =F low c] b a c 33
Head & Shoulder head_shoulder = 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 ] 34
Overlay Composition p s ◇ : : Pattern ->Pattern 35
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 36
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] 37
Outline n n n Introduction Specifying Technical Indicators Specifying Patterns n n Simple Patterns Composite Patterns Making Patterns Reusable Conclusion 38
Related Products n Most popular one is, n n John Murphy’s Chart Pattern Recognition plugin for Meta. Stock (http: //www. murphymorris. com/products/cpr. html) Others, n n Patterns (http: //www. marketsonline. com/software/patterns. htm) Bull’s-Eye Broker (http: //www. archeranalysis. com/beb/index. html) n n n Fxtrek. com (http: //www. fxtrek. com/university. EN/ai/ai_stock_trading 01. asp) http: //www. pitstock. com/support/index. html http: //www. tarnsoft. com/headandshoulder. html 39
Business Opportunities We believe our solution is unique in the marketplace technically advantageous more expressive than existing tools 40
Research Opportunities n n n Efficient implementation From graphical patterns to language Pattern Mining Similarity Pattern matching Other domain applications 41
Related Mini-Projects User-Centered Tech: n GUI Design n Predictive Power of Technical Patterns n Trading Strategy Algorithmic Tech: n Analyzing use of patterns n Optimizing use of pattern n Discovery of Patterns n Refinement of Patterns 42
Predictive Power of Patterns n n To determine the ability of a pattern in determining the trend of the market performance Tools required: n n Statistical testing Adjusting patterns and data for such test 43
Trading Strategy n n To enable user to make trading decision Two phases: n n n On historical data Real-time data Tools required: n Extended CPL with trading operators 44
Analyzing use of Patterns n n A type system to ensure the correct use of patterns, and to identify potential optimization Tools required: n n Type-based/Constrain-based analysis Possibly Cameleon system 45
Optimizing use of Patterns n n To improve the efficiency of pattern matching Tools required: n n Constraint solving Meta-Haskell for the purpose of metaprogramming 46
Discovery of Patterns n n To discover profitable patterns automatically Tools required: n n Genetic programming Neural network Machine learning Statistical testing 47
Refinement of Patterns n n To refine a pattern so as to increase its predictive power Tools required: n n Machine learning Statistical testing 48
Projects in the future: n Inclusion of Financial Derivatives n n Running Fin. DEL in different platform n n Futures and Options. NET platform Compiled to FPGA Mobile Computing Application to other temporal domains n Medical Clinic tests 49
Thank you Contact: Khoosc@comp. nus. edu. sg 50
eb526c428cf3b7c76bba3191cbc7d521.ppt