Enhancing R Graphic packages
Posted by XmPh in R Tutorials & Examples on February 12, 2011
This will be the last thing I’ll post prior starting to connect R with Metatrader. Indeed, as you may suspect already I use this blog as my lab-book. The following might be quite general, but it fits in my overall ambition to build a personal quant-trading architecture as professional as I can.
Graphic visualization is a major part of a trading system design. To me, nice & clean graphs are as important as their content. One needs to appreciate looking at the information to understand it, or at least to spend some time trying !
Here are the few framework I found that could interact with R:
- Tulip is an advanced visualization framework that may support the development of interactive charts
- Stanford Protoviz through R-Web-Vis, also for Web deployment (demo site)
- Jung, a java interactive graph rendering framework
- GGplot2 is a static graphic library more polished than the original R-one
- Graphviz
Finally, few web resources for graph examples:
- R-Climate
- RGraphics exampels from Auckland univ.
- and the famous: R-addictedtor
Algorithmic Trading in R: Available Information
Posted by XmPh in R / Finance Talks, R Tutorials & Examples on February 12, 2011
After digging through different blogs and info on the web I found an amazingly strong and developping community supporting R for specific applications in algorithmic trading. Thereafter I present some of the major information that I believe are essential to the novice R algorthmic trader, hoping this will reduce the learning curves of the few following that path:
- Designing & Backtesting strategies: Modified Donchian Channel – Most example codes I found are available in my Code Examples section;
- Developping Indicators and Market scanners: Basic Indicators in R, Cointegration analysis, Cointegration with R through Metatrader, Prediction Analysis ;
- Live trading: InteractiveBroker API for R ;
- Mailling lists & User groups: R-Sig-Finance, RMetrics and Rmetrics user list, R-bloggers, inside-R, RinFinance, Revolutionanalytics in Finance ;
- and Few talks worth watching: UCLA talks, UCLA talks2, Jim Simons from Renaisssance ;
- R libraries specific to trading & financial analysis:
- QuantMod: development, testing, and deployment,
- TTR: technical trading rules,
- PerformanceAnalytics: econometric functions for performance and risk analysis of financial instruments or portfolios,
- XTS: extensible time-series,
- Blotter/QuantStrat: Transaction-oriented infrastructure for defining instruments, transactions, portfolios and accounts for trading systems and simulatio – build, and back-test strategies
- R-QuantLib: R interface to the QuantLib library
- CRAN Finance & Econometrics packages
A nice summary can be found here.
Now I’m early in my project, which aims at using R to provide trading-signals to a Metatrader platform, but there is a specific information that I’m not yet able to find: Is R efficient enough (fast enough if you will) to allow live trading on a per-tick basis, per-second basis or per-? basis ? What is the ideal architecture to perform live trades: asynchrone R calculation for major analysis, combined to c++ functions and/or Metatrader functions to closely watch market opportunities? I was not able to find anyone detailing his/her Live trading set-up involving R which is a pity as a lack of design would result in basically restarting from scratch or living with inefficient set-ups. I guess I will have to experience the trial & error investigation.




