|
| Home › Financial Applications | ||
REvolution R in Financial Applications
The R language is a very popular data analysis, statistics, and visualization system with a large and rapidly-growing following in the quantitative finance and risk analysis communities. Across the industry, the R language is at the cutting edge of financial analysis research. Ever-increasing data volumes and model complexity often force practitioners to limit their use of high-level languages like R to prototyping environments, relying on lower-level languages for production use. However, models built in C, C++, Fortran, Java, and even F# are often slow to deploy, costly to produce, and more error-prone than algorithms developed in high-level environments like R.
REvolution R includes high-performance numerical methods, commercial support, training, and developer tools that position R for both rapid prototyping and production environments in quantitative finance and risk analysis. See our white papers for case studies of the performance advantages possible with REvolution R. REvolution R can improve the performance of real-world application problems substantially. For example, some components of the CreditMetrics R package exhibit nearly sixteen times performance speedups using REvolution R on standard x86 workstations. The REvolution R Enterprise Cluster Edition includes groundbreaking, easy to use tools for parallel and distributed computing with R that can scale many algorithms out across multiple workstations, clusters and grids. Why is the R Language so Well-Suited to Finance? REvolution R is a powerful platform for rapidly solving problems in quantitative finance, econometrics and risk analysis. REvolution R excels not only as a sophisticated and easy to use "What if?" prototyping tool, but thanks to our commercial support, performance enhancements and development tools, algorithms developed with REvolution R are production-capable.
The following basic examples illustrate the powerful connectivity, graphics and simple syntax of the R language and the Quantmod and PerformanceAnalytics packages.
Simple and expressive syntax REvolution R includes powerful data connectivity methods and first-class time-series objects out of the box. The following # Pull down some historic stock OHLC data from a Web Services source:
getSymbols("MSFT")
# Let's take a look at the last three months:
chartSeries(MSFT, subset='last 3 months')
# Retrieve a different time series:
getSymbols("IBM")
# Merge the two time-series (no need to worry about alignment or uniformity # of the time index--that is handled transparently and efficiently): x <- as.xts(merge(IBM, MSFT)) # Time-series are indexed by actual POSIX dates. x['2008-11-01::2008-11-07'] IBM.Open IBM.High IBM.Low IBM.Close IBM.Volume IBM.Adjusted 2008-11-03 92.64 94.67 92.17 92.68 7686300 92.16 2008-11-04 94.76 94.76 92.07 93.40 10173000 92.88 2008-11-05 92.93 93.40 89.70 89.94 8706200 89.44 2008-11-06 87.68 88.83 84.28 85.15 12522000 85.15 2008-11-07 85.78 86.71 84.25 86.27 7927800 86.27 MSFT.Open MSFT.High MSFT.Low MSFT.Close MSFT.Volume MSFT.Adjusted 2008-11-03 22.48 22.91 22.21 22.62 61923500 22.47 2008-11-04 23.13 23.66 22.87 23.53 72123000 23.37 2008-11-05 23.33 23.34 22.05 22.08 81179700 21.93 2008-11-06 21.87 22.08 20.86 20.88 95509700 20.74 2008-11-07 21.32 21.54 21.00 21.50 71256300 21.36 Powerful Graphics Here is a wonderful two-liner from the Performance Analytics package:
data(edhec)
Huge User Community Practitioners in industry, academia and the open-source community at large have contributed hundreds of high-quality functions to the R language for quantitative finance and optimization, risk analysis, financial graphics, and financial data source connectivity. See the links below.All standard quant and risk models are already available in R, providing end-users with a large high-quality code library on which to build even more sophisticated modelsAll standard quant and risk models are already available in R, providing end-users with a large high-quality code library on which to build even more sophisticated models. REvolution R Finance Links
|
||
|