Version 1.0.9 Release Details

Home | Bitbucket | Example | Commits | Javadocs

Download the R Package for the Thomson Reuters Elektron Platform

RTN.NBA.NVZ.NDBKGn.DECS.N

Click below for more information

For R Project Users

The R Package offers functions for querying historic timeseries and real-time market price data from the Thomson Reuters Elektron Platform.

TRI.NMSFT.OGOOG.OAMZN.O
options(
    CDATAFEED_JARS=list(
        "C:/.../rfa-8.0.1.E3.jar"
    )
)
install.packages(
    "C:/.../cdatafeedtrep_1.0.9.tar.gz",
    repos=NULL,
    type="source",
    INSTALL_opts=c("--no-multiarch")
)

Historic Time Series

library(cdatafeedtrep)
Initialize()
cdatafeedtrep::Login(Sys.getenv(DACS_ID))
result <- GetTimeSeriesDataFor(symbol = "GOOG.O", period="monthly")
tempDF <- data.frame(DATE=unlist(result$DATE),OPEN=unlist(result$OPEN))
tempDF <- tempDF[order(tempDF$DATE),]
tempDF$DATE <- as.POSIXct(as.numeric(substr(x = as.character(tempDF$DATE), start=1, stop=10)), origin="1970-01-01", tz="GMT")
tempDF$OPEN <- as.numeric(as.character(tempDF$OPEN))
plot(tempDF, type="l")

Market Price Example

cdatafeedtrep::QueryMarketPrice(symbols = c("MSFT.O", "ORCL.O", "GOOG.O", "ILMN.O", "TRI.N"))

while (TRUE) {
    nextUpdate <- cdatafeedtrep::GetNextMarketPriceUpdate()
    print(nextUpdate)
}

Market By Price Example

Note that for the following example, nextUpdate is a reference to a Java object.

cdatafeedtrep::QueryMarketByPrice(symbols = c("MSFT.O", "ORCL.O", "GOOG.O", "ILMN.O", "TRI.N", "DBSM.SI"))

while (TRUE) {
    nextUpdate <- cdatafeedtrep::GetNextMarketByPriceUpdateAsJavaObject()
    print(nextUpdate)
}

Market By Order Example

cdatafeedtrep::QueryMarketByOrder(symbols = c("MSFT.O", "ORCL.O", "GOOG.O", "ILMN.O", "TRI.N", "DBSM.SI"))

while (TRUE) {
    nextUpdate <- cdatafeedtrep::GetNextMarketByOrderUpdateAsJavaObject()
    print(nextUpdate)
}

Market Maker Example

cdatafeedtrep::QueryMarketMaker(symbols = c("MSFT.O", "ORCL.O", "GOOG.O", "ILMN.O", "TRI.N"))

while (TRUE) {
    nextUpdate <- cdatafeedtrep::GetNextMarketMakerUpdateAsJavaObject()
    print(nextUpdate)
}

Performance Testing

The following table contains the JConsole performance metrics collected during ~19 hours of execution time for the example R script below.

OverviewVM SummaryMemoryThreadsMessages AddedClasses

R Package Example Script With 100 RICs

library(cdatafeedtrep)
Initialize()
cdatafeedtrep::Login("redacted")

rics <- c(
    "LCOc1",
    "GOOG.O",
    "MSFT.O",
    "ODFL.OQ",
    "LKQ.OQ",
    "MDVN.OQ",
    "BFb.N",
    "KO.N",
    ".TRXFLDAFPUM11",
    "SWM.N",
    "ERICb.F",
    "ERICb.DE",
    "ERICb.D",
    "ERICb.BE",
    "ERICa.ST",
    "ERICa.F",
    "ERICa.DE",
    "ERICa.BE",
    "ERIC.PH",
    "ERIC.P",
    "ERIC.OQ",
    "ERIC.MW",
    "ERIC.DF",
    "ERIC.C",
    "ERIC.A",
    "DRICqf.BO",
    "BRIC.S",
    "BRIC.MI",
    "BRIC.AS",
    "ARIC.F",
    ".VBRICUTR",
    "ERIC.O",
    "RIC.A",
    "ARIC.BO",
    "BRIC.L",
    "DRIC.BO",
    "AAT.N",
    "ABX.N",
    "ACAS.O",
    "ACC.N",
    "ADGE.A",
    "AEL.N",
    "AEO.N",
    "AEP.N",
    "AFA.N",
    "AFG.N",
    "AFW.N",
    "AGM.N",
    "AGMa.N",
    "AGNC.O",
    "AGNCP.O",
    "AIG.N",
    "ALN.A",
    "AM.N",
    "AMID.N",
    "AMNB.O",
    "AMOV.O",
    "AMRB.O",
    "AMS.A",
    "AMSC.O",
    "AMSWA.O",
    "AMT.N",
    "AMWD.O",
    "AMX.N",
    "ANAT.O",
    "APEI.O",
    "ARC.N",
    "ARII.O",
    "ANAT.O",
    "APEI.O",
    "ARC.N",
    "ARII.O",
    "ARL.N",
    "ASEI.O",
    "ATAX.O",
    "AVD.N",
    ".DAXBRIC",
    ".DAXBRICGB",
    ".DAXBRICGBN",
    ".DAXBRICGBP",
    ".TRXFLDAFPU",
    ".TRXFLDAFPUMAT",
    "ACIDq.L",
    "ALU.TI",
    "A8H.F",
    "A5J.F",
    "ARNR.L",
    "BZR.BE",
    "ABCA.L",
    "CXS.F",
    "CAGR.MI",
    "ACCI.L",
    "ATHCO.CY",
    "QA9.F",
    "ECT.AS",
    "ACTG.CY",
    "AA4.F",
    "AA4.MI",
    "ADML.L",
    "ALLD.F"
)

Query(symbols = rics)

while (TRUE) {
    nextUpdate <- cdatafeedtrep::GetNextUpdate()
}

For Java Developers

Maven Central Details:

Group: com.coherentlogic.coherent.datafeed.client
Modules:

coherent-datafeed-client-{core, example}
coherent-datafeed-{db-int, jms-int, spark-int (pending)}

Version: 1.0.9-RELEASE

MSFT.O & AMZN.OGBP/USD Spot Rate

Version 1.0.9 includes implementations for the following services:

- Authentication
- Directory
- Dictionary
- Market Price
- Market by Order
- Market by Price
- Market Maker
- Historic Time Series Data

Example

A complete and working example can be found here.

Performance Testing

Please find an example application here, which was used for the performance test, below.

Note that when running the example application, an RFA session entry with the name "mySession" must exist in your configuration OR you must override this value -- see here for an example of the configuration we use. You may override this value using the following VM parameter: -DCDATAFEED_SESSION_NAME="yourSession"

OverviewThreadsVM SummaryMemory

The framework includes the JAMon performance interceptor and can be configured to track performance statistics. In the examples below we have the performance interceptor applied to the EventDrivenEndpoint's processEvent method, which is the point by which the RFA API connects with our framework in order to process incoming messages.

JAMon Label=performanceMonitorService, Units=ms.: (LastValue=2.0, Hits=3606222.0, Avg=1.0194796659773027, Total=3676470.0, Min=0.0, Max=6739.0, Active=0.0, Avg Active=1.0, Max Active=1.0, First Access=Fri Aug 05 09:19:38 EDT 2016, Last Access=Fri Aug 05 15:55:49 EDT 2016)

These tests require Java 8 and were run on a Dell Precision T7500 with an Intel Xeon CPU (E5645 @ 2.40GHz) with 24GB of memory and Windows 7 64-bit operating system.

If you have questions about this product or need more information, feel free to send us an email.

Github Tree Master


Dependencies (Required for both R Package / Java API)

RFA version 8.0.1.E3.all, which can be found here, is not open-source and must be acquired from Thomson Reuters directly.

Maven users can install the dependency as follows:

mvn install:install-file -Dfile=./rfa.jar -DgroupId=com.reuters -DartifactId=rfa -Dversion=8.0.1.E3.all -Dpackaging=jar

This dependency is required for both the R Package and the Java API.


Be Advised

This framework uses the Google Analytics Measurement API (GAM) to track framework usage information. As this software is open-source, you are welcomed to review our use of GAM -- please see the class named com.coherentlogic.coherent.datafeed.services.GoogleAnalyticsMeasurementService and feel free to send us an email if you have further questions.

We do NOT recommend disabling this feature however we offer the option below, just add the following VM parameter and tracking will be disabled:

-DGOOGLE_ANALYTICS_TRACKING=false