similar to: Using getSymbols

Displaying 20 results from an estimated 700 matches similar to: "Using getSymbols"

2008 Dec 18
3
Parsing unusual date format
Hello, If I have a character string like d <- c("1990m3", "1992m8") #March 1990 and Aug 1992 what is the easiest way to convert it into any standard date form; for example, d <- c("01/03/1990", "01/08/1992") I looked at as.Date but it doesn't seem to address my problem as I have an "m" stuck in the middle of my character string
2009 Jan 05
3
if statement
Hi, How do I check for two conditions in an if loop? I want to check if a value lies between 2 other values. For example, A <- ts(rnorm(120), freq=12, start=c(1992,8)) X <- 0.5 Y <- 0.8 I would like to create a new vector C for which C[i] is 0 if A[i] lies in between X and Y. Would be grateful for any help. Sorry for asking such an R-newbie question! Shruthi -- View this message
2009 Jan 20
2
Confidence intervals in ccf()
Hi, I have been running the ccf() function to find cross-correlations of time series across various lags. When I give the option of plot=TRUE, I get a plot that gives me 95% confidence interval cut-offs (based on sample covariances) for my cross-correlations at each lag. This gives me a sense of whether my cross-correlations are statistically significant or not. However, I am unable to get R to
2009 Mar 10
1
HAC corrected standard errors
Hi, I have a simple linear regression for which I want to obtain HAC corrected standard errors, since I have significant serial/auto correlation in my residuals, and also potential heteroskedasticity. Would anyone be able to direct me to the function that implements this in R? It's a basic question and I'm sure I'm missing something obvious here. I looked up this post:
2008 Dec 18
1
For and if confusion
I have two date objects X <- c("01-03-1993", "01-05-1997") #Mar 1993 and May 1997 Y <- c("01-02-1995", "01-08-1999") #Feb 1995 and Aug 1999 and a time series object A <- ts(rnorm(120), freq=12, start=c(1992,8)) #Aug 1992 to Aug 2002 I want to create a binary (0-1) vector B that is of length 1:(A). B should have value 1 for the time periods
2009 Feb 02
1
Beveridge Nelson Decomposition
Hi, Would anyone know if it is possible to run a Beveridge Nelson decomposition of a univariate time series object in R? I searched in the help files but didn't come across any potential methods. Thanks very much, Shruthi -- View this message in context: http://www.nabble.com/Beveridge-Nelson-Decomposition-tp21789452p21789452.html Sent from the R help mailing list archive at Nabble.com.
2017 Sep 01
3
How to use getSymbols() to get annual data
Dear Sir/Madam, How to use getSymbols() to get annual data? For example, I need the annual stock price of APPLE from the year 2000 to 2016. How to write the command? I only know how to get the daily data. It is: getSymbols("AAPL",from="2000-01-01",to="2016-12-31") Thank you very much. Have a good week! Best regards, Yingrui Liu [[alternative HTML
2009 Jan 08
1
Convert to as.Date
Hi, I have an vector object that looks like DA <- c("1991q1", "1993q2") (first quarter of 1991 etc) and I want to convert it into a date object using as.Date(). I did this for montly data but am stumped when it comes to dealing with quarterly data and as.Date. Would anyone be able to help? Would be very grateful for any advice, sorry for being such an R-newbie!
2017 Dec 27
1
Error in dimnames in R
Could anyone help me with some little problem? When I plot the frontier I get the following message: *"Error in dimnames(x) <- dn : length of 'dimnames' [1] not equal to array extent"*(see below for detail). How could I solve this. Thanks a lot. ##---------------------------- Portfolio construction & Optimisation------------------------ #Assets: LUTAX,
2008 Sep 02
1
R Newbie: quantmod and zoo: Warning in rbind.zoo(...) : column names differ
Hello; I am trying following but getting a warning message : Warning in rbind.zoo(...) : column names differ, no matter whatever I do. Also I do not want to specify column names manually, since I am just writing a wrapper function around getSymbols to get chunks of data from various sources - oanda, dividends etc. I tried giving col.names = T/F, header = T/F and skip = 1 but no help. I think
2010 Jun 05
1
How to get the closing price from the the GOOGLE FINANCE site for NSEINDIA stocks
Sir, How to get the closing price from this link http://www.google.com/finance/historical?q=NSE:RCOM I installed quantmod getSymbols('NSE:RCOM',src='google') gives me this error********************** Error in download.file(paste(google.URL, "q=", Symbols.name, "&startdate=", : cannot open URL
2011 Feb 23
3
Using string to call/manipulate an object
I am using getSymbols function from quantmod package to get price data from internet. Currently I have: my.ticker <- "IBM" getSymbols(my.ticker,src="google") This creates an xts object named my.ticker which contains historical price data for IBM. How can I call and manipulating this xts object using my original string my.ticker? I want to do: colnames(my.ticker) <-
2011 Mar 16
0
Quantmod getSymbol.MySQL
I am trying to read a table from MySQL, I have loaded the file in "ts" database, in table name ACC. but i am unable to read it in R through getSymbol function. mysql> show databases; +--------------------------------+ | Database | +--------------------------------+ | information_schema | | mysql | | test | | ts
1998 Jun 15
1
R-beta: fortran problems with 0.62
One of the big problems in mixing fortran and C is knowing if the various compilers/loaders need extra underscores in the names of the entry points. The 0.62 release of R, which has reverted to using fortran, seems to be broken in this respect. In particular, on a machine which does not append underscores to fortran entry points (HP-UX 10.20), there are many problems. It seems that the
2012 Nov 09
2
TreynorRatio
i read about the performance analytics package i have a doubt about the TreynorRatio i have code g=getSymbols("IBM") > c=Cl(g) > r=Return.calculate(c) > SharpeRatio.annualized(r) IBM.Close Annualized Sharpe Ratio (Rf=0%) 0.3566339 > TreynorRatio (ret) Error in inherits(x, "xts") : argument "Rb" is missing, with
2009 Aug 17
3
Newbie question re stddev, quantmod and performanceanalytics
Hi, I am trying to calculate the std dev of returns of YHOO so far i got: getSymbols("YHOO") retYHOO <- Return.calculate(Cl(YHOO)) > sd(retYHOO) YHOO.Close NA but i received an NA....can any assist? tks! -- View this message in context: http://www.nabble.com/Newbie-question-re-stddev%2C-quantmod-and-performanceanalytics-tp25001293p25001293.html Sent from the R help
2010 Sep 10
2
[xts, quantmod] segfault probelm when I work with memcpy function
Hi, I work with SEXP C code and with xts and quantmod packages. I try to touch how xts internal works. So we have R session and: > ls() character(0) > getSymbols('AAPL') # quantmod package [1] "AAPL" > ls() [1] "AAPL" > str(AAPL) An ?xts? object from 2007-01-03 to 2010-09-09 containing: Data: num [1:929, 1:6] 86.3 84 85.8 86 86.5 ... - attr(*,
2012 Oct 19
1
to.yearly()
v="IBM" library(quantmod) v v1=getSymbols(v) to.yearly(v1) =============================== when i pass the value through a variable in to.yearly() function it shows the error msg like "Error in try.xts(x) : Error in UseMethod("as.xts") : no applicable method for 'as.xts' applied to an object of class "character"" i need the result of OHLC
2009 Mar 05
3
character string as object name
Can someone please tell me why the following (last line) doesn't work (as I expect it to :-) library(quantmod) a = getSymbols("MSFT",from="2009-3-01") a MSFT eval(as.name(a)) MSFT$MSFT.Adjusted b=paste(a,'$MSFT.Adjusted',sep='') b eval(as.name(b)) Why does this last line not work the way the earlier eval does? Thanks.
2012 Dec 06
1
Fuction Error
I'm calling a list of symbols and then using a function to build a data frame from that symbol list. It works great until I introduce this index symbol from yahoo '^GSPC'. When and index symbol is introduced I get and error which is below. > Data <- symbolFrame(symbols) Error in get(S) : object '^GSPC' not found Since R does not like the ^ in front of a name it