Displaying 20 results from an estimated 2000 matches similar to: "Downloading quote data from yahoo finance"
2007 Oct 15
0
oanda and yahoo get.hist.quote
Hello Alexander
I doubt that such an analyis is very useful as the data is not sampled
synchronously (equity close in the US for ^gspc and even that is not
always at the same time, some average price from Oanda data). Also fx
data from others sources as suggested in another mail on this list would
not really help with this unless it is really sampled at exactly the
same times as the equity
2017 Aug 02
1
Looping Through QuantMod Objects
Dear R Helpers,
I have run into a problem trying to perform a number of actions on a set
of quantmod data objects through a loop and I am hoping that this is an
easy problem for someone else as opposed to very difficult for me.
The example task is to get the first three objects of the quarterly
balance sheet for a number of companies from the getFinancials object and
put them together into a
2012 Mar 10
1
Generating abnormal returns in R
Hello
This is my first post on this forum and I hope someone can help me out.
I have a datafile (weeklyR) with returns of +- 100 companies.
I acquired this computing the following code:
library("tseries");
tickers = c("GSPC" , "BP" , "TOT" , "ENI.MI" , "VOW.BE" , "CS.PA" ,
"DAI.DE" , "ALV.DE" ,
2007 Sep 01
1
Problem in downloading Yahoo Finance data from R
Hi R users,
I have a problem in downloading Yahoo Finance data from R. I have tried
an example given in R, to download. The error is given below:
>library(fCalendar)
> yahooImport("s=IBM&a=11&b=1&c=1999&d=0&q=31&f=2000&z=IBM&x=.csv ",
file = "D:\\ Downlaod",source = "http://ichart.yahoo.com/table.csv?",
save = FALSE,
2011 May 05
1
quantmod's addTA plotting functions
Hi,
I'm having trouble with quantmod's addTA plotting functions. They seem to
work fine when run from the command line. But when run inside a function,
only the last one run is visible. Here's an example.
test.addTA <- function(from = "2010-06-01") {
getSymbols("^GSPC", from = from)
GSPC.close <- GSPC[,"GSPC.Close"]
GSPC.EMA.3
2011 Nov 03
3
Extract Data from Yahoo Finance
Hi R ?users,
?
I am using R-2.14.0 on Windows XP.
?
May I request you to assist me for the following please.
?
I like to extract all the fields (example: a : Ask, b : Bid, ??, w : 52-week Range, x: Stock Exchange) ?for certain period of time, say, 1 October 2011 to 31 October 2011.
?
Is there any R-Package(s) & any R- script please?
?
Once again, thank you very much for the time you have
2010 Mar 16
1
Simple for-loop runs out of memory
I have the following simple for-loop, which makes R crash every time. The
length of the vectors is about 1200 rows, 1 column.
n = max(length(GSPC),length(FTSE))
for(i in 1:1000)
{
if (row.names(GSPC)[i]==row.names(FTSE)[i]){
} else {
if (row.names(GSPC)[i]>row.names(FTSE)[i]){
GSPC<-rbind(GSPC[1:(i-1),],GSPC[(i-1):length(GSPC),])
row.names(GSPC)[i]=row.names(FTSE)[i]
} else {
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
2011 May 07
2
Convenience-at-the-expense-of-clarity (was: quantmod's addTA plotting functions)
Thanks, Writing plot(addTA()) worked fine.
I find myself with such mixed feelings about R. After finding that addTA
worked fine at the command line but not in a function, I puzzled for a long
time about what kind of virtual machine structure could possibly account for
that. I couldn't think of any.
It turns out that this isn't due to an R virtual machine structure. The
reason addTA adds
2009 Aug 03
3
Help with data type
Hi there,
Using a quantmod function, I calculate the daily change between two points
in a time series. However, I don't think I am using the data correctly.
Code:
getSymbols("^GSPC", src="yahoo")
CloseData <- Cl(GSPC)
Delta <- diff(CloseData, lag=1)
for (i in 3:length(Delta)) {
if (Delta[i]>Delta[i-1]) sum <- sum + Delta
}
I can't seem to use the Delta
2011 May 15
4
DCC-GARCH model
Hello,
I have a few questions concerning the DCC-GARCH model and its programming in
R.
So here is what I want to do:
I take quotes of two indices - S&P500 and DJ. And the aim is to estimate
coefficients of the DCC-GARCH model for them. This is how I do it:
library(tseries)
p1 = get.hist.quote(instrument = "^gspc",start = "2005-01-07",end =
2017 Jul 30
4
Kalman filter for a time series
I found an example at
http://www.bearcave.com/finance/random_r_hacks/kalman_smooth.html shown
below. But it seems the structSSM function has been removed from KFAS
library so it won't run. Does anyone know how to fix the code so that it
runs?
library(KFAS)
library(tseries)
library(timeSeries)
library(zoo)
library(quantmod)
getDailyPrices = function( tickerSym, startDate, endDate )
{
2011 Apr 29
3
why doesn't ifelse work ?
I have the following lines of code:
ind <- rollapply(GSPC, 200, mean)
signal <- ifelse(diff(ind, 5) > 0 , 1 , -1)
signal[is.na(signal)] <- 0
I never get a value of -1 for signal even though I know diff(ind , 5) is
less than zero frequently. It looks like when diff(ind , 5) is less than
zero, signal gets set to 0 instead of - 1. Any ideas why ? Here's some
information on ind and
2011 Jun 03
2
tkrplot Newbie
Hello,
I am trying to write a tcltk based program that plots/manipulates
xts/xoo time series objects.
I have the code I used from
## http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/tkrplot.html :
##
require(quantmod)
require(tcltk)
library(tkrplot)
Sys.setenv(TZ="GMT")
getSymbols("^GSPC", from = "1960-01-01")
Myhscale <- 2.5 # Horizontal scaling
2010 Aug 15
2
Adding colored background area to a time series plot
Hi,
I am trying to add a rectangular colored background area to a plot of a time series of relative price changes. I believe that what I'm trying to do is very similar to the question and example given here:
http://www.mail-archive.com/r-help at stat.math.ethz.ch/msg73948.html
http://www.mayin.org/ajayshah/KB/R/html/g5.html
My problem/difference is that my time series looks like so:
>
2011 May 12
2
DCC-GARCH model and AR(1)-GARCH(1,1) regression model
Hello,
I have a rather complex problem... I will have to explain everything in
detail because I cannot solve it by myself...i just ran out of ideas. So
here is what I want to do:
I take quotes of two indices - S&P500 and DJ. And my first aim is to
estimate coefficients of the DCC-GARCH model for them. This is how I do it:
library(tseries)
p1 = get.hist.quote(instrument =
2004 Apr 25
2
Yahoo bug in tseries::get.hist.quote and its::priceIts
Both get.hist.quote, and its derivative priceIts, rely on download.file() to
fetch financial data series from Yahoo! in .csv format. They allow for nice
interactive demonstrations of what one can do with R.
Unfortunately, both are currently broken as Yahoo! decided to add a somewhat
useless html comment at the end of the csv 'stream', breaking the regular
format of n rows with k columns.
2011 Nov 10
2
Error in axis ????
I did an update of both rstudio and my packages. I had some trouble but was
able to move a lot of the packages so most troubles seem to be behind me.
But having a problem with code that previously ran fine. See below:
require(quantmod)
Loading required package: quantmod
Loading required package: Defaults
Loading required package: xts
Loading required package: zoo
Attaching package: ?zoo?
The
2017 Jul 30
0
Kalman filter for a time series
> structSSM
Is no longer part of KFAS. All you needed to do was:
library(KFAS)
?KFAS
and you would have seen that if you went to the index. A structural state space model is now built up from its components, much like in LM. Look at;
?SSModel
-Roy
> On Jul 29, 2017, at 9:26 PM, Staff <rbertematti at gmail.com> wrote:
>
> I found an example at
>
2011 Sep 01
4
[PATCH] xen,credit1: Add variable timeslice
Add a xen command-line parameter, sched_credit_tslice_ms,
to set the timeslice of the credit1 scheduler.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
diff -r 4a4882df5649 -r 782284c5b1bc xen/common/sched_credit.c
--- a/xen/common/sched_credit.c Wed Aug 31 15:23:49 2011 +0100
+++ b/xen/common/sched_credit.c Thu Sep 01 16:29:50 2011 +0100
@@ -41,15 +41,9 @@
*/
#define