The sections of this page are:
A Note on R and S-PLUS
R Repository
Financial Code
General Utility Code
A Note on R and S-PLUS
R is free, open-source software that provides
an environment for data analysis, graphics and statistics.
You can download the software, documentation and so on from
the R Project website.
Almost everyone will want to install a binary version (as opposed
to building it from source code).
There are also
commercially supported versions of R.
S-PLUS is commercial software.
Both R and S-PLUS are implementations of the S language, and a great deal of
code will run under both.
A brief (8 page) introduction to using R and S-PLUS is
"A Guide for the Unwilling S User".
An exposition of some of the merits of the S language is
"An Introduction to the S Language".
R Repository
Here are public domain R packages developed by Burns Statistics.
The repository for the packages is http://www.burns-stat.com/R.
Currently there are Windows binaries and source, but not MacOS.
WARNING: This repository will not work if you have R version 2.10.0.
Version 2.10.1 does work.
(We haven't found the appropriate modification to the repository to
avoid the bug that was in 2.10.0.)
To install a package from within R, you can issue a command like:
install.packages("BurStFin", repos="http://www.burns-stat.com/R")
To get the source you can issue an R command like:
download.packages("BurStFin", "some_directory", type="source",
repos="http://www.burns-stat.com/R")
The packages that are currently available are:
BurStFin
Functions useful in finance.
There is a function for creating a variance matrix via a factor model
(this may be of use in non-financial settings as well). There is a function
for estimating a variance matrix by shrinking towards the equal correlation
matrix.
There are functions for adding a benchmark to a variance matrix,
and transforming a variance matrix to be relative to a benchmark.
And more.
evalstrat
Functions used in a working paper to evaluate trading strategies.
These functions depend on POP, the predecessor of
Portfolio Probe.
This is probably of most use as providing functions that you
can modify to suit your own situation.
Financial Code
With the availability of the BurStFin package, this section is largely
redundant.
To use the R functions in this section:
1) Install R as described above (it's actually very easy).
2) Save the files ending in ".R" to some location on your computer.
3) Start R.
4) Source the ".R" files into R.
For example, at the R prompt type:
source("alpha.proxy.R")
(followed by hitting the enter key).
If you are on Windows, you may find it convenient to use the "Change dir"
item in the File menu.
5) Read the help file.
It will probably be easiest just to read help files in html -- either
here or copying the html files to your own computer.
General Utility Code
The following pieces of code along with their help files are
placed in the public domain by Burns Statistics.
The functions are designed to run in both S-PLUS and R.
Go to Burns Statistics Home.