Screencast: The Making of 17018d5488

March 6, 2012
By
Screencast: The Making of 17018d5488

The following screencast demonstrates the use of R, the quantmod R package and bash to process SPX data from 1950. An explanation on how to access a git repository that includes the plots and the R console history is also provided. This screencast prod...

Read more »

Multiple Factor Model – Building 130/30 Index

March 5, 2012
By
Multiple Factor Model – Building 130/30 Index

Nico brought to my attention the 130/30: The New Long-Only (2008) by A. Lo, P. Patel paper in his comment to the Multiple Factor Model – Building CSFB Factors post. This paper presents a very detailed step by step guide to building 130/30 Index using average CSFB Factors as the alpha model and MSCI Barra

Read more »

Recovering Marginal Effects and Standard Errors from Interaction Terms in R

March 5, 2012
By

When I fit models with interactions, I often want to recover not only the interaction effect but also the marginal effect (the main effect + the interaction) and of course the standard errors. There are a couple of ways to do this in R but I ended writ...

Read more »

Recovering Marginal Effects and Standard Errors from Interaction Terms in R

March 5, 2012
By

When I fit models with interactions, I often want to recover not only the interaction effect but also the marginal effect (the main effect + the interaction) and of course the standard errors. There are a couple of ways to do this in R but I ended writ...

Read more »

Recovering Marginal Effects and Standard Errors from Interaction Terms in R

March 5, 2012
By

When I fit models with interactions, I often want to recover not only the interaction effect but also the marginal effect (the main effect + the interaction) and of course the standard errors. There are a couple of ways to do this in R but I ended writ...

Read more »

how to build a for loop in r

March 5, 2012
By

(This article was first published on twotorials by anthony damico, and kindly contributed to R-bloggers) To leave a comment for the author, please follow the link and comment on his blog: twotorials by anthony damico. R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL,...

Read more »

how to create a logical test and then build an if statement in r

March 5, 2012
By

(This article was first published on twotorials by anthony damico, and kindly contributed to R-bloggers) To leave a comment for the author, please follow the link and comment on his blog: twotorials by anthony damico. R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL,...

Read more »

Airline Fares Decreasing Steadily

March 5, 2012
By
Airline Fares Decreasing Steadily

Description: Yearly average airline fare since 1995. Data: http://www.bts.gov/ Analysis: When taking the average price of domestic airline fares, there is a clear trend indicating that flying is becoming more affordable - when adjusted for infl...

Read more »

Benford’s Law and fraud in the Russian election

March 5, 2012
By
Benford’s Law and fraud in the Russian election

Earlier today Ben Goldacre posted about using Benford’s Law to try and detect fraud in the Russian elections. Read that now, or the rest of this post won’t make sense. This is a loose R translation of Ben’s Stata code. The data is held in a Google doc. While it is possible to directly retrieve

Read more »

NIT: Fatty acids study in R – Part 003

March 5, 2012
By
NIT: Fatty acids study in R – Part 003

As I told you I´m a beginner in "R", so I realize that I have to prepare my data a little bit in order to continue from my previous post ( NIT: Fatty acids study in R - Part 002) after getting some errors. Anyway I´m really fascinated ...

Read more »

Futures price prediction using the order book data

March 5, 2012
By
Futures price prediction using the order book data

It has been a couple of months since my last post; busy with lots of projects.I had some fun playing around with data from Interactive Brokers API.  It turns out that it is relatively easily to get hold of the raw market data relating to both trades and order book changes for CME/NYMEX commodity futures.  For the purposes of...

Read more »

New R User Groups in Lithuania, Birmingham, Taiwan

March 5, 2012
By

Three new local R user groups to add to the list today: from Lithuania, Taiwan, and Birmingham (UK). The Chinese Academy of R Software (CARS) serves R users in Taipei (Taiwan). It has been approved by the Ministry of the Interior of Taiwan, and has more than 500 "likes" on its Facebook page. The Birmingham R Users Meeting (with...

Read more »

Dr Sanjiv Das presents "Using R for Analyzing Loans, Portfolios and Risk"

March 5, 2012
By

In a free webinar tomorrow at 10AM Pacific, Professor of Finance Dr Sanjiv Das will present, "Using R for Analyzing Loans, Portfolios and Risk: From Academic Theory to Financial Practice". I saw a version of Dr Das's talk a couple of months ago at the Bay Area R User Group meeting, and it was outstanding. I particularly recall his...

Read more »

Montreal R workshop on Causal Inference

March 5, 2012
By
Montreal R workshop on Causal Inference

Monday, March 05, 2012  14h-16h N4/17 Stewart Biology Building, McGill University Prof. Bill Shipley from Université de Sherbrooke Topics Structural equation modelling Graphical models for understanding causal analysis Testing for goodness of fit...

Read more »

Interview: Patrick Burns Quantitative Finance in R

Interview: Patrick Burns Quantitative Finance in R

Dr. Patrick Burns is the founder of Burns Statistics, providing consulting and bespoke software specializing in quantitative finance, programming in the S language, and optimization via genetic algorithms and simulated annealing. Patrick has written m...

Read more »

The shadows and light of models

March 5, 2012
By
The shadows and light of models

How wide is the darkness? Uses of models The main way models are used is to: shine light on the “truth” We create and use a model to learn how some part of the world works. But there is a another use of models that is unfortunately rare — a use that should be common … Continue reading...

Read more »

Plot maps like a boss

March 5, 2012
By
Plot maps like a boss

A new package OpenStreetMap has been released to CRAN this week which is designed to allow you to easily add satellite imagery, or open street maps to your plots. Raster maps are a great way to add context to your spatial data with a minimum outlay of effort. The syntax in OpenStreetMap is fairly simple, just give

Read more »

BerkeleyEarth Version 1.6

March 5, 2012
By
BerkeleyEarth Version 1.6

Version 1.6 has just been submitted to CRAN and I will post the source here in the dropbox. Version 1.6 will probably be stable for a long time unless I find a bug. The main additions I made were adding a few functions to make some things easier, and I converted two files–flags and sources–

Read more »

ThinkStats … in R (including Example 1.2)

March 4, 2012
By

ThinkStats (by Allen B. Downey) is a good book to get you familiar with statistics (and even Python, if you’ve done some scripting in other languages). I thought it would be interesting to present some of the examples & exercises in the book in R. Why? Well, once you’ve gone through the material in a

Read more »

DEoptim in Parallel

March 4, 2012
By

Running DEoptim in parallel has been on the development team's wishlist for awhile.  It had not been a priority though, because none of us have personally needed it.  An opportunity arose when Kris Boudt approached me about collaborating to a...

Read more »

di Roma

March 4, 2012
By
di Roma

It has been a wonderful week in Roma, a mix of pleasant work and enjoyable free-time! I gave the ABC advanced course for the second time in a month so it did not require much in terms of preparation and there was a good sized audience with attentive (if too silent!) students and friends as

Read more »

Data visualization

March 4, 2012
By

For those who have not read the seminal works of Tufte and Cleveland, please hang your heads in shame. To salvage some sense of self-worth, you can then head over to Solomon Messing’s blog where he is starting a series on data visualization based on ...

Read more »

Boxplots and Day of Week Effects

March 4, 2012
By
Boxplots and Day of Week Effects

THIS BLOG DOES NOT CONSTITUTE INVESTMENT ADVICE. ACTING ON IT WILL MOST LIKELY BE DETRIMENTAL TO YOUR FINANCIAL HEALTH.After following some R-related quant finance blogs like Timely Portfolio, Systematic Investor or Quantitative tho...

Read more »

googleVis 0.2.15 is released: Improved geo and bubble charts

March 4, 2012
By
googleVis 0.2.15 is released: Improved geo and bubble charts

The guys behind the Google Visualisation API don't seem to rest. On 22 February 2012 they released an update of their API. Google added options for a gradient colour axis to bubble chart and a magnifying glass to geo chart, which opens when the user ho...

Read more »

ggplot2 0.9.0 released

March 4, 2012
By

This announcement was made by Hadley Wickham in the mailing list. ———————- # ggplot2 ggplot2 is a plotting system for R, based on the grammar of graphics, which tries to take the good parts of base and lattice graphics and avoid bad parts. It takes care of many of the fiddly details that make plotting a hassle (like drawing legends)...

Read more »

Interpretation of R-index

March 4, 2012
By
Interpretation of R-index

Having introduced the R-index, it is time to look how it works. For this a simple example is sufficient. What happens if a product is different from another product. To make this at least slightly realistic, three products are needed. Two products will...

Read more »

Visualization series: Insight from Cleveland and Tufte on plotting numeric data by groups

March 4, 2012
By
Visualization series: Insight from Cleveland and Tufte on plotting numeric data by groups

After my post on making dotplots with concise code using plyr and ggplot, I got an email from my dad who practices immigration law and runs a website with a variety of immigration resources and tools.  He pointed out that the … Continue reading →

Read more »

Spurious Regression illustrated

March 4, 2012
By
Spurious Regression illustrated

Spurious Regression problem dates back to Yule (1926): “Why Do We Sometimes Get Nonsense Correlations between Time-series?”. Lets see what is the problem, and how can we fix it. I am using Morgan Stanley (MS) symbol for illustration, pre-crisis time … Continue reading →

Read more »

Setting the Default RNG Seed in R

March 4, 2012
By

How to set the default seed for the RNG behind the runif(), sample() and other command? Well, there are several ways doing that (like setting .Random.seed directly), but as the documentation states, set.seed() is the recommended way to specify seeds.> ?set.seed> set.seed(0)> runif(1,0,1) 0.8966972> set.seed(0)> runif(1,0,1) 0.8966972> set.seed(0)> sample(1:10, 10) 9 3 10 5 ...

Read more »