Recognising Visual Charting Patterns in Time Series Data

Generating visual charting patterns and noise, smoothing to find a signal in noisy time series and enabling users to apply their findings to real life data.


Please refer to the vignette for details and examples on how to use this package!

There are two vignettes in this package that guide you through the process of using this software.

Check out whether the latest build has passed the checks on Tarvis/AppVeyor:

Travis-CI Build Status

Build status

Currently, testing covers this proportion of lines of code


How to build your own recognition function

Your function can have any name you wish. There are, however, a few criteria you should adhere to:

  • The first 3 arguments of your function may have any name and together provide all known information about the extrema in the time series. They need be as follows:
    • Extrema: A vector of 0s and 1s indicating whether the identified extrema are maxima(1) or minima(0)
    • Extvals: A vector containing the value of these extrema in the smoothed time series
    • Extpos: A vector containing the times at which the extrema occur in the smoothed time series
  • Your function must return a list as a result. This list needs to contain the following elements if you wish to use the inbuilt diagnostics tools (recognition rate, etc. although these will need be adapted). Should you wish to use the slicer function (i.e. expect more than one pattern per sample) you need to make sure to include point 4) in your output list.
  1. EXT=extrema as passed to your function
  2. EXV=values of these extrema, as passed to your function
  3. EXP=position in time of these extremes
  4. RESULT=Logical. TRUE if any pattern is found in the sample, FALSE otherwise. Depending on whether your algorithm looks for more than one type of pattern, this needs to be programmed. If TRUE, slicer counts the result as a find.
  • The remaining arguments and list entries in the result need not confirm to any standard.

Below is an example of a skeleton recognition function for your own patterns. ITALIC are optional but recommended elements.

custompatrec <- function(extrema, extvals, extpos, arguments){
    result <- list(EXT=extrema, EXV=extvals, EXP=extpos, recog, RESULT=logical)
    #recog is your own output. I recommend a separate list
    #element per type of pattern your function recognises


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


1.0.1 by Stephan Maier, 4 years ago

Report a bug at

Browse source code at

Authors: Stephan Maier [aut, cre]

Documentation:   PDF Manual  

Task views: Empirical Finance

GPL-3 license

Imports np, stats

Suggests testthat, knitr, rmarkdown, graphics

See at CRAN