Monthly Archives: July 2012

Will Microsoft OpenTech put Redis into #1 status for in memory NOSQL database? For Linux, Window, and Mac OS X?

Wow! I almost crapped my pants when I read these links:

http://www.zdnet.com/blog/microsoft/microsoft-makes-improvements-to-redis-on-windows-in-memory-database/12563
http://stackoverflow.com/questions/6476945/how-do-i-run-redis-on-windows
https://github.com/rgl/redis/downloads  <–best download
http://blogs.msdn.com/b/interoperability/archive/2012/04/26/here-s-to-the-first-release-from-ms-open-tech-redis-on-windows.aspx
https://github.com/MSOpenTech/Redis

The amazing thing is Microsoft Azure is now the #1 division within Microsoft thanks to their new adoption of the open source languages like Python, Java, Ruby, PHP, etc. Now they want to move into NOSQL databases like Redis. This is big.

Anyhow, I tried getting MongoDB running on a multiplatform within a cluster. What a nitemare thanks to the very primitive documentation. It was rendered useless! As you know, I am now able to see my $100K saving as I switch from Matlab to R. It was so easy to do with Redis for Windows. Compared to MongoDB with a clusters was well useless. Junk. Dead on arrival compared to Redis.Well at least compared to my needs.

As with Redis available for Windows, it can be instantly installed as a service which makes it very easy to start. The GitHub.com link will get you there. I was able to connect into the Redit repository so simply with doRedis.R package.

Watch this Youtube at this link to learn more: http://bigcomputing.com/doredis.html

For clustering and parallelization from R’s perspective is so simple. Scary simple. Compare to MongoDB. Ugly as hell.I can say without hesitation, this is the best stack to go with or my needs. No more wasted days with MongoDB and MYSQL. Too bad they don’t understand how to properly document compared to doRedis and the Redis comminity. I can now move forward onto other steps without worrying about broken stuff from the other options I thought I had to tackle!

I can assure you my Premium membership would expext nothing less of me to deliver. Also, as Borat would say. Very nice!

As in the Youtube video, register your subsequent doRedis R jobs in the host Redis but doing within your secondary R environment: redisWorker(host=’192.168.1.10′,queue=’jobs’) where you register to the host id with the queue being run.

[youtube_sc url=”http://www.youtube.com/watch?v=RtbAk-n-tqM” title=”NOSQL%20Redis%20on%20Windows%20and%20Linux%20clusterto%20parallelize%20with%20R%20and%20doRedis%20package”]

 

 

 

For R connectivity, using NOSQL options for clustering and parallelization using Redis, Cassandra, Couch, MongoDB, MYSQL, Hadoop with HBase

For R connectivity, using NOSQL options for clustering and parallelization using Redis, Cassandra, Couch, MongoDB, MYSQL, Hadoop with HBase

I have a completed my R source code walkthroughs of 14 popular forecasting models for my membership. Now I focus on my cluster to speed up the simulations of the algos. As a result, it always comes down to how R talks to the popular NOSQL options out there. It seems I have narrowed it down to MongoDB and Redis. There are really not decent client R code examples for Hadoop, Couch, or Cassandra. Here are some links that making me lean towards Redis.
http://stackoverflow.com/questions/10696463/mongodb-with-redis

Comparing MongoDB and Redis, Part 1

http://openmymind.net/2011/5/8/Practical-NoSQL-Solving-a-Real-Problem-w-Mongo-Red/

http://www.quora.com/What-are-the-advantages-and-disadvantages-of-using-MongoDB-vs-CouchDB-vs-Cassandra-vs-Redis

http://java.dzone.com/articles/should-i-use-mongodb-couchdb

http://stackoverflow.com/questions/5252577/how-much-faster-is-redis-than-mongodb

Plus the client coding examples for Redis is much more helpful.

Update: It looks like I am going with MongoDB as I have 3 32 bit Macs. There is a limitation of 2 gb with Mongo but at least they can be used. MYSQL does not support older versions of OSX as well Redis is really Linux only. Too bad on the Redis side because it looked awesome!

 

Open R package query? Is Open Gamma a FREE R package for Risk Management and Front Office applications?

Open R package query? Is Open Gamma a FREE R package for Risk Management and Front Office applications? 
Is Open Gamma a FREE R package for Risk Management and Front Office applications? 
Is this it?
http://developers.opengamma.com/downloads/platform-1.0.0On 2012-07-23 04:32, Ratanlal Mahanta wrote:

Hi Bryan, Hope you are doing Well. I have a query How to install “Open Gamma” Package In R.am I looking a link to download the “Open Gamma” Package in R. Looking forward from You. Regards

I just posted possibly links to connect a R model or algo into Metatrader forex trading platform for order and execution

I just posted possibly links to connect a R model or algo into Metatrader forex trading platform for order and execution

Go here:

http://quantlabs.net/blog/2012/07/here-are-some-options-for-those-that-want-to-bridge-r-and-a-metatrader-mql-if-that-is-their-preferred-forex-trading-platform/

Anyone know R, RStudio, RBG package, or RBloomberg package to help out

 

Anyone know R, RStudio, RBG package, or RBloomberg package to help out

Get in touch me if you can help this guys out.

I live in NYC area. I recently got interested in trying out R for some of quant-financial projects.  I have used Matlab before.   I don’t think I can make it to the physical meetup, but I definitely to join the virtual one.

 

One of the things for newbies in R like me is where to get user-specific help.  In my case, I am stumped by not being able to get RBbg working in RStudio, despite having installed the latest R and RBbg package on my Windows 7 machine.   I tried posting on stackoverflow.com, but unsurprisingly it is not of interest to other people since it seems to be a specific problem for my setup.  I am happy to pay some money for someone to debug this for me.   I contacted Revolution Analytics, but the firm focused on big consulting type of projects.    I wonder  if you know of resources that may address my needs.  Perhaps this will be a possible topic for the webinar.

 

 

Warning! Certain R packages may run not on Windows with as RCPP may be dependency. Would like a complete list?

Warning! Certain R packages may run not on Windows with as RCPP may be dependency. Would like a complete list?

As I am new to R using a mixed environment of Windows and Linux like Ubuntu or CentOS, I am finding certain R packages will not install properly on Windows. As I I really like RStudio because of its simplicity to install R packages, I get some strange messages of certain packages that do not load properly due to the so-called current version of R cannot be installed. I am using 2.1.5 but may have found a solution.

What is the solution?

That same R package that gives you install problems on Windows may actually work within an Linux environment. As a result, it could be the R package maybe the result of using RCpp as a dependency. I have even seen certain R packages get built or compiled during the install process. It seems RCpp is used which needs a local version of GCC to build. GCC is a GNU C/C++ compiler for Linux or Unix.  As a result, if you are using Windows, you will most likely not have GCC installed on your Windows desktop.

What to do?
You really have two choices:

  1. Build a Linux virtual machine on a virtualization environment appliance like VMWare or free Oracle Sun Virtual Box. If you go for Virtual Box, everything is free. Nice! There is lots of opening YouTube videos on how to do this so I won’t go there. Also, don’t forget to install your GCC with an ‘appt-get install gcc’ or ‘yum install gcc’ depending your Linux flavor. Again, you can easily find loads of YouTube videos on how to do this.
  2. Your other choice is something I am not a fan of but nevertheless you should know about. If you are not a fan of Linux, you can always load MINGW onto Windows and then separately install GCC. Again, I have verified there are so many YouTube videos showing how to do this.

 

I know this could be a pain for some but this is why I really like RStudio which makes my R experience so much better.

 

I am also looking for anyone who has experienced any R packages that need to be locally compiled with GCC, can you please leave a comment on your experience and which R package? It makes everyone’s life so much easier if can be compiled into one area.

Thanks for that!

P.S. You may want to know about our upcoming presentations in R topics at my R/Matlab Meetup for Financial specialists!

 

Are you a professional R user seeking to create and improve upon profitable financial forecasting models and algorithms?

 

Are you a professional R user seeking to create and improve upon profitable financial forecasting models and algorithms?

 

If that’s you, I’m running a survey right now which addresses your interests.

 

You see, I’m currently preparing video tutorial walkthroughs for various model types. Included on my “to do” list (or already done) are the following:

 

Garch

 

Arima

 

Arma

 

PCA

 

Markov chain or mcmc

 

CAPM

 

Autoregressive (AR)

 

Bayesian

 

Event arbitrage

 

Market inefficiency

 

Mape

 

Mean reversion

 

Moving average

 

Is there anything missing from that list within this survey?

 

As you’ve probably noticed, the current list features popular models which are rather “vanilla” or academic. They’re almost certainly being tweaked in highly proprietary ways by bank prop desks, hedge funds, and similar institutions in the real world.

 

But the essential bits and pieces are there (mostly). I’ve only encountered difficulty finding R source code example tutorials for PCA and Markov. Probably because few people have used them in quant financial modeling up until now! If you know differently, I’d appreciate hearing about it.

 

Other facts of note I’ve uncovered during my search include the reality that you can accelerate single threaded R execution by blending in other languages. C++ for example is often used in conjunction with great R packages like Rcpp or Rinside.

 

Parallelization and NOsql database solutions also accelerate simulations and calculations. There’s even other uses like GPU, FPGA, and Cuda. The flexibility seems endless.

 

But I digress. My primary goal with this survey is to discover what models R users and developers are using for their own research. This helps me, but also you too. You’ll have access to the survey results, after all.

 

I’ll even be incorporating the results of this survey in terms of what to present for my new R Matlab User group.

 

Here is a Youtube Video Series on How to Write Fast R Code

Here is a Youtube Video Series on How to Write Fast R Code

One of my Quant Finance Meetup members, Alon, has put up two videos in a series about speeding up the execution of R. It was a presentation he did a few months ago to the group. Thanks to him for these videos and presenting.

This is an instructional video on increasing the speed with which R code is executing. It is mostly related to tricks in the R syntax that substantially decrease the time it takes for R to execute code.  There are 12 different tricks in the tutorial to increasing the efficiency of your code. Specific replicable examples are given so that you can try them at home. The neatest thing about these techniques is that they do not require any additional tools beyond the standard R Build. I have decreased the time it takes for a complex simulation from 15 minutes to less than 2 without using any compiled languages!!!

[youtube_sc url=”http://www.youtube.com/watch?v=d6cDjY6lfgI” playlist=”r fast code”]

[youtube_sc url=”http://www.youtube.com/watch?v=CDvf5Wzw584″ playlist=”r fast code part 2″]