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...