Data analysis with R: Using the right tool for the right task

I ported Engineering Return's Trend Strength Index to JForex as my first practice to writing custom indicators in JForex. Frank's code in TradeSignal consists of 9 lines. My JForex code? 191. This is my first custom indicator in JForex. It will also be the last. A compiled programming language such as Java is not the most convenient to use for data analysis. The lack of interactivity because of the step of compilation is one obstacle to fluent data explorations. Secondly, the language itself is more cumbersome because of its generality. Java is used to build all sorts of applications. Contrary to something like MatLab, in which it is purposely built to work with numbers. I miss the days when I have my license for MatLab. However, being forced away from MatLab might not be a bad thing. As much as I've become accustomed to it, MatLab isn't without its flaws. But I won't bash it in this post. What I actually want to talk about is R. The rage these days in statistical data analysis is in R (see Wiki entry on R). I've done some research and testing, R is really as good as they say it is (see past publications in R/Finance conference). You will get to see some real examples in financial time series data analysis in R later in this blog once I have some publishable results. This will no doubt take some time as I am learning yet another new programming language (thus the lack of posts this week). The plan from now on is to use R to play with the data. Then once the algorithm is finalized, I will either port it to Java (JForex) for deployment or embed the R environment in Java for live trading.