Learn R Programming

rpatrec (version 1.0.1)

interpret: Recognise patterns in Time Series Data

Description

Use this function to either check for the inbuilt financial markets pattern or to use your own recognition function as described in the readme.

Usage

interpret(window, useriq = FALSE, ...)

Arguments

window
Time Series Data
useriq
User-built recognition function. Set to FALSE if using inbuilt recognition capabilities. Refer to the readme or the report on how to build your own recognition function.
...
Parameters passed on to either the inbuilt or external recognition function. Check iq for the parameters of the internal function.

Value

A list containing the following:
  • 'EXT' All extrema found in the sample, 0 for minima and 1 for maxima
  • 'EXP' Value of these extrema (y-coordinate)
  • 'EXP' Position of these extrema (x-coordinate)
  • Recognition Output A list containing the extrema that form part of the pattern labelled by either the custom or iq function.
    • 'HSP' Can be either:
      • 'HS' (Head and Shoulders)
      • 'InvHS' (Inverse Head and Shoulders)

    • 'BTPorTTP' Can be either:
      • 'BTOP' (Broadening Top)
      • 'BBOT' (Broadening Bottom)
      • 'TTOP' (Triangle Top)
      • 'TBOT' (Triangle Bottom)

    • 'RTP' Can be either:
      • 'RTOP' (Rectangle Top)
      • 'RBOT' (Rectangle Bottom)

    • 'DTP' Can be either:
      • 'DTOP' (Double Top)
      • 'DBOT' (Double Bottom)

  • 'RESULT' TRUE if any pattern is found, FALSE otherwise

Details

For an overview of the package capabilities, click here rpatrec.

Examples

Run this code
## Not run: ------------------------------------
# #Generate HS patterns
# a <- generator()
# #switch off recognition for all patterns other than HS
# interpret(window = a, useriq=FALSE, hsiq=TRUE, btpiq=FALSE, rtpiq=FALSE, dtpiq=FALSE)
## ---------------------------------------------

Run the code above in your browser using DataLab