Displaying 20 results from an estimated 1000 matches similar to: "apply on xts"
2012 Oct 29
2
find the Best-ticker
i need to find the best ticker from the group of some tickers.?
i also need to know on what basis we calculate the best ticker?
i have some idea about the if the risk rate low, or the market price
high we can say the ticker is best.
but i dont know is it true.
Anyone can help me .
Thank you
--
View this message in context:
2011 Dec 07
1
scatterplotting stock returns using quantmod and pairs()
I want to get data for a set of ticker symbols and compute the daily return of the adjusted close using quantmod, and then scatterplot returns using pairs().
The following gets data for the list of tickers:
tickers <- c("SHY","TLT","SPY","IWM","GLD","IEV","ILF","EWJ","EPP","SAF","ASA")
2011 Jan 19
1
Problem in using bdh function for Govt tickers
Hi, all
I wanted to fetch data from Bloomberg for govt bonds, and analyse it
further.
I am having trouble in getting data as when I use field=PX_LAST, it is
giving the prices but when I use field=CPN, or ISSUE_DT, it is not giving
the results and just bouncing back <NA> for that.
This is the piece of code:
> library(rJava)
Warning message:
package 'rJava' was built
2008 Sep 05
1
casting help please
I have a data.frame which I believe is melted already and am having
trouble casting it to 'wide' format.
It looks something like
> (x <- data.frame(ticker=c(rep("A",5),rep("B",6)), date=c(1:5, 1:6),
value=c(NA,100*exp(rnorm(10,0,.1)))))
> cast(x, date ~ ticker) # this does what I want with toy data
But when I use my real data frame
>
2009 Feb 03
1
Automatic creation of columns in zoo object
Hello, everyone
I have a question.
Assume I have the following zoo object:
me.la <- structure(c(1524.75, 1554.5, 1532.25, 1587.5, 1575.25, 1535.5,
1550, 1493.5, 1492.5, 1472.25, 1457.5, 1442.75, 1399, 1535.75,
1565.25, 1543.5, 1598.5, 1586.5, 1547, 1561.5, 1504.75, 1503.75,
1483.75, 1468.75, 1453.75, 1410, 1546.75, 1575.25, 1554, 1609,
1597.5, 1558.5, 1573, 1516.25, 1515.5, 1495, 1480, 1465,
2009 Jun 21
1
Need help installing xts package
Hi,
I am trying to install package xts. I am using OPENSUSE 11 64 bit. When I
invoke:
install.pacakges("xts",dependencies=T)
I received a lot of "ERROR: compilation failed for package" errors when R
tries to install xts dependencies. I do not understand this behavior.
I notice one thing. It complains.
ERROR: compilation failed for package 'Hmisc'
** Removing
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
>
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 Oct 30
3
Fast optimizer
Hi,
I'm using optim with box constraints to MLE on about 100 data points.
It goes quite slow even on 4GB machine. I'm wondering if R has any
faster implementation? Also, if I'd like to impose
equality/nonequality constraints on parameters, which package I should
use? Any help would be appreciated. Thank you.
rc
2000 Jul 07
1
reorganizing a data frame
Hi,
I have what I think is an easy question.
I have a data frame, called stockdata, of stock prices that looks like this:
date ticker close
1 01/02/1998 GE 24.667
2 01/05/1998 GE 25.104
3 01/06/1998 GE 24.771
4 01/07/1998 GE 24.979
5 01/08/1998 GE 24.750
6 01/02/1998 HIT 71.125
7 01/05/1998 HIT 72.313
2011 Jan 03
4
using "plot" with time series object - "axes = FALSE" option does not appear to work
Dear R-help,
I am attempting to plot data using standard R plot utilities. The
data was retrieved from FRED (St. Louis Federal Reserve) using the
package quantmod. My question is NOT about quantmod. While I
retrieve data using quantmod, I am not using its charting utility. I
have been having success using the standard R "plot" utilities to this
point with this type of data.
2009 Aug 30
2
aggregating irregular time series
Hi,
I have a couple of aggregation operations that I don't know how to
accomplish. Let me give an example. I have the following irregular
time series
time x
10:00:00.021 20
10:00:00.224 20
10:00:01.002 19
10:00:02:948 20
1) For each entry time, I'd like to get sum of x for the next 2
seconds
2013 Nov 06
1
Multiple String word replacements: Performance Issue
Dear experts,
I?ve been on this for weeks now, and couldn?t find a solution..Sorry for the long description. I figured I post many details, so you get the problem entirely, although it?s not hard to grasp.
**Situation:**
Data frame consisting of 4 million entries (total size: 250 MB). Two columns: `ID` and `TEXT`. Text strings are each up to 200 characters.
**Task:**
Preprocessing the text
2011 Apr 13
1
Assign with Paste Problem
Dear R Helpers,
I am trying to change the name of an object using the assign function.
When I use paste on the new object but not the old, everything is fine:
The new object is a direct copy of the old object. When I use a paste for
both the new and the old object, however, the new object is simply the
character representation of the old object name, not the old object
itself.
The example
2010 Aug 03
4
mixing strings and numeric doubles in an array
I have an array called "stocks" which contains numeric dates, ticker
symbols,prices, etc.
> stocks[1:3,]
DATE TICKER PERMNO EXCHCD TSYMBOL TRDSTAT SHROUT PRC
RET
1 19950131 EWST 10001 3 EWST A
2224 -7.75000 -0.031250
2 19950228 EWST 10001 3 EWST A
2224 7.54688 -0.026210
3 19950331 EWST
2011 Oct 07
2
Data frame aggregation
Hello,
Could anybody help me with this question?
Example data frame
NAME TICKER SHARES PERFORMANCE
John ABC 100 0.05
John ABC 1000 1.5
Alice EFG 20 0.3
Paul HIJ 50 1.0
Paul JKL 60 2.0
Paul MNO 12 3.0
I would like to aggregate this dataframe by
2012 Jul 07
1
Getting objects from quantmod ticker list
Hi all,
I would need to put datas downloaded with quantmod into a matrix or a data
frame.
Suppose to start from here:
*require(quantmod)
ticker.list <- c('AAA', 'ALTSALES', 'AMBNS', 'AMBSL', 'BAA', 'EMRATIO',
'FEDFUNDS', 'GASPRICE', 'GS1', 'GS10', 'GS20', 'LNS14100000', 'MORTG',
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
2004 Aug 09
1
error when calling debugger()
Hi,
I am getting an error message when I am trying to run the debugger() on
the last.dump. The debugger() stops after I make a selection. Could
someone please suggest what it might mean? The R log is included below.
This is R-1.8.1 on RH 7.3.
Thanks, Vadim
> load("last.dump.rda")
> debugger(last.dump)
Message: Error in split(x, f) : Group length is 0 but data length > 0
2011 Mar 23
1
using R variables in RMySQL query
I have the following function
myGetstockdataMySQL <- function(startdate, enddate, ticker) {
con <- dbConnect(MySQL(), user="blahblah", password="blahblah",
dbname="blahblah",
host="localhost")
rs <- dbGetQuery(con, "SELECT price.close FROM price INNER JOIN stocks ON
stocks.stock_id=price.stock_ID
WHERE (price.date_holding BETWEEN