Pricing options on multiple assets (part 1) with trees

June 19, 2012
By
Pricing options on multiple assets (part 1) with trees

I am a big fan of trees. It is a very nice way to see how financial pricing works, for derivatives. An with a matrix-based language (R for instance), it is extremely simple to compute almost everything. Even multiple assets options. Let us see how ...

Read more »

Notes from A Recent Spatial R Class I Gave

June 19, 2012
By

Below is a link to a pdf (compiled with the amazing knitr package) and some accompanying data for a recent short course I gave on basic spatial data import/analysis/visualization in R. The class was only two hours and some of the participants were bein...

Read more »

Notes from A Recent Spatial R Class I Gave

June 19, 2012
By

Below is a link to a pdf (compiled with the amazing knitr package) and some accompanying data for a recent short course I gave on basic spatial data import/analysis/visualization in R. The class was only two hours and some of the participants were bein...

Read more »

Time Series Data Library now on DataMarket

June 19, 2012
By

The Time Series Data Library is a collection of about 800 time series that I have maintained since about 1992, and hosted on my personal website. It includes data from a lot of time series textbooks, as well as many other series that I’ve either collected for student projects or helpful people have sent to me. I’ve now moved...

Read more »

Correction to intergraph update

June 19, 2012
By

It turned out that I wrote the last post on “intergraph” package too hastily. After some feedback from CRAN maintainers and deliberation I decided to release the updated version of the “intergraph” package under the  original name (so no new package “intergraph0″) with version number 1.2. This version relies on legacy “igraph” version 0.5, which

Read more »

CIO.com: R is a Big Data open-source technology to watch

June 19, 2012
By

CIO.com recently published its list of 9 open-source technologies to watch. Hadoop is first on the list, and second up is the R Project: R is an open source programming language and software environment designed for statistical computing and visualization. R was designed by Ross Ihaka and Robert Gentleman at the University of Auckland, New Zealand beginning in 1993...

Read more »

A wrapper for R’s data() function

June 19, 2012
By

The workflow for statistical analyses is discussed at several places. Often, it is recommended:never change the raw data, but transform it, keep your analysis reproducible, separate functions and data, use R package system as organizing structure. In some recent projects I tried an S4 class approach for this workflow, which I want to present and discuss. It makes use of...

Read more »

Where are the Fat Tails?

June 19, 2012
By
Where are the Fat Tails?

In Crazy RUT, I started to explore why the moving average strategy has failed for the last 2 decades on the Russell 2000.  I still do not have an answer, but I thought looking at skewness and kurtosis might help explain some of the challenge of be...

Read more »

google R style guide

June 19, 2012
By

After writing several hundreds of lines of R codes, I start to pay some attention to my coding style. Fortunately, I find a document about R style guide in google code. Surprisingly, R is among the most popular programming languages, such as C++, objective-C, python, java and html. I didn’t realize … Continue reading →

Read more »

For those interested in knitr with Rmarkdown to beamer slides

June 19, 2012
By

Seeing as more people were interested in how I created my slides for the R conference than what was actually on them, I posted my source and commands to github. I used knitr with Rmarkdown source to convert to markdown that went into pandoc to create beamer slide. Enjoy! https://gist.github.com/2955183

Read more »

A Wrapper Function for Instant Package Installation / Loading

June 19, 2012
By

Since library() and require() only accept input with length(input) = 1 it is necessary to make repeated calls - this can be quite annoying.. So, HERE is a little wrapper function for convenient package installation / loading. It installs packages if th...

Read more »

Generate simple HTML slides using deck.js and markdown

June 19, 2012
By

RStudio and knitr are an excellent conbination for generating dynamic reports. But in this blog, I will show you how to generate HTML-style presentaion using R only. OK, I confess that we still need something else: deck.js and markdown and R.utils. ...

Read more »

Don’t recycle me!

June 19, 2012
By
Don’t recycle me!

For me, one of the most annoying features of R is that by default, rbind,  cbind  and data.frame recycle the shorter vector to the length of the longer vector. I still don’t understand why the standard generics don’t have a parameter like cbind(1:10, 1:5, fill = TRUE) to fill up with ‘NA’s. There may be

Read more »

Dynamical systems in R with simecol

June 18, 2012
By
Dynamical systems in R with simecol

This evening I will talk about Dynamical systems in R with simecol at the LondonR meeting. Thanks to the work by Thomas Petzoldt, Karsten Rinke, Karline Soetaert and R. Woodrow Setzer it is really straight forward to model and analyse dynamical systems...

Read more »

June 20: See the new features of Revolution R Enterprise 6

June 18, 2012
By

A quick heads-up that I'll be hosting a live webinar this Wednesday (June 20) with my colleage Sue Ranney on the new Revolution R Enterprise 6. If you've never taken a look at Revolution R Enterprise and want to know it's different from open-source R, or just want to learn about the new features, then please join us on...

Read more »

Overplotting solution for black-and-white graphics

June 18, 2012
By
Overplotting solution for black-and-white graphics

I'm working on producing some black and white graphics of data which has a lot of overplotting. There are three basic groups, which if I made the plot in ordinary full color ggplot2 would look like this (the code for the reverse-log x-axis is available...

Read more »

Date of death, birthday and Elvis Presley

June 18, 2012
By
Date of death, birthday and Elvis Presley

10 days ago, a study published on http://www.annalsofepidemiology.org/ mentioned that "Death has a preference for birthdays" (as claimed in the title). The conclusion of the paper is that, in general, birthdays do not evoke a postponement mechanism...

Read more »

[R-pkgs] igraph 0.6 released

June 18, 2012
By

Dear All, we have released version 0.6 of the igraph package today. This is a major new version, with a lot of new features, and (sadly) it is not completely compatible with code that was written for the previous igraph versions. (See “Major new features” below for details.) I have included below a list of (bigger) changes. Please see...

Read more »

Tracking US Sentiments Over Time In Wikileaks

June 18, 2012
By
Tracking US Sentiments Over Time In Wikileaks

Introduction I recently posted about using the Wikileaks cable corpus to find word use patterns, both over time, and in secret cables vs unclassified cables. I received a lot of good suggestions for further topics to pursue with the corpus, and probably the most interesting was the idea to do sentiment analysis over time on a variety of...

Read more »

Tracking US Sentiments Over Time In Wikileaks

June 18, 2012
By
Tracking US Sentiments Over Time In Wikileaks

Introduction I recently posted about using the Wikileaks cable corpus to find word use patterns, both over time, and in secret cables vs unclassified cables. I received a lot of good suggestions for further topics to pursue with the corpus, and probably the most interesting was the idea to do sentiment analysis over time on a variety of...

Read more »

Reproducible reports & research with knitr in R Studio

June 18, 2012
By
Reproducible reports & research with knitr in R Studio

Arguably, knitr (CRAN link) is the most outstanding R package of this year and its creator, Yihui Xie is the star of the useR! conference 2012. This is because the ease of use comparing to Sweave for making reproducible report. Integration of knitR and R Studio has made reproducible research much more convenience, intuitive and easier to

Read more »

Example 9.35: Discrete randomization and formatted output

June 18, 2012
By
Example 9.35: Discrete randomization and formatted output

A colleague asked for help with randomly choosing a kid within a family. This is for a trial in which families are recruited at well-child visits, but in each family only one of the children having a well-child visit that day can be in the study. The idea is that after recruiting the family, the research assistant...

Read more »

Tracking US Sentiments Over Time In Wikileaks

June 18, 2012
By
Tracking US Sentiments Over Time In Wikileaks

Introduction I recently posted about using the Wikileaks cable corpus to find word use patterns, both over time, and in secret cables vs unclassified cables. I received a lot of good suggestions for further topics to pursue with the corpus, and probably the most interesting was the idea to do sentiment analysis over time on a variety of named entities. Sentiment analysis is the process...

Read more »

R: Creating a shortcut to run a gWidgets GUI

June 18, 2012
By
R: Creating a shortcut to run a gWidgets GUI

I’ve been playing around with using gWidgets on Windows over the last few weeks as a way of creating front ends for various functions and set of functions that I’ve created, so that non R users can have the benefit of these without having to write a single line of code. The likes of 4Dpiecharts … Continue reading...

Read more »

Updates to package ‘intergraph’

June 18, 2012
By

On June 17 a new version (0.6) of package ”igraph” was released. This new version abandoned the old way of indexing graph vertices with consecutive numbers starting from 0. The new version now numbers the vertices starting from 1, which is more consistent with the general R convention of indexing vectors, matrices, etc. Because this change is

Read more »

Tracking US Sentiments Over Time In Wikileaks

June 18, 2012
By
Tracking US Sentiments Over Time In Wikileaks

Introduction I recently posted about using the Wikileaks cable corpus to find word use patterns, both over time, and in secret cables vs unclassified cables. I received a lot of good suggestions for further topics to pursue with the corpus, and probably the most interesting was the idea to do sentiment analysis over time on a variety of...

Read more »

Cross sectional spread of stock returns

June 18, 2012
By
Cross sectional spread of stock returns

A look at a simplistic measure of stock-picking opportunity. Motivation The interquartile range (the spread of the middle half of the data) has recently been added to the market portrait plots.  Putting those numbers into historical context was the original impulse. However, this led to thinking about change in stock-picking opportunity over time. Data Daily … Continue reading...

Read more »

Comparing performance in R, foreach/doSNOW, SAS, and NumPY (MKL)

June 17, 2012
By

This is a follow up to my previous post.  There is a quicker way to compute the function I created (basic cumulative sum) in R.Instead of:function f(x) {   sum = 0;   for (i in seq(1,x)) sum = sum + i   return(su...

Read more »

List of Free Online R Tutorials

June 17, 2012
By
List of Free Online R Tutorials

According to the post on FREE online R tutorials from universities, I have received many email suggesting more and more tutorials. However some tutorials are not hosted in an academic institutes, so I decided to create this post to list such tutorials. If you know other tutorials, please kindly suggest me by email to [email protected]

Read more »