R实战:【股票分析】用quantmod在股票的K线上添加标记
来源:互联网 发布:gif快手刷粉丝软件 编辑:程序博客网 时间:2024/05/21 15:41
R实战系列专栏
源码如下:
require(quantmod)s <- structure( c( 1300, 1301.349976, 1281.199951, 1316.900024, 1312.310059, 1278, 1304.439941, 1304.709961, 1313.900024, 1323.089966, 1314.98999, 1301.719971, 1291.630005, 1271.01001, 1281.199951, 1311.040039, 1288.329956, 1273, 1301.189941, 1287.030029, 1307.890015, 1317.030029, 1288.959961, 1299.699951, 372300, 453800, 347600, 376400, 488200, 567300, 1301.189941, 1287.030029, 1307.890015, 1317.030029, 1288.959961, 1299.699951, 0.0034153392307692, 0.00258192266643587, 0.0255230051909361, 0.00470038870619693, 0.00204214772387123, 0.0185602276995305, -0.00643845769230766, -0.0233142248891853, 0, -0.0044498328599013, -0.0182731991083518, -0.00391236306729259, 0.000915339230769252, -0.0110039169048249, 0.02083208321946, 9.87204781157658e-05, -0.0177931258240853, 0.016979617370892, 4, 3, 1, 4, 3, 1 ), .indexCLASS = "Date", .indexTZ = "UTC", tclass = "Date", tzone = "UTC", src = "yahoo", updated = structure ( 1459599733.74441, class = c("POSIXct", "POSIXt")), class = c("xts", "zoo"), index = structure ( c(1458777600, 1459123200, 1459209600, 1459296000, 1459382400, 1459468800), tzone = "UTC", tclass = "Date"), .Dim = c(6L, 10L), .Dimnames = list(NULL, c("PCLN.Open", "PCLN.High", "PCLN.Low", "PCLN.Close", "PCLN.Volume", "PCLN.Adjusted", "h", "l", "c", "cluster")))chart_Series(s)text(x = s, y = s$cluster, label = as.character(s$cluster))text(x = seq(nrow(s)), y = Hi(s)+1, label = as.character(s$cluster))输出如下:
阅读全文
0 0
- R实战:【股票分析】用quantmod在股票的K线上添加标记
- R实战:【股票分析】用quantmod包绘制K线
- R实战:【股票分析】用quantmod包绘制K线(离线数据csv/txt)
- [R语言] quantmod 包获取国内的股票数据
- [R语言] quantmod 包获取国内的股票数据
- [R语言] quantmod 包获取国内的股票数据
- 用R与quantmod画漂亮的股票走势图及技术指标
- 股票k线图的技巧分析
- 用R语言分析股票指数变化
- 用R来进行股票分析
- R语言--股票数据分析
- 用R检验配对股票的协整性
- R语言绘制股票K线图
- R 语言实现股票数据的预处理及分析
- R语言分析股票指数的GARCH效应
- 股票入门:对K线图的具体分析
- 股票学习(K线分析01)
- 股票学习(K线分析)
- Material Design控件使用(三)
- 文章标题
- 走迷宫
- Windows环境下安装配置Arcanist
- 深入理解Java虚拟机学习笔记-1.JVM内存模型
- R实战:【股票分析】用quantmod在股票的K线上添加标记
- 学习笔记
- Material Design控件使用(四)
- ElasticSearch 创建Child type 报错“The _parent field's type option can't be changed: [null]->[member]”
- python中判断对象是否可迭代
- 2017 Multi-University Training Contest
- day2-java&oracle总结
- 【unity学习笔记】手机RPG游戏中角色移动方式实现
- Python-13 函数,Python的乐高积木