[R-SIG-Finance] Comparing pvalues in ADF test in Gretl fUnitroots and Eviews

2012-09-15 Thread JOSE FRANCISCO PERLES RIBES
Thanks Stefan for your reply and your recommendation, I have read it yet and its very interesting. But investigating a more litle, I have found that the difference is due that Gretl uses the asymptotic critical value of MacKinnon (1996) and Eviews and fUnitRoots R-Package gives the critical value o

[R-SIG-Finance] Aggregating tick-by-tick data to seconds

2012-09-15 Thread Costas Vorlow
Hello, I have the following data (xts) (last two columns refer to up and down volumes). > head(test,20) [,1] [,2] [,3] 2012-09-12 16:30:00 144.39 3000 2012-09-12 16:30:00 144.39 5000 2012-09-12 16:30:00 144.39 3000 2012-09-12 16:30:00 144.39 4000 2012-09-

Re: [R-SIG-Finance] Aggregating tick-by-tick data to seconds

2012-09-15 Thread R. Michael Weylandt
If you have a column labelled "Volume", to.period will sum it: e.g., library(xts) data(sample_matrix) s <- as.xts(sample_matrix) s <- cbind(s, Volume = round(exp(runif(NROW(s),2,3))*1)) head(s) head(to.weekly(s)) Cheers, Michael On Sat, Sep 15, 2012 at 4:57 PM, Costas Vorlow wrote: > Hel

Re: [R-SIG-Finance] Aggregating tick-by-tick data to seconds

2012-09-15 Thread G See
You can use `period.apply` (along with `endpoints()`) to apply any function you like over non-overlapping time periods. In this case, you want to sum columns 2 and 3 separately, so use `period.apply()` with `FUN=colSums` on just the 2nd and 3rd columns. period.apply(test[, 2:3], endpoints(tes

Re: [R-SIG-Finance] Aggregating tick-by-tick data to seconds

2012-09-15 Thread Jeff Ryan
?period.sum HTH Jeff Jeffrey Ryan|Founder|jeffrey.r...@lemnica.com www.lemnica.com On Sep 15, 2012, at 10:57 AM, Costas Vorlow wrote: > Hello, > > I have the following data (xts) (last two columns refer to up and down > volumes). > >> head(test,20) > [,

[R-SIG-Finance] Any R api's available to do modelling with MM algos or portfolio weights?

2012-09-15 Thread Pie T
Hi - I would like to model following scenarios for my past trades and wondering if there are any R APIs already available in blotter (or another R package). If not can you please advise on how you as an experienced Quant/R programmer would do it. If you can include a code fragment (or a link to a s

Re: [R-SIG-Finance] Help with getSymbols from csv data file

2012-09-15 Thread Jim Green
On 27 January 2012 20:58, Joshua Ulrich wrote: > Hi Jun, > > Specifying the date format via setSymbolLookup fixes it. I'm not sure > if there is a more general solution. > > setSymbolLookup(test=list(src="csv",format="%Y-%m-%d")) > getSymbols('test',src='csv') I had the same problem, it seems t