[问题] Shiny上做平行运算(rugarch)

楼主: naturalsmen (日日夜夜)   2015-12-19 11:42:31
[问题类型]:
程式咨询(我想用R 做某件事情,但是我不知道要怎么用R 写出来)
效能咨询(我想让R 跑更快)
[软件熟悉度]:
入门(写过其他程式,只是对语法不熟悉)
[问题叙述]:
最近在用rugarch pkg中的ugarchroll做模型回测
是用过去1000天的time window为建模样本 预测隔天(t+1)的波动度
每天都会重新fit一个新的模型 图示如下
T daily returns:
|
楼主: naturalsmen (日日夜夜)   2015-12-19 11:47:00
补充:灰屏没有显示任何警告或错误讯息啊范例程式的ugarchroll忘了加cluster进去 晚点修改抱歉
作者: cywhale (cywhale)   2015-12-19 13:18:00
and what you mean "data = -data()$r" ?Igot "Error in -data()$r : invalid argument to unary"
楼主: naturalsmen (日日夜夜)   2015-12-19 14:10:00
cywhale: data is the DAX index loaded from 'quandl' and r is the daily log return calculated fromthe DAX data, containing Date, Open Price, ClosePrice, and so on. i put them in the reactive variable 'data', i.e., i make a list to contain thevariables i need in 'data'. In my computer, i can use data()$r to call the log return in the reactive variable 'data'. The negative sign represents the 'negative' log return. i'll check it later,and thanks for replying:)I have just checked the problem and the data()$rworks fine as usual. Maybe u can re-confirm if the quandl function works. Many thanks:)
作者: cywhale (cywhale)   2015-12-19 17:30:00
ya.. the issue is my fault when try andIt' ok to use cluster and get result on shiny-serveron linux, but I got troubles to deploy shinyapps.ioAt least, I have no error runing code on shiny-server(and also no error on local computer). What messagewhen your app crash and press F-12 & select "console"
楼主: naturalsmen (日日夜夜)   2015-12-19 21:02:00
Maybe I mixed up the definition of the "shiny server" and the "shiny apps.io", sorry about that. What I mean "shiny server" in the article is the "shiny apps.io". I'll fix it as soon as possible.I can run my app locally but run into trouble onshinyapps.io. Anyways, thanks a lot:)I may give it a shot using your method to see ifI can get any warning message.
作者: cywhale (cywhale)   2015-12-19 23:17:00
I deploy it:https://cywhale.shinyapps.io/test_rugarchbut only no error if I change code to:cluster = makePSOCKcluster(4). If using (10),it crashand got error: server responded with a status of 500
楼主: naturalsmen (日日夜夜)   2015-12-20 00:03:00
so maybe it's due to the constraints as a freeuser?

Links booklink

Contact Us: admin [ a t ] ucptt.com