AlgoQuant

AlgoQuant is a collection of trading-bot building tools. It is an actively developed and ever more comprehensive library of code for building systems for algorithmic trading in all aspects. You can use it to build systems for backtesting, trading strategy generation, data analysis, research, and actual order execution. Out of the box, AlgoQuant supports data import, data filtering and cleaning, in-samples calibration, out-samples simulation and performance analysis. Beyond these, the main competitive advantage that AlgoQuant has over other software is the incorporation of SuanShu, a powerful modern library of mathematics, statistics, optimization and data mining. Unified Mathematical Analysis and Modeling Library AlgoQuant has a large collection of mathematical models, many from top academic journal publications, which a trader can use as building blocks to create his own trading models. For example, to build a mean reversion model, the trader can combine (D’Aspremont, 2011) to construct a maximally mean reverting portfolio of two assets and then trade the pair using (Elliott, van der Hoek, & Malcolm, 2005) pair trading strategy. Both mathematical modules are available in the library. In addition, AlgoQuant has a large number of algorithms that the trader can apply. For example, in the area of portfolio optimization, AlgoQuant covers Quadratic Programming (Markowitz or Modern Portfolio Theory), Second Order Conic Programming as well as Differential Evolution. In other words, using AlgoQuant, the trader does not need external math software like Excel, R, or MATLAB, and there are many readily available modules and algorithms to use. He can quickly build up very complicated mathematical strategies by combining together the components from the library. Uniqueness Numerical Method Inc. has a unique way...

BASIC

The BASIC package of SuanShu has the following list of features. calculus functions linear algebra basic optimization pseudo random number generators basic statistics stochastic differential equation curve fitting & interpolation geometry a parallelization framework...

Calculus

finite difference differentiation using Ridders’ method derivaties of functions for: Beta Beta Regularized Erf Gamma Gaussian multivariate differentiation: (bordered) Hessian gradient Jacobian Riemann integration Riemann integration using substitution rules: Double-Exponential rule Exponential rule Power law singularity Map to the Standard interval integration using Romberg’s method integration using Newton-Cotes formula Simpson’s rule Trapezoidal rule Midpoint rule integration using Gaussian quadrature Legendre polynomials Chebyshev polynomials Laguerre polynomials Hermite...

Coding an AlgoQuant Strategy

There have been a number of questions on how to create a quantitative trading strategy using AlgoQuant. This is a brief introduction to the process, which will hopefully answer all questions you my have. Basic knowledge of the Java programming language is required, although you do not need to be an expert to follow this tutorial. Sources of Inspiration Of course you will need an idea of the type of strategy you want to develop. There are a number of popular (such as Moving Averages and Pairs Trading) and some more exotic strategies already included in AlgoQuant. You can use them as a template and build your own ideas on top of them for rapid prototyping. If you don’t want to use any of the built in strategies you can of course develop your own from scratch, in which case you may still find existing strategies useful as a code base or as examples if you are ever unsure about how something is done. Implementing a Strategy Once you have an idea for a strategy, coding it up is very straightforward. During a simulation in AlgoQuant a strategy object gets notified if an event (such as a price update) occurs, so that it can then carry out an action if desired. The strategy only has to deal with the type of event it has subscribed to and hence the amount of boilerplate code you have to write is minimal. We define a strategy by implementing the Strategy interface. To handle updates of a certain kind, all you need to do is to process that kind of updates in onEvent()...

Coding Tools

To set up the coding environment for a new AlgoQuant project, please follow the following steps. JDK SuanShu and AlgoQuant are Java based code. Before we can code using the libraries, we need to install the latest Java Development Kit (JDK). If you skip this step, you can download it together with NetBeans in the next step. NetBeans NetBeans is our preferred IDE for Java programming. You may download and install JDK and then NetBeans. Or you can download “NetBeans with JDK” directly.   NetBeans can be downloaded from this link. If you have no Java programming experience, choose the one labeled “Java SE”. Run the installer. TortoiseSVN Download TortoiseSVN. Run the installer. More information on svn can be found in this wiki. After installing TortoiseSVN, right click in Explorer in the empty space in the folder you want to put your project in. Click “SVN checkout” to check out project. The following example checks out AlgoQuant. You will use the URL given to you instead. In most cases, you do NOT need to check out AlgoQuant as it will be automatically downloaded by Maven when you build your project. Coding in NetBeans Launch NetBeans. Open your project. You can right click on a package/folder to create a new Java class to start coding. If you are asked to modify AlgoQuant code, copy and paste the code in your project and do the editing there. Do NOT modify source code in AlgoQuant directly. To build your project, right click on the project and hit “Clean and Build”. Alternatively, you can hit this button on the top bar. To run your project, you need to...