Český finanční a účetní časopis 2013(4):145-163 | DOI: 10.18267/j.cfuc.363

Using R in Finance

Jiří Sedláček
Ing. Jiří Sedláček, PhD. - odborný asistent; Katedra mezinárodního obchodu, Fakulta mezinárodních vztahů, Vysoká škola ekonomická v Praze, nám. W. Churchilla 4, 130 67 Praha 3; <sedlacek@vse.cz>.

R is open source software environment (and language) for statistical computing and graphics. Different surveys are showing R's popularity has increased substantially in recent years, especially in academic environment. Therefore, at the beginning main advantages and comparison to commercial statistical software are presented. Second, selection of the best interface for given tasks is important. In each category (GUI or editors/IDEs) several product are compared. Data structure for time series in base installation is suitable for regular time series only. Therefore, several other data structures in different packages are compared: almost all support irregular time series, but differ in other attributes (often important for financial data). In following section, analysis of some well-known packages for financial data (quantmod, RQuantLib, Rmetrics collection and others) are performed. At the beginning of the last section, different ways of downloading data from Internet are shortly presented. Then the relevant sources of financial data are more deeply investigated (in particular web Quandl and corresponding Quandl package for R). Czech projects for open data (still in initial phase) are also shortly described.

Keywords: Statistics; Finance; R; Program; Data structures; Packages; Data import.
JEL classification: C10, G10

Published: December 1, 2013  Show citation

ACS AIP APA ASA Harvard Chicago Chicago Notes IEEE ISO690 MLA NLM Turabian Vancouver
Sedláček, J. (2013). Using R in Finance. Czech Financial and Accounting Journal2013(4), 145-163. doi: 10.18267/j.cfuc.363
Download citation

References

  1. Aquino, J. (2013): Vim-R-plugin: Plugin to work with R. [on-line], Vim.org, c2013, [cit. 31. 10. 2013] <http://www.vim.org/scripts/script.php?script_id=2628>.
  2. Bioconductor (2013): Bioconductor: Open Source Software for Bioinformatics. [on-line], Bioconductor, c2013, [cit. 26. 10. 2013], <http://www.bioconductor.org/>.
  3. Deducer (2013): An R Graphical User Interface (GUI) for Everyone. [on-line], Deducer, c2013, [cit. 26. 10. 2013], <http://www.deducer.org/pmwiki/pmwiki.php?n=Main.DeducerManual>.
  4. Eddelbuettel, D. - Nguyen, K. (2013): RQuantLib: R interface to the QuantLib library. R package version 0.3.10. <http://CRAN.R-project.org/package=RQuantLib>.
  5. ESS (2013): ESS - version 13.09. Emacs Speaks Statistics. [on-line], ESS Developers, c2013, [cit. 26. 10. 2013], <http://ess.r-project.org/>.
  6. Fiala, J. (2013): Textový editor PSPad. [on-line], Slavkov u Brna, Jan Fiala, c2013, [cit. 26. 10. 2013], <http://www.pspad.com/cz/>.
  7. Fox, J. (2005): The R Commander: A Basic Statistics Graphical User Interface to R. Journal of Statistical Software, 2005, roč. 14, č. 9, s. 1-42. Go to original source...
  8. Wendling, C. aj. (2013): Geany. [on-line], Geany.org, c2013, [cit. 26. 10. 2013], <http://www.geany.org/>.
  9. McTaggart, R. - Daroczi, G. (2013): Quandl: Quandl Data Connection. R package version 2.1.2. <http://CRAN.R-project.org/package=Quandl>.
  10. Muenchen, R. A. (2013): The Popularity of Data Analysis Software, poslední aktualizace 28. 5. 2013. [on-line], r4stats.com, c2013, [cit. 26. 10. 2013], <http://r4stats.com/articles/popularity/>.
  11. NppToR (2013): NppToR: R in Notepad++. NppToR provides R auto-completion and code passing between Notepad++ and R. [on-line], SourceForge, c2013, [cit. 26. 10. 2013], <http://sourceforge.net/projects/npptor/files/>.
  12. OpenData.CZ (2013): Iniciativa za otevřenou datovou infrastrukturu. [on-line], Iniciativa OpenData.cz, c2013, [cit. 26. 10. 2013], <http://www.opendata.cz/>.
  13. OtevrenaData.CZ (2013): Společně otevíráme data. [on-line], Praha, Fond Otakara Motejla, c2013, [cit. 26. 10. 2013] <http://www.otevrenadata.cz/>.
  14. Quandl (2013): Quandl: Find, Use and Share Numerical Data. [on-line], Toronto, Quandl, c2013, [cit. 26. 10. 2013], <http://www.quandl.com/>.
  15. R Core Team (2013): R: A Language and Environment for Statistical Computing. Wien, R Foundation for Statistical Computing, c2013, <http://www.R-project.org/>.
  16. Rattle GUI (2013): A Graphical User Interface for Data Mining using R. [on-line], Canberra, Togaware Pty, c2013, [cit. 26. 10. 2013], <http://rattle.togaware.com/>.
  17. R-Forge (2013): R-Forge. [on-line], R-Forge Administration and Development Team, c2013, [cit. 26. 10. 2013], <http://r-forge.r-project.org/>.
  18. RKWard (2013): Welcome to RKWard. 2. 4. 2013. [on-line], SourceForge, c 2013, [cit. 26. 10. 2013], <http://sourceforge.net/apps/mediawiki/rkward/index.php?title=Main_Page>.
  19. Rmetrics Association (2013): [on-line], Zurich, Rmetrics Association, c2013, [cit. 26. 10. 2013], <https://www.rmetrics.org/RmetricsAssociation>.
  20. RStudio (2013): RStudio IDE. [on-line], Boston, RStudio, c2013, [cit. 26. 10. 2013], <http://www.rstudio.com/ide/>.
  21. Ryan, J. A. - Ulrich, J. M. (2013): xts: eXtensible Time Series. R package version 0.9-7. <http://CRAN.R-project.org/package=xts>.
  22. Ryan, J. A. (2013): quantmod: Quantitative Financial Modelling Framework. R package version 0.4-0. [on-line] [cit. 26. 10. 2013], <http://CRAN.R-project.org/package=quantmod>.
  23. The Comprehensive R Archive Network (2013): [on-line], c2013, [cit. 26. 10. 2013], <http://cran.r-project.org/>.
  24. WalWare (2013): StatET. [on-line], c2013, [cit. 26. 10. 2013] <http://www.walware.de/?page=/it/statet/>.
  25. Wuertz, D. - Chalabi, Y. - Maechler, M. aj. (2013): timeDate: Rmetrics - Chronological and Calendar Objects. R package version 3010.98. <http://CRAN.R-project.org/package=timeDate>.
  26. Wuertz, D. - Chalabi, Y. (2013): timeSeries: Rmetrics - Financial Time Series Objects. R package version 3010.97. <http://CRAN.R-project.org/package=timeSeries>.
  27. Wuertz, D. aj. (2012): fBonds: Bonds and Interest Rate Models. R package version 2160.76. <http://CRAN.R-project.org/package=fBonds>.
  28. Wuertz, D. aj. (2013a): fBasics: Rmetrics - Markets and Basic Statistics. R package version 3010.86. <http://CRAN.R-project.org/package=fBasics>.
  29. Wuertz, D. aj. (2013b): fImport: Rmetrics - Economic and Financial Data Import. R package version 3000.82. <http://CRAN.R-project.org/package=fImport>.
  30. Zeileis, A. - Grothendieck, G. (2005): zoo: S3 Infrastructure for Regular and Irregular Time Series. Journal of Statistical Software, 2005, roč. 14, č. 6, s. 1-27. Go to original source...

This is an open access article distributed under the terms of the Creative Commons Attribution 4.0 International License (CC BY 4.0), which permits use, distribution, and reproduction in any medium, provided the original publication is properly cited. No use, distribution or reproduction is permitted which does not comply with these terms.