IBrokers R 包:类 twsconn (R) 的问题
目前,我正在从 Python 切换到 R,并尝试使用 Jeff Ryan 的 Ibrokers 包编写一些简单的代码来为投资组合定价。我想在我的一个对象中有一个 twsconn 类的字段
setClass( "MktAsset",
representation( IB.id = "character",
asset.type = "factor",
ccy = "factor",
IB.conn = "twsconn") )
,但系统似乎对此不太高兴,
消息是
在 .completeClassSlots(ClassDef, where) 中: “MktAsset”定义中未定义的插槽类:IB.connection(class "twsconn")
但是当我询问 tws 的类(用 tws <- twsConnect()
初始化时,它返回
[1] "twsconn" "environment"
我试图检查代码来检查类 twsconn
是否存在,但是我什么也没发现,
可以帮忙吗?
有人
At the moment, I am switching from Python to R and I am trying to write some simple code to price a portfolio, using Jeff Ryan's Ibrokers package. I would like to have a field of class twsconn
in one of my objects
setClass( "MktAsset",
representation( IB.id = "character",
asset.type = "factor",
ccy = "factor",
IB.conn = "twsconn") )
but the system does not seem happy about it
Msg is
In .completeClassSlots(ClassDef, where) :
undefined slot classes in definition of "MktAsset": IB.connection(class "twsconn")
but when I ask the class of tws (initialized with tws <- twsConnect()
, it returns
[1] "twsconn" "environment"
I tried to go through the code to check for the existence of a class twsconn
but, I found nothing.
Can someone help?
Thanks a lot
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题是S4中的S3。这应该可行:
如果您能够在 4 月份访问芝加哥的 R/Finance www.RinFinance.com,周五我将参加一个两小时的研讨会
上午(4 月 29 日)关于 IBrokers(以及一般使用 R 的算法交易)
我怀疑这会很有趣。
The issue is S3 in S4. This should work:
If you're able to come to R/Finance in Chicago in April www.RinFinance.com, I'll be doing a two-hour workshop on Friday
morning (April 29th) regarding IBrokers (and algorithmic trading in general with R)
that would be of interest I suspect.