sigThreshold

R 中的金融交易

Ilya Kipnis

Professional Quantitative Analyst and R programmer

关于 sigThreshold

  • 处理有界指标与临界(通常固定)值的交互

  • 示例:

    • 当 DVO 跌破 20
    • 具有运行概率值(0 到 1 之间)的指标
    • 以 0 为中心的滚动比率
R 中的金融交易

结构

add.signal(strategy.st, name = "sigThreshold",
           arguments = list(column = "str1",   
                             threshold = 20,
                             cross = TRUE,
                             relationship = "lt" ),
           label = "siglabel")
  • cross = TRUE 模拟 sigCrossover

  • cross = FALSE 模拟 sigComparison

R 中的金融交易

示例

add.signal(strategy.st, name = "sigThreshold",
           arguments = list(column = "DVO_2_126",   
                            threshold = 20,
                            cross = FALSE,
                             relationship = "lt"),
           label = "thresholdfilter")

add.signal(strategy.st, name = "sigThreshold",
           arguments = list(column = "DVO_2_126",   
                            threshold = 80,
                            cross = TRUE,
                            relationship = "gt"),
           label = "thresholdfilter")
R 中的金融交易

示例

R 中的金融交易

让我们来练习!

R 中的金融交易

Preparing Video For Download...