oj! Algorithms  ojAlgo  is Open Source Java code that has to do with mathematics, linear algebra and optimisation; particularly (but certainly not exclusively) suitable for the financial domain.
High Performance on a Rich Feature Set with Zero Dependencies
This is the first release to require Java 8!
Download the latest prebuilt version of ojAlgo from SourceForge, fork the source code at GitHub or add the depency from The Central Repository with your favourite build tool.
For an outline of recent changes there is a changelog covering the latest 10 releases.
v37.1 (released on 20150131) still targets Java 7, and contains some of the improvements in v38. In particular the optimisation packages were backported.
ojAlgo is an Open Source project. It is available as source code, and every single source code file contain a copyright statement and a license agreement. All files have the same copyright and license. Optimatika holds the copyright, and the license used is the generous and easy to understand MIT license. Please read and comply with the license agreement  it's not hard. More...
Well... There is this web site, the JavaDoc. and a couple of wiki pages. More will follow, but the JavaDoc (and source code) will always be the main source of documentation. Improving the documentation will mainly be improving the JavaDoc. More...
For bug reports, questions or discussions related to ojAlgo; please use the ojAlgouser mailing list.
ojAlgo is Open Source Java code that has to do with mathematics, linear algebra and optimisation. ojAlgo really is 100% pure Java source code. There are no calls to native (C or Fortran) libraries. In fact there are no dependencies at all. Nothing besides a Java SDK is needed to compile or execute the code. Its feature set make it particularly suitable for use within the financial domain. Then again, it's just maths...
Presumably there are three main reasons why users/developers become interested in ojAlgo:
ojAlgo is an Open Source project. It is available as source code, and every single source code file contain a copyright statement and a license agreement. All files have the same copyright and license. Optimatika holds the copyright, and the license used is the generous and easy to understand MIT license. Please read and comply with the license agreement  it's not hard. More...
ojAlgo is a "high performance" multithreaded featurecomplete linear algebra package. It sports two implementation layers; BasicMatrix (higher/application level interface) and MatrixStore/PhysicalStore (lower/algorithm level interface) and supports three element types: double, BigDecimal and ComplexNumber. Further ojAlgo incorporates an unmodified copy/version of JAMA (implementing both the BasicMatrix and PhysicalStore interfaces).
double 


BigDecimal 

The table below shows that ojAlgo contains the most common matrix decompositions, and that most of them are also available for BigDecimal and ComplexNumber elements.
double 
BigDecimal 


Y 
Y 
Y 

Y 
Y 
Y 

Eigenvalue (symmetric/hermitian)

Y 
Y 
Y 
Eigenvalue (general)

Y 
N 
N 
Y 
Y 
Y 

Y 
Y 
Y 

Y 
Y 
Y 

Y 
N 
N 

Y 
Y 
Y 

Y 
Y 
Y 
"In a mathematical programming (or optimisation) problem, one seeks to minimize or maximize a real function of real or integer variables, subject to constraints on the variables. The term mathematical programming refers to the study of these problems: their mathematical properties, the development and implementation of algorithms to solve these problems, and the application of these algorithms to real world problems. Note in particular the word "programming" does not specifically refer to computer programming. In fact, the term "mathematical programming" was coined before the word "programming" became closely associated with computer software. This confusion is sometimes avoided by using the term optimisation as an approximate synonym for mathematical programming."
Mathematical Optimisation Society
ojAlgo contains LP (Linear Programming), QP (Quadratic Programming) and MIP (Mixed Integer Programming) solvers:
There's also a simple framework to model problems using standardised expressions as well as the ability to read MPS (Mathematical Programming System) files.
The ojAlgo LP/QP/MIP solvers are designed for when you need a pure Java solver for a smaller/simpler problem. Today the best commercial solvers (typically not written i Java) are very capable. ojAlgo can not compete with them. On the other hand, in many cases, a commercial solver is total overkill. There's a huge set of use cases where something like ojAlgo is a better choice.
The ojAlgo solvers have been around for years  particularly the QP solver. It dates back to the very beginning of ojAlgo 10 years ago. ojAlgo is extensively tested. Among the current test cases the only thing that doesn't work is semi continuous variables in MPS files/models. (This feature simply isn't supported at the moment.)
The Mixed Integer Problem Library (MIPLIB) maintains a collection of reference MIP problems. Among these a problem is considered "easy" if a commercial solver can solve it in less than 1 hour, and some problems are not yet solved by any solver. ojAlgo can solve several cases from that collection, but it typically takes longer than 1 hour. If you need to solve problems of this caliber you probably should get one the commercial solvers, but in many other cases ojAlgo will do just fine.
"Modern portfolio theory (MPT)—or portfolio theory—was introduced by Harry Markowitz with his paper "Portfolio Selection," which appeared in the 1952 Journal of Finance. Thirtyeight years later, he shared a Nobel Prize with Merton Miller and William Sharpe for what has become a broad theory for portfolio selection.
Prior to Markowitz's work, investors focused on assessing the risks and rewards of individual securities in constructing their portfolios. Standard investment advice was to identify those securities that offered the best opportunities for gain with the least risk and then construct a portfolio from these. Following this advice, an investor might conclude that railroad stocks all offered good riskreward characteristics and compile a portfolio entirely from these. Intuitively, this would be foolish. Markowitz formalized this intuition. Detailing a mathematics of diversification, he proposed that investors focus on selecting portfolios based on their overall riskreward characteristics instead of merely compiling portfolios from securities that each individually have attractive riskreward characteristics. In a nutshell, inventors should select portfolios not individual securities."
ojAlgo contains a collection of portfolio selection models, notably:
The classes in the FinancePortfolio hierarchy/package are designed to complement each other to, as a whole, offer extensive and flexible portfolio selection features.
In addition ojAlgo supports other things useful with "finance":
ojAlgo is an Open Source project. It is available as source code, and every single source code file contain a copyright statement and a license agreement. All files have the same copyright and license. Optimatika holds the copyright, and the license used is the generous and easy to understand MIT license. Please read and comply with the license agreement  it's not hard.
Typically the top of every java source code file looks like this:
/*
* Copyright © 2007 Optimatika (www.optimatika.se)
*
* Permission is hereby granted, free of charge,
to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
*
in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute,
sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so,
subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT
WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR
A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
You get ojAlgo from SourceForge; either as a compiled and packaged download, or as source code directly from CVS. More...
You get ojAlgo from SourceForge; either as a compiled and packaged download, or as source code directly from CVS. There is no schedule for when code changes or new releases are made. If you work directly from CVS you must be aware that the code may change, back and forth, at any time. It will however, 99% of the time, compile and run without any problem.
Download the latest prebuilt version of ojAlgo from SourceForge, or fork the source code at GitHub.
For an outline of recent changes there is a change log covering the latest 10 releases.
There are currently 8 modules in CVS, but perhaps only 1 is relevant to you:
ojAlgo currently targets Java 7. Up until v33 Java 5 was enough.
The SourceForge CVS module DevProj is mirrored at GitHub. The two source code repositories are used in parallel. It may not always be like this, but for now they're equally good. Use whichever you prefer.
Each of the CVS modules mentioned above are complete eclipse projects. Once you've set up your CVS repository location, in eclipse, all you need to do is "Check Out As..." on one of the modules (most likely DevProj). You do not need to do anything else! Required libraries (if any) are in the module/project. Some projects/modules may require you to also get one or some of the other projects/modules.
To build ojAlgo from source using the supplied ant script you need to check out all 8 cvs modules. Further the script assumes that DevProj, BizProj and TestProj are renamed ojAlgo, ModBusiness and ojAlgoTests respectively. (Actually you can name any of the 8 modules/projects anything you want. You just modify build.properties to match.)
There is this web site, the JavaDoc. and a couple of wiki pages. More will follow, but the JavaDoc (and source code) will always be the main source of documentation. Improving the documentation will mainly be improving the JavaDoc.
First of all you should look at What's in it? and its subsections Linear Algebra, Mathematical Programming and Modern Portfolio Theory.
To dig a little deeper browse the JavaDoc available at this site. Scanning through the change log and following its links to the JavaDoc might be a good way to do that.
For bug reports, questions or discussions related to ojAlgo; please use the ojAlgouser mailing list. And remember... others have done this before you. The list archives may answer some of your questions.
For bug reports, questions or discussions related to ojAlgo; please use the ojAlgouser mailing list.
Please use the mailing list. Do not contact Optimatika directly with bug reports, support requests, and/or academic discussions.
Regarding the list:
Please also note that the source code repository is browsable online.
Optimatika is a software consulting company specialising in advanced decision support systems. The ojAlgo code base only represents a small part of what we know. We build complete systems, and work extensively with databases and application servers as well as commercially available mathematics, optimisation and decision support tools.
In these cases please contact Optimatika directly.
No one knows the ojAlgo code base better than Optimatika!
BLaadin is a financial market simulation tool. It facilitates market analysis and forecasting as well as making portfolio recommendations. In particular it asserts consistency between forecasts and recommendations. At its core it makes use of the BlackLitterman model.
Information about BLaadin is currently maintained at the BLaadin Edge Financial Systems site.
There is a "public beta" version of BLaadin available online as a cloud service. The BLaadin Edge Financial Systems site contains information about how to find and use it.
BLaadin has its origin in a cooperation between Optimatika and the Royal Institute of Technology in Stockholm (KTH). That cooperation aimed to develop a prototype system/application using the BlackLitterman model, and to use that application in a behavioural finance case study. The case study resulted in a PhD thesis.
That was years ago... The prototype died and was revitalised several times until it was finally completely rewritten with a much more ambitious goal. BLaadin is now a fullfledged market simulation and portfolio construction tool.
BLaadin is programmed in Java, and everything related to mathematics and financials is in ojAlgo. BLaadin is NOT open source! ojAlgo is, but not BLaadin. The online "public beta" is free for you to try.
Project and site sponsored by Optimatika
Copyright © 2000  2014
Using JProfiler from ejtechnologies