Advantages of R in high frequency trading with Redis NOSQL, doRedis, dot NET C# HFT on Linux and Windows

(Last Updated On: May 23, 2012)

Advantages of R in high frequency trading with Redis NOSQL, doRedis, dot NET C# HFT on Linux and Windows

I talk about the advantages of this stack for an High Frequency Trading environment. This of couse includes the advantages of R over something like Matlab.

[youtube_sc url=”9QsWeqwyxa0″ playlist=”HFT with Redis NOSQL, R doRedis dot NET C Sharp trading platform on Linux and Windows ” title=”HFT%20with%20Redis%20NOSQL,%20R%20doRedis%20dot%20NET%20C%20Sharp%20trading%20platform%20on%20Linux%20and%20Windows%20″]

Here is an example doRedis R interation in RStudio with a remote Redis server:

registerDoRedis(queue=’jobs’,host=”192.168.2.15″,port=6379)
> library(‘doRedis’)
Loading required package: rredis
Loading required package: foreach
foreach: simple, scalable parallel programming from Revolution Analytics
Use Revolution R for scalability, fault tolerance and more.
http://www.revolutionanalytics.com
Loading required package: iterators
> registerDoRedis(‘jobs’)

> registerDoRedis(‘jobs’,’92.168.2.15′,’6379′)

> registerDoRedis(queue=’jobs’,host=’92.168.2.15′,port=’6379′)

> registerDoRedis(queue=’jobs’,host=’192.168.2.15′,port=’6379′)
> startLocalWorkers(n=2,queue=’jobs’,host=’192.168.2.15′,port=’6379′)
> removeQueue(‘jobs’)
[1] TRUE
> startLocalWorkers(n=2,queue=’jobs’,host=’192.168.2.15′,port=’6379′)
> startLocalWorkers(n=2,queue=’jobs’,host=’192.168.2.15′,port=’6379′)
> removeQueue(‘jobs’)
[1] TRUE
> startLocalWorkers(n=2,queue=’jobs’,host=’192.168.2.15′,port=’6379′)
> foreach(icount(10),.combine=sum,.multicombine=TRUE,.inorder=FALSE) %dopar% 4*sum((runif(1000000)^2 + runif(1000000)^2)<1)/10000000
[1] 3.141388

From http://cran.r-project.org/web/packages/doRedis/vignettes/doRedis.pdf

This entry was posted in R and tagged , , , , , , , , , , on by .

About Bryan D

I am part of a company called QuantLabs.Net This is specifically a company with a high profile blog about technology, trading, financial, investment, quant, etc. It posts things on how to do job interviews with large companies like Morgan Stanley, Bloomberg, Citibank, and IBM. It also posts different unique tips and tricks on Java, C++, or C programming. It posts about different techniques in learning about Matlab and building models or strategies. There is a lot here if you are into venturing into the financial world like quant or technical analysis. It also discusses the future generation of trading and programming Specialties:C++, Java, C#, quant, models, strategies, technical analysis, linux, windows