Choosing Statistical Tools for Quantitative Strategy Prototyping
Summary
The document explains why statistical languages such as R or Matlab are commonly useful for model development and backtesting, while lower-level languages are often chosen for stable production systems where performance matters. It presents prototyping as a workflow that benefits from ready-made tools rather than requiring researchers to build every capability themselves.
Suggested capabilities include optimization, linear algebra, interpolation, filtering, data import and export, graphics, date and time handling, vector and matrix operations, and libraries of specialized algorithms. The examples range from cubic splines and exponential moving averages to expectation-maximization. The document offers practical guidance on framework selection, but gives no benchmarks, comparison of particular packages, or criteria for choosing among them. It also notes that similar features can exist in lower-level languages; its argument is that close integration makes them easier to use during research.
Key ideas
- Statistical languages often provide an integrated environment for model testing and backtesting.
- Optimization and linear algebra are useful capabilities to have available during prototyping.
- Time-series handling, data visualization, and flexible data import and export can speed research.
- Specialized algorithms may be accessible through packages without being implemented from scratch.
- Lower-level languages can offer similar tools, though integration may be less convenient.
Tags
Full text
# What to ask for in a good prototyping framework? # What to ask for in a good prototyping framework? Reading up on quantitative methods, model development, and back-testing, one obvious question springs to mind: What should one ask of a prototyping (model testing) framework? I know a lot of people use R, C/C++ and so on for testing, but does one have to re-invent everything or are there some features, such as basic statistics methods and data viewing capabilities, that one should ask for? ## Answer by Tal Fishman (score 7, accepted) https://quant.stackexchange.com/a/1972 There is a huge difference between R (and Matlab, SAS, or other statistical languages) and relatively low-level languages such as C/C++/C#/Java in exactly this regard. The latter category is used more often for stable end-products, where speed and performance can be crucial, whereas the former category is used more often for model testing and prototyping. The statistical languages have many basic features, including those you mention, basic statistics and data viewing, as well as much else that will make prototyping a much easier and quicker process. Some of the features I use most in may day-to-day model development and backtesting are: - Optimization (importance of good optimization algos is not to be underestimated!) - Linear algebra (eigenvalues, singular value decomposition) - Interpolation (cubic splines) - Filtering (FIR, IIR, EMA) - Read/write to CSV/Excel/databases/other formats - Advanced graphics (bar charts, histograms, box plots, scatter, 3-D) - Date/time manipulation and time-series support - Vector/matrix manipulation (data manipulation) - Large library of less-commonly used algorithms (e.g. Expectation-Maximization) available as packages I'm sure many of these features could also be found in low-level languages, but the level of tight integration makes them much easier to use in the statistical languages.
Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.