Displaying 20 results from an estimated 1000 matches similar to: "problem with looping formula through table"
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" ,
2008 Feb 08
2
Applying lm to data with combn
http://www.nabble.com/file/p15359204/test.data.csv
http://www.nabble.com/file/p15359204/test.data.csv test.data.csv
Hi,
I have used apply to have certian combinations, but when I try to use these
combinations I get the error
[Error in eval(expr, envir, enclos) : object "X.GDAXI" not found]. being a
novice I donot understand that after applying combination to the data I cant
access
2002 Jun 16
3
lm() function to get coefficients doesn`t work
Hi,
to get the residuals and coefficients I did the following:
kurse <- read.table("kurse.txt" header=T)
the data:
index bmw mru rwe vow kar sie bas
1 159,70 74,18 338,21 89,03 110,30 141,23 178,53 67,97
2 160,76 73,46 343,66 89,38 110,30 142,66 180,45 68,30
3 162,45 74,18 349,12 91,54 108,54 146,22 183,12 68,85
4 162,18 72,74 349,12 92,20 106,43 144,80 181,75
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 =
2008 Mar 15
1
feeding merge.zoo a vector containing the names of zoo objects?
Hi, the snippet of code below works, but I would like to know how to feed the
function merge.zoo the contents of
CADstocknames rather than having to hard code it into the merge.zoo command.
I think I must be missing something simple, but I cannot for the life of me
figure it out. Thanks in advance for any enlightenment offered.
library(zoo)
CADstocknames <-
2011 Jan 29
1
Basic Help with Zoo objects and trading days
All,
I have been just recently working with zoo objects for trading systems.
Can someone please help with these basic questions?
Given a daily time series downloaded using get.hist.quote() from the tseries
package, ie......
startDate= as.Date("2000-01-01")
endDate= as.Date("2011-01-29")
frequency= 'd'
s= get.hist.quote('IWF', start= startDate, end=
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 =
2009 Sep 07
1
Rmetrics: Problem with "align"
Hi there!
I'm stuck with a problem aligning financial timeseries and haven't found
a cue how to fix it...
When I run that simple script, everything goes well until the
"align"-command:
------
rm(list=ls())
x <- yahooSeries("^GDAXI")
head(x)
xAligned <- align(x = x, by = "1d", method = "before", include.weekends
= FALSE)
------
Here's
2013 Jul 30
1
[LLVMdev] Enabling the SLP-vectorizer by default for -O3
Nadav,
I ran some benchmarks and I'm seeing 3-6% performance loss on a few of them
when we use SLP on both O2 and O3 (with O3 having the biggest differences).
Unfortunately, my benchmarking is not scientific, so I can't vow for those
numbers, nor I'll have time to investigate it closer in the short term, but
I wouldn't be surprised if this is result of extra shuffles we were
2002 Jun 19
2
solve() doesn`t work
Hi,
I tried to inverse a matrix but it doesn`t work. I hope somebody can help
me. This is what I did.
> kurse <- read.table("kurse.txt", header=T, dec=",")
> x <- cbind(1,kurse[,-c(1)])
> y <- kurse$index
> t(x) %*% x
Error in t(x) %*% x : requires numeric matrix/vector arguments
> x <- as.matrix(x)
> xtxi <- solve(t(x) %*% x)
Error in
2007 Jul 26
1
Download multiple stock quotes in a loop
Hi all,
this should be a simple question, but I haven't been able to do it
right. I am trying to download multiple stock quotes in a loop, so that
every timeseries is safed with the symbol of the stock. Can anybody help
me out? Here's the code:
require(tseries)
startd <- "2000-06-01"
stocks <- c("bmw.de", "vow.de", "dte.de")
for(stock in
2010 Jun 08
1
Filtering out a data.frame
Sample Data.Frame format
Name is Returns.nodup
X id ticker date_ adjClose totret RankStk
427225 427225 00174410 AHS 2001-11-13 21.66 100 1235
"id" uniquely defines a row
What I am trying to do is filter out id's that have less than 1500 data
points (by date)
First, I used
total<-by(Returns.nodup, Returns.nodup$id,nrow)
which subsetted by
2012 Oct 11
7
kern.maxswzone is gone... what next?
Hi all.
I prefer to build all ports in /tmp, which is actually a tmpfs
filesystem. I have 8G partition. But when I tried to compile Apache
OpenOffice system starts shooting processes when I was near 6G of swap.
Oct 11 18:12:32 ar1l0u kernel: swap zone exhausted, increase kern.maxswzone
Oct 11 18:12:32 ar1l0u kernel: pid 1334 (java), uid 818, was killed: out
of swap space
Oct 11 18:12:32
2010 Dec 02
1
Downloading quote data from yahoo finance
Hi R users,
Thanks in advance.
I am using R 2.12.0 on Windows XP.
May I request you to assist me in the following please.
1. I am getting error while downloading quote data from yahoo finance.
The example code is below (taken from tseries help):
library(tseries)
con <- url("http://quote.yahoo.com")
if(!inherits(try(open(con), silent = TRUE), "try-error")) {
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 )
{
2010 Jun 09
3
Extracting Elements By Date
Dear R Gurus,
Thanks for any help in advance!
Date.frame: Returns.names
X id ticker date_ adjClose totret RankStk
258060 258060 13645T10 CP 2001-06-29 18.125 1877.758
My data frame is in the above format. I would like to filter by period, per
id (every 125 days) each consisting of 250 days, I.e. 1-250, 126-375, etc.
One important thing to note is that not all
2013 Jul 12
1
stable/9 fails to compile: kmem_alloc_contig bad definition
Hello.
/usr/local/libexec/ccache/world/cc -c -O -pipe -march=native -std=c99 -g
-Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef
-Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs
-fdiagnostics-show-option -Wno-error-tautological-compare
-Wno-error-empty-body -Wno-error-parentheses-equality -nostdinc
2012 Jul 24
1
9-STABLE (238719) compilation fails on i386
Hi all.
When building procstat I get this:
clang -O2 -pipe -march=athlon-xp -std=gnu99 -Qunused-arguments
-fstack-protector -Wsystem-headers -Wall -Wno-format-y2k -W
-Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes
-Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch
-Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline
-Wnested-externs
2011 Dec 17
0
time-varying parameters kalman filter estimation problem using FKF package
Dear R users,
I am trying to carry out MLE of the time-varying CAPM using the FKF package.
My approach so far has been to try and adapt the example given in the help
file found using ?fkf which demonstrates the MLE of an ARMA(2,1) model.
When I attempt to run my R code (given below) I get the following error:
Error in fkf(a0 = sp$a0, P0 = sp$P0, dt = sp$dt, ct = sp$ct, Tt = sp$Tt, :
Some of
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
>