Articles by QuantTrader

Math Constants in C++

August 14, 2012 | QuantTrader

Some of my colleagues didn't know that you can use mathematical constants that are part of "cmath". Here is the small snippet that shows how to use PI from cmath library. Be aware that you need to write "#define _USE_MATH_DEFINES" before you include cm... [Read more...]

AdfTest Function Enhanced With Rcpp Armadillo

April 26, 2012 | QuantTrader

In my previous post about rewriting my code to run in parallel part one I mentioned that we will make a small change to adfTest() function as well. In this post we will perform this small but performance-dramatic change. When you take a closer look at the source code of ... [Read more...]

Download Prices From Yahoo In Parallel

April 24, 2012 | QuantTrader

Following my previous post about rewriting my code to run in parallel I have modified the code for downloading the S&P 500 prices from Yahoo to run i parallel as well. To be honest, I quite enjoy writing the code to run in parallel. It's fun for various reasons, but ... [Read more...]

Rewriting My Code to Run in Parallel (1)

April 21, 2012 | QuantTrader

As I have mentioned in my previous post I am about to make my code for finding co-integrated pairs run in parallel and more efficient. But before I do so in the actual co-integration code I would like to run some tests to see whether it would improve t... [Read more...]

Pair Trading: Quick Update

April 17, 2012 | QuantTrader

I've been working on different projects lately and my time for this blog, unfortunately, has been close to zero. But that's going to change. Don't expect new post every day, but there should be a new post at least in every two weeks. Anyway, let's get back to the point ... [Read more...]

Pair-Trading in R – Update

May 7, 2011 | QuantTrader

I found amazing R package in one of posts on R-bloggers website. It's called RcppAmadillo and you can find more info here. The function I am using from this package is called fastLm. Whereas I am interested in special case of Ax = b problem where A and... [Read more...]

ggplot2 – First impressions

April 29, 2011 | QuantTrader

I was reading various R blogs and saw very nice looking plots created with ggplot2 package. Especially this blog was useful because of link to a very interesting book about ggplot2. I want to display and update the latest co-integrated pairs every day ... [Read more...]

Optimizing My R Code

April 25, 2011 | QuantTrader

Thanks to gappy3000 I optimized my code in few several ways. The original script lasted ~30 minutes thanks to using pure vectors instead of zoo objects. First of all I changed all lm functions for lm.fit functions. Although lm.fit function cannot handl... [Read more...]

Zoo Slows Down Your Linear Model Function

April 22, 2011 | QuantTrader

I was a bit frustrated when I read Aris's comment to this post about speed of his calculations in Matlab. So I changed the time span of my dataset to 5 years and repeated the whole code. It was VERY disappointing to get the results after more than 5 ho... [Read more...]

Pair-Trading with S&P500 Companies – Part II.

April 10, 2011 | QuantTrader

Today I'm going to share with you further outcomes of my research in statistical arbitrage trading technique - pair-trading. In the first part of pair-trading with S&P500 Companies I used downloaded data from yahoo to identify co-integrated pairs. Next stage is to take closer look at results and identify ... [Read more...]

Pair-Trading with S&P500 Companies – Part I.

March 30, 2011 | QuantTrader

In my recent post I wrote the code to download historical data for companies included in S&P500 index. Today I would like to perform statistical procedures to identify whether certain pair of stocks is co-integrated or not. Since there are approximately 500 companies that means I will need to perform ... [Read more...]

Downloading S&P 500 Data to R

March 23, 2011 | QuantTrader

The cornerstone of your analysis and quantitative trading algorithms are data. There are lots of different ways how to do it in R (depending of what your investment instruments are). Today I am going to download data from finance.yahoo which are stock ... [Read more...]

Code Highlighter for R in WordPress

March 21, 2011 | QuantTrader

First of all, welcome to my blog! I will write posts about trading, quantitative and algorithmic trading, programming and everything else what is on my mind. Feel free to comment and give suggestions how to improve this blog. Thank you! Well, one of th... [Read more...]

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)