Posts Tagged ‘ R Language ’

Returns on Easter week and one week after

March 21, 2010
By
Returns on Easter week and one week after

Inspired by CXO group report, I did a rerun of the same strategy on my data. Easter’s dates can be find at wikipedia. Overall, my results are similar to CXO group’s results. In the graph below, I plotted daily returns on Easter week (Monday to Thursday) from 1982 to 2009. I prefer this way of showing

Read more »

Strategy: what if SPY & VIX are up?

March 10, 2010
By
Strategy: what if SPY & VIX are up?

Recently, I was busy testing the following strategy: If SPY and VIX daily returns are positive, then short SPY at close and keep it for one day. The strategy is dump simple and it has very good feature – short side. There are not so many successful short side strategies. For testing purpose I used daily Yahoo

Read more »

End of the month investment

March 1, 2010
By
End of the month investment

It is know, that the first day of the month provides bullish edge. According to Quantifiable edges not all the months are equal. So, I made a test on S&P500 index, from January, 1980 until February, 2010. It is true, March isn’t the best month to run this strategy.Only 3 months have significant results

Read more »

Press Enter in LyX Sweave as You Wish

February 18, 2010
By
Press Enter in LyX Sweave as You Wish

or a long time I’ve been wondering why we are not able to use Enter in the LyX Scrap environment which was set up by Gregor Gorjanc for Sweave. Two weeks ago, I (finally!) could not help asking Gregor about this issue, as I’m using “LyX + Sweave” more and more in my daily work.

Read more »

Gas price seasonality

February 18, 2010
By
Gas price seasonality

Last spring I read “Quantitative Trading” by Ernest P. Chan. In his book, he suggested to buy gas futures contract at the end of February and sell it later, in March. Today, I decided to test this strategy by using R-language. The most important thing for such investigation is data. For this purpose, I used this

Read more »

Happy New Year with R

December 31, 2009
By

I have to admit that the previous post on Christmas is actually not much fun. Today I received another pResent from Yixuan which is more interesting:Basically the code deals with letter polygons (i.e. glyphs) and plot them with proper projections from 3D to 2D space: ## original code by Yixuan <[email protected]>, with my slight modification h.x =

Read more »

Merry Christmas Using R

December 24, 2009
By

Life should be fun. I saw a post in R-help list saying Merry Christmas to other useRs, and I followed up by some R code which can produce a naive animation like this:Here is the code to generate the above Flash animation with shining Christmas: library(animation) saveSWF({ n = length(speed <- runif(angle <- runif(x

Read more »

Create Animations in PDF Documents Using R

November 11, 2009
By

ince animation 1.0-9, we will be able to create a PDF document with an animation embedded in it; the function is saveLatex(), and its usage is similar to saveMovie() and saveSWF(): you pass an R expression for creating animations to this function, and this expression will be evaluated in the function; the image frames get

Read more »

Some Interesting Packages in R: swfDevice, RGoogleTrends, FlashMXML, SVGAnnotation

October 19, 2009
By

I love R because there are always exciting new packages which can be far beyond your imagination. Here I’d like to introduce a couple of packages that look really awesome: 1. swfDevice: R graphics device for SWF output (by Cameron Bracken) This package is still at a pre-alpha stage but you can see a sketch now in

Read more »

50000 Revisions Committed to R

October 10, 2009
By
50000 Revisions Committed to R

oday Romain Francois posted an interesting topic in the R-help list, and you can read his blog post for more details: celebrating R commit #50000. 50000 is certainly not a small number; we do owe R core members a big “thank you” for their great efforts in this fantastic statistical language in the 13 years.

Read more »