Monthly Archives: September 2012

Merging Current Stock Quotes with Historical Prices

September 4, 2012
By
Merging Current Stock Quotes with Historical Prices

I got a question last week about going from the backtest to the trading. For example, if our system is based on today’s close, we can approximate the close value by the price at say 3:30pm, determine the signal and still have time enter the trade. It is not perfect, but one of possible solutions.

Read more »

Testing highlight.js with r code

I searched for a javascript plugin to highlighter code, but obviously not any code. I needed to higlight R. Finally I founded highlight.js. Highlights.js is pretty cool for many reasons. I like Highlights.js because: Support R lenguage....

Read more »

How to create random binary matrices in R

September 4, 2012
By

It all started off as a simple question from Scott Chamberlain on Twitter: Make m x n matrix with randomly assigned 0/1 -> apply(m, c(1,2), function(x) sample(c(0,1),1)) -- Better/faster solution? #rstats — Scott Chamberlain (@recology_) August 28, 2012 The goal was to create a matrix with randomly selected binary elements, and a predetermined number of rows and columns, that...

Read more »

BMR: Bayesian Macroeconometrics in R

September 4, 2012
By
BMR: Bayesian Macroeconometrics in R

The recently released BMR package, short for Bayesian Macroeconometrics with R, provides a comprehensive set of powerful routines that estimate Bayesian Vector Autoregression (VAR) and Dynamic Stochastic General Equilibrium (DSGE) models in R. The procedure of estimating both Bayesian VAR and DSGE models can represent a great computational burden. However, BMR removes a lot of

Read more »

Research support specialist position at Ryerson University

September 3, 2012
By

The Ted Rogers School of Management at Ryerson University in Toronto has an opening for a research support specialist to assist with monitoring current research projects and to provide assistance with econometric/statistical analysis and training.Requi...

Read more »

Project Euler — problem 19

September 3, 2012
By

I’ve been working overtime last weekend. Although I suffered little from the Monday syndrome, I still need a break. So, I’m back to the Project Euler after days of Olympic data digging. Today, I’m gonna to solve the 19th problem. You are given the following … Continue reading

Read more »

A look at Bayesian statistics

September 3, 2012
By
A look at Bayesian statistics

An introduction to Bayesian analysis and why you might care. Fight club The subject of statistics is about how to learn.  Given that it is about the unknown, it shouldn’t be surprising that there are deep differences of opinion on how to go about doing it (in spite of the stereotype that statisticians are accountants … Continue reading...

Read more »

Fixing non positive definite correlation matrices using R

September 3, 2012
By

Problem When a correlation or covariance matrix is not positive definite (i.e., in instances when some or all eigenvalues are negative), a cholesky decomposition cannot be performed. Sometimes, these eigenvalues are very small negative numbers and occ...

Read more »

Detecting Pitches in music with R

September 2, 2012
By
Detecting Pitches in music with R

In a previous post, I described a method to detect a chord using a Fourier transform in Java/Scala. I’ve re-implemented the same in R, detailed below. This will generate an audio file containing the C-Major chord: library(sound) c<-261.63 e<-164.81 g<-196 len<-1 cData<-Sine(c,len) eData<-Sine(e,len) gData<-Sine(g,len) audio<-normalize(cData+eData+gData) saveSample(audio, "out\\ceg.wav", overwrite=TRUE) And a series of helper functions: magnitude<-function(x)

Read more »

Descriptive statistics of some Agile feature characteristics

September 2, 2012
By
Descriptive statistics of some Agile feature characteristics

The purpose of software engineering research is to figure out how software development works so that the software industry can improve its quality/timeliness (i.e., lower costs and improved customer satisfaction). Research is hampered by the fact that companies are not usually willing to make public good quality data about the details of their software development

Read more »