R merge daily data with tick data

别说谁变了你拦得住时间么 提交于 2019-12-01 11:22:24

Items 14.5 and 14.6 in R Cookbook demonstrate merging monthly inflation data with daily IBM data, using merge (with all=T or all=F depending on purpose), na.locf and zoo with seq to generate a full set of dates (to cover dates when one or the other symbol has no data). I've used the same approach to create blank 1m bars for minutes where there were no ticks, so I think it will work for merging daily and tick data too.

not sure where the function apply.rolling comes from, but it looks like its a rolling standard deviation with a lag of 5?

Well, you've got that it looks like. There are no values for the first five rows in calcs due to the implementation details of apply.rolling.

But i'd agree with Joshua... not sure exactly what you're trying to do here...

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!