Introduction to rules

Financial Trading in R

Ilya Kipnis

Professional Quantitative Analyst and R programmer

What are rules?

  • Rules are functions used to create a transaction given you wish to make one based on a signal

  • Rules in R: more complex than indicators and signals

Financial Trading in R

Using add.rule()

  • Many arguments

  • Enter rules: buying shares

  • Exit rules: selling shares (converting them back into cash)

add.rule(strategy.st, name = "ruleSignal", 
         arguments = list(sigcol = "filterexit", 
                          sigval = TRUE, ... ), 
         type = "exit")
Financial Trading in R

Let's practice!

Financial Trading in R

Preparing Video For Download...