[英]quantstrat package stock function: Error: C stack usage is too close to the limit
I am new to financial mathematics and trying to do a homework about backtest with R:我是金融数学的新手,并试图用 R 做一个关于回测的作业:
library(FinancialInstrument)
start.date <- '2017-01-01'
end.date <- '2019-12-30'
HSI <- getSymbols(Symbols="^HSI",src="yahoo",from=start.date,to=end.date,index.class="POSIXct",adjust=T, auto.assign = F)
HSI <- HSI %>% na.omit()
currency(primary_id='HKD')
stock(primary_id=HSI,currency='HKD',multiplier=500,tick_size=0.05)
But I receive the following Error: C stack usage 7971792 is too close to the limit但我收到以下错误:C 堆栈使用 7971792 太接近限制
My R session:我的 R session:
Cstack_info()
size current direction eval_depth
7969177 13136 1 2
I saw there is similar post but no one answer: Error: C stack usage is too close to the limit in R我看到有类似的帖子,但没有一个答案: 错误:C stack usage is too close to the limit in R
Is there anyone can advise about the Cstack error?有没有人可以就Cstack错误提出建议?
Don't use auto.assign.不要使用 auto.assign。
getSymbols(Symbols="2800.HK",src="yahoo", from=start.date,to=end.date,index.class="POSIXct",adjust=T)
`2800.HK` <- `2800.HK` %>% na.omit()
currency(primary_id='HKD')
stock(primary_id='2800.HK',currency='HKD',multiplier=500,tick_size=0.05)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.