Using open source software for portfolio analysis

 is a compilation of open source software used to analyze portfolios. Topics covered include regression analysis, Monte Carlo simulation, and other statistical methods.

R
R is a language and environment for statistical computing and graphics.

RStudio is the free and open source integrated development environment (IDE) for R.

R has many packages available at CRAN Task Views. There is a page for finance that lists the available packages.

In the examples below, view the source code by clicking on the show/hide link of the title bar.

Asset correlation
Create a correlation matrix among 4 different funds. A matrix containing the correlations among the 4 funds, along with a set of plots is displayed.

The source code is available on finiki:  Asset allocation

Bond market simulation
Bogleheads forum member Linuxizer has developed a preliminary bond market simulator in R.
 * maRketSim - Bond market simulation in R, in the Bogleheads forum.

Multifactor regression
R is the preferred tool for performing multifactor regression analysis; a number of scripts are available in the referenced article under "R".

Statistical distribution moments, value at risk
Plot the 2nd (variance), 3rd (skewness), and 4th (kurtosis) statistical distribution moments of a fund. Additionally, examples of Value At Risk (VaR) are shown. The plots can be seen in the following forum post: Re: Risk = ?? and Re: Risk = ?? in the Financial Webring Forum

The source code is available on finiki:  Statistical distribution moments, value at risk

MATLAB clones
MATLAB® (MATrix LABoratory) is a high-level language and interactive environment for numerical computation, visualization, and programming. It is neither open source nor free. However, it's an industry standard and open source clones have been developed which strive to emulate MATLAB functionality.

Matlab Clones

Python
Python is a rapid development scripting language that is suitable for many tasks. Using add in libraries like NumPy and pandas make it easy to do financial analysis. There are many IDEs

The asset correlation analysis described above is available in Python. See finiki for the source code.

LibreOffice
LibreOffice is a Microsoft Office replacement. Spreadsheets are probably the most used financial analysis software.