CPL(ID:6867/cpl007)

Chart-Pattern Language 


for Chart-Pattern Language

used to describe trends in share prices from the direction and movement of stock


Related languages
FRAN => CPL   influence
Haskell => CPL   embedded in
LUSTRE => CPL   influence
SDL => CPL   influence

References:
  • Saswat Anand, Wei-Ngan Chin, Siau-Cheng Khoo "Charting patterns on price history" pp134-145 view details Abstract:     Subscribe (Full Service)    Register (Limited Service, Free)    Login  

        Search:   The ACM Digital Library   The Guide
        


       Feedback  Report a problem  Satisfaction survey  



    Charting patterns on price history

    Full text Pdf (299 KB)  
    Source ACM SIGPLAN Notices archive
    Volume 36 ,  Issue 10  (October 2001) table of contents

    Session: Session 4 table of contents

    Pages: 134 - 145  
    Year of Publication: 2001
    ISBN:1-58113-415-0
    Also published in ...  
    Authors  Saswat Anand   National Univ. of Singapore  
    Wei-Ngan Chin   National Univ. of Singapore  
    Siau-Cheng Khoo   National Univ. of Singapore  

    Publisher ACM Press   New York, NY, USA  




    Additional Information: abstract   references   index terms   collaborative colleagues  



    Tools and Actions: Discussions    Find similar Articles   Review this Article  
    Save this Article to a Binder    Display in BibTex Format    

    DOI Bookmark: 10.1145/507635.507653  







    ABSTRACT
    It is an established notion among financial analysts that price moves in patterns and these patterns can be used to forecast future price. As the definitions of these patterns are often subjective, every analyst has a need to define and search meaningful patterns from historical time series quickly and efficiently. However, such discovery process can be extremely laborious and technically challenging in the absence of a high-level pattern definition language. In this paper, we propose a chart-pattern language (CPL for short) to facilitate pattern discovery process. Our language enables financial analysts to (1) define patterns with subjective criteria, through introduction of fuzzy constraints, and (2) incrementally compose complex patterns from simpler patterns. We demonstrate through an array of examples how real life patterns can be expressed in CPL. In short, CPL provides a high-level platform upon which analysts can define and search patterns easily and without any programming expertise. CPL is a domain-specific language embedded in Haskell. We show how various features of a functional language, such as pattern matching, higher-order functions, lazy evaluation, facilitate pattern definitions and implementation. Furthermore Haskell's type system frees the Programmers from annotating the programs with types.


    DOI Extract: RELATED WORK
    RELATED WORK
    CPL is a programming language for specifying geometrical
    patterns in time-series databases. In CPL, patterns are
    speci ed using syntactic constraints (in terms of primitive
    patterns) and semantic constraints (in terms of a set of constraints).
    On its own, syntactic pattern speci cation and its
    recognition techniques have been studied extensively in [9].
    Here, patterns are described using some primitive patterns,
    and the recognition techniques translates the entire pattern
    into a string of tokens (primitive curves) for matching.
    The syntactic constraint of CPL is related to the Shape
    Description Language (SDL) proposed by Agrawal et al. [2].
    In SDL, patterns are described in term of primitives like up,
    down, stable, etc., each of which are one time-unit long.
    Patterns can then be composed from these primitives in the
    form of regular expressions. SDL does not handle overlay
    patterns. Furthermore, it su ers from the following limitations:
    Firstly, SDL takes a microscopic approach in de ning
    patterns. As such, it is diÆcult to express in SDL the global
    features of a pattern using these primitives, which are local
    in nature. For example, a triangle pattern is formed by a
    pair of support and resistance line, ignoring the small
    uctuations
    within those line. De ning triangle using above microscopic
    primitives can become a complex task. Secondly,
    CPL has a strong support for creating indicators and using
    them in pattern de nitions. An Indicator is actually a new
    time series (eg. moving average) created out of raw a time
    series like closing prices. So it is very useful to be able to
    de ne patterns not only on the raw time series, but a new
    transformed series created out of it. SDL does not have such
    a facility.
    The semantic constraints of CPL are inspired by the landmark
    model proposed by Perng et al. for similarity-based
    pattern matching [17]. Brie
    y, this model is built from study
    of human visual system, which nds that much of the visual
    data perceived by human being is redundant; some dominant
    points on the shape contour are rich in information
    content, and are suÆcient to characterize a shape [6, 11].
    Consequently, we de ne landmarks in a pattern to be those
    points having important shape attributes; i.e., those that
    form the joints of the skeleton of a pattern. By providing
    constraint on the landmarks, patterns can be de ned from
    a macroscopic level, ignoring unnecessary details.
    Our choice of pattern-composition operations allows us
    to support interval-based temporal reasoning of price history.
    These operations are closely related to those de ned
    in Allen's algebra for modeling times and events [3]. Allen's
    algebra (as well as its associated operators) has been used
    widely in developing query languages for temporal databases,
    such as TQUEL [20], TSQL [16], etc. However, these languages
    mainly translate Allen's operations into point-based
    temporal query; they do not make full use of interval-related
    temporal properties in their implementation. On the other
    hand, CPL as presented so far only supports two of the
    Allen's operators; we are currently extending CPL to fully
    support Allen's operators.
    Lastly, we have modeled technical indicators as functions,
    similar to Behaviors in Fran [8] and Observables in the work
    on Financial contract [18]. Since technical indicators operate
    on history data of a security, which can be viewed as a list
    of data, it is possible to model indicators as operations over
    in nite streams, as in Lustre [10]. However, the treatment
    of patterns as illustrated in this paper shows that we usually
    work on a nite period of time, and many operations |such
    as accessing a pattern's landmark | do not access history
    data in chronological order.
          in SIGPLAN Notices 36(10) October 2001 including Proceedings of the Sixth ACM SIGPLAN International Conference on Functional Programming. Florence 2001 view details
  • Saswat Anand. Domain-Specific Language for Financial Forecasting, 2001. MSc Thesis, National Univ. of Singapore view details
          in SIGPLAN Notices 36(10) October 2001 including Proceedings of the Sixth ACM SIGPLAN International Conference on Functional Programming. Florence 2001 view details