请问有用R做系统测试的前辈么?

Discussion in 'Julia / MATLAB / SAS' started by upnm, Mar 17, 2012.

  1. 小弟目前在用R做交易策略,以及回测。
    请问这里有用R的前辈么?希望和你们交流。
    目前交易系统模型大概如下:
    1.Quantmod:绘图
    2.TTR:技术指标计算
    3.mFilter:做信号过滤
    4.candlesticks:烛形识别

    希望有用R做相关数据分析的前辈们留个脚印,大家可以相互交流:)
     
  2. 在用R做了一些东西,用Rcpp把R和C++代码结合起来了,用R写策略。
     
  3. 用过游程检测吗? 感觉 tseries的 runs.test 好像不是《高频交易》里说的游程检测。
     
  4. 我目前在python环境下调用R做运算,然后在python初步实现了自动交易系统。目前还在完善。
    我没有用过游程检测,我主要用R的quantstrat做回测,利用R写一些时间逻辑类的指标,还有就是曲线拟合了。你是用c++开发交易交易系统,调用R做策略运算么?
    R下面有没有做过 图形模式识别?
     
  5. 我是用c++开发交易交易系统,调用R做策略运算,发送下单指令,没有做过图形模式识别
     

  6. 我也在 Python 环境内嵌 R 跑 Quantstrat 回测,用 Python 包装了 Quantstrat API,方便动态组合各种系统。我对Python还算熟悉,对R和系统则只有粗浅的了解了。
     
  7. quantstrat你用下来效果怎么样?
    我回测的时候发现limit order是有问题的,价格没有更新成限价,而是仍然用的market close或者prefer.
    我的email. upnm@yahoo.cn 楼上有机会多交流
     

  8. 我大概看了下 ruleOrderProc stop limit 部分的代码,没有发现问题,如果你确定有问题,不妨给一个可重现的代码,然后发到R-SIG-Finance邮件列表给作者本人。
     
  9. addOrder函数里面
    if(!is.null(threshold) & length(price)>=1 ) {
    if(length(grep(ordertype,c("stoplimit","stoptrailing","iceberg")))==1) {
    #we have a threshold set on a stop* order, process it
    #print(paste("adding order:",ordertype))
    switch(ordertype,
    limit=,
    stoplimit =,
    iceberg =,
    stoptrailing = {
    #print("caculationg")
    if(isTRUE(tmult)){
    #set the numeric theshold as threshold*price
    if(threshold<1) threshold = price*threshold
    else{
    #get the difference between the threshold*price and the price
    threshold = price-(price*threshold) #positive threshold
    }
    tmult=FALSE
    #this sets the threshold as a fixed number for later trailing orders
    }
    price = price+threshold
    }
    ) #end type switch
    #print(paste("adding order:",ordertype,price,threshold))
    }
    原来switch里面没有limit选项,会造成limit order的 threshold,计算无法正常进行。已发送邮件给他们了。可能我们用的版本号不一样吧。
     
  10. 请教下,哪里有quantstrat的详细文档。我找了半天也没找到好的详细文档。只有网上的几个案例代码。

    另外,你们觉得quantstart好用吗?就是测试策略的时候,灵活性怎么样。
     
  11. R 在做实时和多线程上比较别扭,统计分析很爽,我用perl+R。
     
  12. 偶哦,玩r的人还不少么。