Hi,
Just wondering for the SMA and EMA in package TTR, is it possible to me to
code it so that, say if I need to calculate SMA (x, n=100), when the sample
size is less than 100, it will give me the SMA (x, k) where k is the sample
size of the data? Right now it only gives me an invalid n error.
Hi all,
Say if I have a data table which consists of 4 column: itemID, location and
price, which location is a text field and itemID and location together forms
the primary keys.
when I tried to run setkey (DT, itemID, location), I got the following
message:
Error in setkey (DT, itemID,
Hi all,
I am just wondering if there is a more efficient way of merging two large
datasets based on the values of multiple columns, some of which are not
numerical.
The default merge function in dataframe is very inefficient and the merge
function in data.table seems to be faster, but it does
, 2010 at 11:11 PM, Anyi Zhu anyi@gmail.com wrote:
Hi all,
Thanks a lot for anyone's help in advance.
I am trying to find a way to compute the day-to-day return (log return)
from
a n x r matrix containing, n different stocks and price quotes over r
days.
The time series of prices
Hope this helps
a - matrix(runif(150),nrow=3,ncol=50)
p2r - function(x) 100 * diff(log(x))
t(apply(a,1,function(x){p2r(c(x))}))
On Mon, Jun 7, 2010 at 8:41 AM, Anyi Zhu anyi@gmail.com wrote:
Hi all,
Thanks a lot for anyone's help in advance.
I am trying to find a way to compute
Hi all,
Thanks a lot for anyone's help in advance.
I am trying to find a way to compute the day-to-day return (log return) from
a n x r matrix containing, n different stocks and price quotes over r days.
The time series of prices are already split by using unstack function.
For the
Hi,
I am a novice with R, so pardon me if the question is a piece of cake
to some of you.
Say if I have a stream of data consisting of 3 columns, 1st column is
birth date, 2nd is death date and third is weight for each individual.
My ultimate goal is to be able to compute the correlation of
7 matches
Mail list logo