您好我正在为我的学校做一个统计项目,但无法找到一种方法来提取用于在R中quantmod
绘制趋势线的数据
getSymbol(FXI)
chartSeries(FXI['2016-10-01::2017-01-10'])
addBBands()
我如何存储构成BBand的数据点?
答案 0 :(得分:0)
尝试
BBands(HLC(FXI['2016-10-01::2017-01-10']))
> tail(BBands(HLC(FXI['2016-10-01::2017-01-10'])))
dn mavg up pctB
2017-01-03 33.31337 35.77933 38.24530 0.3778032
2017-01-04 33.31241 35.69250 38.07259 0.4525575
2017-01-05 33.35037 35.63167 37.91296 0.5807290
2017-01-06 33.44524 35.53967 37.63409 0.5565790
2017-01-09 33.57770 35.44983 37.32196 0.5997525
2017-01-10 33.70263 35.39333 37.08403 0.7641903