R Language

Strategy: what if SPY & VIX are up?

March 10, 2010 | kafka

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 ... [Read more...]

End of the month investment

March 1, 2010 | kafka

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 ... [Read more...]

Press Enter in LyX Sweave as You Wish

February 18, 2010 | Yihui Xie

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 ...
[Read more...]

Gas price seasonality

February 18, 2010 | kafka

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. ... [Read more...]

Happy New Year with R

December 31, 2009 | Yihui Xie

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 ... [Read more...]

Create Animations in PDF Documents Using R

November 11, 2009 | Yihui Xie

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 ... [Read more...]

50000 Revisions Committed to R

October 10, 2009 | Yihui Xie

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 ... [Read more...]

How to Import MS Excel Data into R

September 26, 2009 | Yihui Xie

s Sir Francis Bacon said, “Histories make men wise; poets witty; the mathematics subtile; natural philosophy deep; moral grave; logic and rhetoric able to contend.” And Windows stupid. He should have added the last sentence if he were a Windows user in this age. 1. Avoid Using M$ Excel A lot ... [Read more...]

Simulation of Burning Fire in R

June 11, 2009 | Yihui Xie

inlin Yan posted a cool (hot?) simulation of burning fire with R in the COS forum yesterday, which was indeed a warm welcome. I’m not sure whether our forum members will be scared by the “fire” under the title “Welcome to COS Forum”. The fire was mainly created by ... [Read more...]
1 8 9 10

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)