Skip to content

chartSerieries (quantmod) : data range

1 message · Robert Iquiapaza

#
Hannu,

your data is a little bit different from yahoo, as you have only one series 
this should work

sdf <- read.table("sdf.txt", header=T,as.is=T)
str(sdf)
SDF2 = timeSeries(round(sdf[,2],3), sdf[,1])
chartSeries(SDF2,theme=chartTheme('white'),TA=NULL)
'data.frame':    235 obs. of  3 variables:
$ time: chr  "6/30/1994" "7/29/1994" "8/31/1994" "9/30/1994" ...
$ m   : num  1.006 0.948 0.944 1.005 0.982 ...
$ fit : num  0.995 0.996 0.988 0.985 0.992 ...

-----Mensagem Original----- 
From: Robert Iquiapaza
Sent: Wednesday, August 06, 2014 10:00 AM
To: Hannu Kahra
Cc: r-sig-finance at r-project.org
Subject: Re: [R-SIG-Finance] chartSerieries (quantmod) : data range

This works :

Ibov=getSymbols('^BVSP', src='yahoo',from='2000-01-01',auto.assign=FALSE)
IBOV <- to.monthly(Ibov,indexAt='lastof')["2000-08-31/2014-07-31"]
chartSeries(IBOV,theme=chartTheme('white'),TA=NULL)
names = index(IBOV)
IBOV = timeSeries(IBOV, names)
chartSeries(IBOV,theme=chartTheme('white'),TA=NULL)

Robert


2014-08-06 4:56 GMT-03:00 Hannu Kahra <hkahra at gmail.com>:
_______________________________________________
R-SIG-Finance at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions 
should go.