Wikis > AlgoQuant > FAQs


  • On your web site I can read, suanshu.net-2.0.0.zip and algoquant-0.5.0.zip. Should we download both, or does AlgoQuant suffice and we get SuanShu with the algoquant-0.x.x.zip?
    • You just need to download algoquant-0.5.0.zip. It comes with the latest version of SuanShu as well. SuanShu.net is our experimental C# library and is free to download and use.
  • Which version of Java do you recommend?
    • We in house test all our code using a few thousands unit tests daily with 4 versions of jvm from Sun/Oracle: 1.6.x 32 and 64 bits, 1.7.x 32 and 64 bit. Your choice of jvm version is a personal decision. Although some of our developers use the IBM clone with eclipse, it is not part of our routine testing procedure. My personal preference is the Oracle 1.6.x 64 bit. We need 64 bit to process a large amount of data. We prefer 1.6.x because it is a much more mature product with history esp. amid-st the infamous security patches and testing/release policy from Oracle lately.
  • mvn compile does not work!
    • Please do mvn clean install before compile.
  • When building AlgoQuant with Maven, I got errors with the plugin Surefire. E.g., Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.14:test (default-test) on project algoquant-core: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.14:test failed
    • This problem seems to happen mostly on a Mac. Please try to use Surefire version 2.14.1 or above.
    • You may try to run the maven build with option “-e”.
    • You may try to skip the unit testing by option “-skipTests”. (In NetBeans, there is such an option under “Maven”.)
    • skipTests
    • If none of the above works, our wild guess is that your VM crash is due to insufficient memory.
  • For the licence, is there a way to change/specify the name of the file to look for?
    • You may rename your license file to whatever you like, and define “suanshu.license” property as the file name when you run your program. E.g., java -jar app.jar -Dsuanshu.license=numericalmethod_mymachine.lic
  • Using Eclipse, why do I get the following error messages from slf4j when I do mvn install?
    SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”SLF4J: Defaulting to no-operation (NOP) logger implementationSLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details

    • This is probably due to this Eclipse bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=387064
    • One workaround is to use an external Maven installation (instead of the embedded one). Go to Window > Preferences > Maven > Installations, then Add and select a local installation of Maven (say, 3.0.5).
  • When building AlgoQuant, it takes too long to run all the test cases, or some test cases fail.
    • You may skip running the test cases in Maven: http://stackoverflow.com/questions/6074752/in-netbeans-7-how-do-i-skip-testing-and-add-maven-additional-parameters-when-bui


  • Is the licence file valid for both SuanShu and AlgoQuant?
  • Does AlgoQuant have any student deal or academic license?
    • At this time, we do not offer any discount to AlgoQuant, which is a professional tool for making money. You may, however, download a trial version for evaluation.
  • What does the AlgoQuant library include? What is open source and what is not?
  • Is there a way to have *one* license file shared by multiple machines?
    • Yes, one license file can contain multiple MAC addresses so you can deploy/copy the same file to multiple machines.


  • Why did you choose to have indexes for matrices starting from 1 and not zero as for most structures in java (and c, …)? This complicates the adaptation of code to use SuanShu matrix models and prone to a lot of “+-1” errors in the indexes (for instance when simply iterating over an array *and* a matrix at the same time…)
    • Only the computer scientists count from 0. Everyone else on the planet earth, including the mathematicians, counts from 1. One reason for the computer scientists to count from 0 is indexing to an array element by adding an offset to a starting address. Back in the old C generation, suppose we do, double[] arr = new double[10]; , arr is also a reference to an address of a double or an array of doubles. The address of the 2nd element in the array is computed by adding 8 bytes to arr, i.e., arr + (2 – 1)* 8. In other words, the 2nd object is 1 unit (8 bytes) offset from the starting address. Therefore, an array index in C, C++, Java, C# is the number of offsets from a starting address. It is not the index of the object. SuanShu philosophy is to match symbolically the math equations as much as possible. Most math equations count from 1. All matrices and vectors count from 1. We think that this matching is important for code readability and verification against publications. When we compare our code to the papers, we need not mentally compute this +/-1. Otherwise, the code is very prone to errors, especially when there is a lot of indexing in a complex equation. To avoid doing the +/-1 in coding to some extend, I suggest that the users skip using [0], and count from 1. For example,
  • Is there a way to pass as DepthCaches as to have multiple “variables” sources (could be let’s say price, volume, some moving average, …) as to be able to retrieve them when implementing the interface DepthHandler method onDepthUpdate?
    • There are two ways you could do to let your strategy get extra information:
      • For information updated with depth, for example, moving average of price, depth volume, etc. You could simply extend the class Depth to include those information, and add your own SequentialCache<? extends Depth> to the DepthCaches which is passed to the simulator, like:
      • For non-depth updates, you can pass the cache of the updates to the simulator directly. Let’s take SimulationTimer as an example. SimulationTimer is a SequentialCache and is passed to the simulator like:

        Then, we add a simple handler instance in the enum ChannelMessageHandlerFactories for the simulator (e.g., ChannelMessageHandlerFactories.TIMER) to call back your strategy upon updates. Please also see DemoTimer in algoquant-demo for a complete example.


  • Can we trade live through the AlgoQuant platform?
    • Please note that AlgoQuant is a quantitative trading *research* platform, which is a large collection of trading algorithms and models, as well as a utilities for simulation and backtesting. In order to trade live using AlgoQuant, you will need to replace the simulator, e.g., broker, with a real broker. Our users have reported they connect AlgoQuant with Interactive Brokers API. We can also help you connect to your brokerage.