Displaying 20 results from an estimated 2000 matches similar to: "Date column in downloaded date"
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(*,
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
2011 Oct 18
1
problem with quantmod package
i am using quantmod package.it get stock quotes from google finanace. but
unfortunately i am not able to get the quotations of some stocks(e.g.
NSE:TCS,NSE:SAIL ) through the "getSymbol" command of this package although
they are available in the google finance website. anyone please help me.
thanks in advance.....
--
View this message in context:
2012 Mar 04
1
Store vectors as values in xts time-series object
Hi R programmers,
I have stumbled across what seems a very simple problem. My goal is to
create a xts time series object which contains vectors as values. In
other words, I try to create something like this:
2009-01-01 => c('aa', 'bb', 'dd')
...
2010-02-01 => c('mm')
I have figured out parts of separately. Here's what works (new xts
time-series with
2018 Mar 15
1
Adjusting OHCL data via quantmod
Hello,
I'm trying to do two things:
-1. Ensure that I understand how quantmod adjust's OHLC data
-2. Determine how I ought to adjust my data.
My overarching-goal is to adjust my OHLC data appropriately to minimize the
difference between my backtest returns, and the returns I would get if I
was trading for real (which I'll be doing shortly).
Background:
-1. I'm using Alpha
2009 Feb 07
1
Yahoo data downloading problem
Hi,
I got some problems while was trying to download data from Yahoo using
yahoo.get.hist.quote() function. My script is as follows :
app <- yahoo.get.hist.quote("aapl", start="02/07/09", end="02/07/06",
quote="close")
However I got following error :
trying URL
2009 Feb 05
4
eval and as.name
I'm sure there is a more general way to ask this question but how do
you use the elements of a character vector as names of objects in an
expression?
For example, say you have:
a = c(1,3,5,7)
b = c(2,4,6,8)
n=c("a","b")
and you want to use the names a and b in a function (e.g. sum)
sum(eval(as.name(n[1])),eval(as.name(n[2])))
works but
what is a simpler way to
2011 Aug 22
2
Duplicate Rows in xts
I read enourmous comment about this questions stating that it was answered before.?
I?have been looking for the answer for a week without luck !!!?
I searched the archives the xts. vignitte , googled for an answer but couldn't find one so her it is:
?
the Vignette states that xts "doesn't inforce the duplicate row requirement" but yet when I try to bring in tick stock data from
2012 Aug 01
1
Time Series Have Date Show Days of the Week
I used quantmod to pull in price data from the ticker SPY. The data has
date and closing price. I would like to show the day of the week for each
closing price. Is that possible? Also, I would like to add the back into
the data frame in a new column without changing the structure of the data
set if possible.
SPY
2009-01-02 92.96
2009-01-05 92.85
2009-01-06 93.47
2023 Apr 12
1
converting a character matrix into numeric....
Dear Rui,
Not working. I have entirely removed the column containing % but am still bootless:
> head(coredata(INFYTX))
INFY Historical Data INFY Historical Data INFY Historical Data INFY Historical Data
[1,] "47.26" "44.28" "47.56" "44.28"
[2,] "46.30" "44.92"
2023 Apr 12
1
converting a character matrix into numeric....
Isn't this like trying to tie up the horse after it has left the barn? Why not figure all this out _before_ converting to xts?
On April 12, 2023 12:29:49 PM PDT, akshay kulkarni <akshay_e4 at hotmail.com> wrote:
>Dear Rui,
> Not working. I have entirely removed the column containing % but am still bootless:
>
>> head(coredata(INFYTX))
> INFY
2023 Apr 12
1
converting a character matrix into numeric....
Dear members,
I have an xts object:
> head(INFYTX)
INFY Historical Data INFY Historical Data.1 INFY Historical Data.2
2003-04-16 "47.26" "44.28" "47.56"
2003-04-17 "46.30" "44.92" "46.53"
2003-04-21 "45.82"
2012 Apr 12
1
Could dynlm function work for xts objects?
It seems to only works for zoo or ts objects?
I tried to run it for xts objects, and error message occurs. Once I
coerce it to be an zoo object (by as.zoo), it works.
Error message:
Error in model.frame.default(formula = dynformula(PIh - PI ~ L(X, 0:i) + :
variable lengths differ (found for 'L(X, 0:i)')
In addition: Warning messages:
1: In zoo(coredata(x), order.by = index(x), ...)
2023 Apr 12
1
converting a character matrix into numeric....
?s 19:57 de 12/04/2023, akshay kulkarni escreveu:
> Dear members,
> I have an xts object:
>
>> head(INFYTX)
> INFY Historical Data INFY Historical Data.1 INFY Historical Data.2
> 2003-04-16 "47.26" "44.28" "47.56"
> 2003-04-17 "46.30" "44.92"
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) <-
2009 Jun 15
2
GARCH:: False Convergence
Dear R users,
I am trying to use tseries' garch function in order to determine the
volatility of a return series generated by quantmod. Here is the code that I
am using:
> library(quantmod)
> getSymbols("AAPL")
convert daily closing prices into continuous log returns
> dret<-dailyReturn(AAPL,type='log')
check to see that the autocorrelations decay
>
2011 Mar 12
3
pass character vector in instrument field of get.hist.quote function
I am new to R so I apologize if my question is trivial. I have not been able
to figure out whether what I want to do is even possible.
I have a data frame of stock ticker symbols which I store into R space from
a txt file as follows:
tickers <- read.csv("stocks.txt", header=FALSE, sep=",")
tickers <- tickers[1] / the tickers are stored in the first column
>
2008 Oct 22
1
R 2.8.0 qqnorm produces error with object of class zoo?
Dear list-reader,
by running the following script:
library(zoo)
sessionInfo()
search()
packageDescription("zoo")
data(EuStockMarkets)
dax <- as.zoo(EuStockMarkets[1:10, "DAX"])
daxr <- diff(log(dax))
identical(as.vector(qnorm(daxr)), qnorm(coredata(daxr)))
qqnorm(coredata(daxr))
qqnorm(daxr)
qqnorm() produces an error:
> qqnorm(daxr)
Fehler in if (xi == xj) 0L
2011 Jul 17
1
FOMULATING TIME SERIES DATA FROM DATA FRAME
I am estimating Value at Risk using PerfomanceAnalytics package. The?variables are stored in a data frame. I formated the data variables using zoo() and as.xtx() but it is not working. The working example is below.
##########################################################?
reguire(zoo)
require(PerformanceAnalytics)
reguire(xts)
?
year<- c(1991-12-30, 1992-12-30, 1993-12-30, 1994-12-30)
R1
2012 Jun 02
1
mtext bug
Sir,
I have hit a the limits of my understanding of text / par / opar etc...
I have a few related xts data frames which have multiple columns, and have
written a for-loop to make a set of charts - however i do not get any
margin text when i run the loop.
when i test the code outside of the loop the margin text appears - however
when i run the loop the margin text does not appear ... what gives?