[R-SIG-Finance] [PKG-UPDATE] New xts version 0.6-2

Cedrick Johnson cedrick.johnson at chicagotrading.com
Wed Dec 31 21:07:21 CET 2008


Jeff-

Loaded it up and ran a few scripts which utilizes xts a bit. Definitely
notice performance improvement when working with xts (converting data to
xts for use in other things)

I haven't looked at the memory use yet, but just wanted to say I have
noticed a difference.

Thanks for your work, happy new year!

-c

-----Original Message-----
From: r-sig-finance-bounces at stat.math.ethz.ch
[mailto:r-sig-finance-bounces at stat.math.ethz.ch] On Behalf Of Jeff Ryan
Sent: Wednesday, December 31, 2008 10:51 AM
To: jeff. ryan
Cc: R-SIG-Finance
Subject: [R-SIG-Finance] [PKG-UPDATE] New xts version 0.6-2

R-Finance Users:

I am pleased to announce the much changed extensible time-series
package 'xts', version 0.6-2, has made its way to CRAN.

This update represents a major refactoring, as well as some dramatic
improvements in both speed and memory usage.

These updates make xts faster and more memory efficient than most
common time-series classes available in R, and on par with native
atomic types, yet with all the functionality of xts/zoo.

MAJOR CHANGES

* A rewrite of all internal functionality to utilize custom C code for
most low-level operations.  The result is a 30-10,000 times gain in
speed and memory improvements 2-3x that of most other time-series
classes, including base tools.  Full xts functionality is now
available at the same cost as dealing with atomic classes.

* Binary search for time-based indexing.  Inspired by the improvements
Matt Dowle's data.table make over standard linear searching.  The
result is nearly instant time-based subsetting, regardless of original
data size --- 10 thousand or 100 million observations are equally
fast, linear cost with respect to the resulting subset size. [
limiting factor is the copy ]

* C level code (~3300 lines) offers data handling (merge, cbind,
rbind) that makes use of inherent (required) order in time-series
data.  Optimal computation and memory usage.  Additional C code for
lag, diff, subsetting, Ops, and more.

All indexes are now stored internally as (sub)seconds since the epoch.
 User's can still create and use any of the available time-classes, as
internal conversion hides this level of detail.


MINOR CHANGES

* New xts specific methods for cbind/rbind/lag/diff.
* fts time-series as/reclass tools.
* endpoints (and those functions that use) now handles microseconds
and milliseconds.
* Reclass tool updated for better matching of argument.
* reclass now fails gracefully.

NEW ZOO COMPATIBILITY

* Global option to force lag.xts to match behavior or lag.zoo. [
options(xts.compat.zoo.lag=TRUE) ]
* Now handles zero-width xts objects like zoo (no data, just an index).
* Empty xts objects can be created like zoo does, by calling xts().


NEW FEATURES
merge gains 3 new arguments:
  *join*  ---  Maps to *all* argument, 'left', 'right', 'inner',
'outer', corresponding to database operations
  *retclass*  --- option to return merged object of different class,
or no class.
  *retside*  --- return only left or right side of merged object (2-case
only)

At present xts loses the ability to pass a vector of logicals to all=
as zoo can.
See example(merge.xts) for a workaround.


C API/Development
Now able to link packages directly to certain C function in xts, to
allow for direct C-level use. More are being added, as well as
documented.  A working example is included in the package directory in
the 'api_example' directory.

New index tools to efficiently convert index to component data:
 [1] ".index"      ".index<-"    ".indexDate"  ".indexday"
".indexhour"
 [6] ".indexisdst" ".indexmday"  ".indexmin"   ".indexmon"   ".indexsec"
[11] ".indexwday"  ".indexweek"  ".indexyday"  ".indexyear"

indexFormat(x) allows for printing to match user preferences.

New methods:
as.logical.xts(x, drop=TRUE, ...)
as.double.xts(x, drop=TRUE, ...)
as.complex.xts(x, drop=TRUE, ...)
as.integer.xts(x, drop=TRUE, ...)
Where 'drop=FALSE' recreates the xts object with the coredata
converted to the new type, as storage.mode(x)<- would do.

POSSIBLE ISSUES

Calling attr(x, 'index') will return the POSIX seconds, and _not_ the
expected index class.  index(x) behaves as expected, but code making
use of the former direct access function will cause failure/unexpected
results.

merge/cbind created column names may be inconsistent with column names
created with similar zoo functions.

Certain atomic classes may not work for all xts functions.  Integers
and doubles/numerics have been tested and used in production prior to
release.  Less tested are complex, character objects, and lists.

Please report any inconsistencies/errors/bugs to myself, and I will
address promptly.

Thank you,
Jeff
-- 
Jeffrey Ryan
jeffrey.ryan at insightalgo.com

ia: insight algorithmics
www.insightalgo.com

_______________________________________________
R-SIG-Finance at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.





This message is intended only for the personal and confidential use of the recipients named above. If the reader of this email is not the intended recipient, you have received this email in error and any review, dissemination, distribution or copying is strictly prohibited. If you have received this email in error, please notify the sender immediately by return email and permanently delete the copy you received. 

This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. CTC Holdings nor any affiliates ("CTC") are responsible for any recommendation, solicitation, offer or agreement or any information about any transaction, customer account or account activity that may be attached to or contained in this communication. CTC accepts no liability for any content contained in the email, or any errors or omissions arising as a result of e-mail transmission. Any opinions contained in this email constitute the sender's best judgment at this time and are subject to change without notice. 



More information about the R-SIG-Finance mailing list