S2 IDE

S2 Integrated Development Environment (IDE) is the platform on which all our products run. Not only can it run all the standard Java and Kotlin libraries, it also provides seamless integration with our products. Simply purchase the license for the desired library, activate the license key and it is ready for use with S2. you can view our available products here and try them out here.

We also have products for financial analytics (AlgoQuant) and for market data analysis (SuperCurve).

S2 IDE will also be capable of interfacing with data science libraries such as WEKA, MOA, MEKA, DeepLearning4J, Mahout etc. and act as a platform where users can make use of all these libraries in a homogenous way to study data without having to learn each of the libraries in depth.

Use cases

Welcome to Numerical Method!

Numerical Method Incorporation Limited is a mathematics and technology company that

  • invents a modern computing technology to do numerical analysis;
  • creates a toolbox of quantitative finance algorithms to build trading bots;
  • advises on wealth management;
  • provides consulting service to solve engineering and business problems;
  • commercializes and sells research results to corporations.

Products

Customers

Our customers include

  • brokerage houses and funds all over the world
  • multinational corporations
  • very high net worth individuals
  • gambling groups
  • academic institutions

History

Dr. Haksun Li is a computer scientist by training and has a strong background in mathematics (B.S., M.S. in Mathematics from ​the University of Chicago, M.S., PhD. in Computer Science & Engineering from ​the University of Michigan, Ann Arbor). During his career as a quantitative trader/analyst in investment banks, he came across with a lot of mathematics software. The frustration was that the libraries/tools are written in ancient and arcane languages. Building a homogeneous system from these hybrid libraries to do, e.g., algorithmic trading, is challenging. Moreover, understanding the source code is often very difficult let alone modifying it. Finally, one day, reading the FORTRAN/C version of ALGORITHM AS 288 has convinced Haksun that the world will benefit from having one common, standard and supported mathematics library in modern languages, hence the birth of Numerical Method Inc.

In 2010, Dr. Haksun Li, together with Dr. Kevin Sun, founded Numerical Method Inc. Haksun named the software SuanShu after one of the earliest known Chinese mathematical treatises, ​算数书. The company is now a diversified team that consists of computer scientists, statisticians, applied mathematicians, etc. Many of our team members hold doctorate degrees and professorship from renowned universities.

FAQs

Maven

  • How do I exclude NM Dev’s dependencies in my own Java project?
    • NM Dev depends on some third-party modules:
      • akka-2.1.4
      • joda-time-2.8.2
      • kryo-2.22
      • heaps-2.0 (from teneighty.org)
      By default, Maven includes these transitive dependencies in the classpath. If you do not want them to be included in the classpath of your project, you may exclude them explicitly by adding an “exclusion” in the dependency section:<dependencies> <dependency> <groupId>com.numericalmethod</groupId> <artifactId>suanshu</artifactId> <version>${suanshu.version}</version> <exclusions> <exclusion> <groupId>com.esotericsoftware.kryo</groupId> <!-- exclude kryo --> <artifactId>kryo</artifactId> </exclusion> </exclusions> </dependency> </dependencies>See this guide for more information.

Licensing

  • 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.
  • Is it possible to have a license that runs on cloud machines?

Coding

  • 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 NM Dev 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. NM Dev 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,
      double[] v1 = new double[]{Double.NaN, 1., 2., 3., 4., 5.}; Vector v2 = new DenseVector(1., 2., 3., 4., 5.); Vector v3 = new DenseVector(3); for (int i = 1; i < = v1.length; ++i) { v3.set(i, v1[i] + v2.get(i)); }

Misc

Packages

NM Dev is a large collection of numerical algorithms covering many topics in mathematics. The following is a summary of our packages. For a complete listing, please refer to the Javadoc.

  • BASIC: basic numerical analysis algorithms
  • OPTIM: advanced optimization algorithms
  • STATS: advanced statistics algorithms
  • OPDE: ordinary and partial differential equations
  • DSP: digital signal processing
  • EVT: extreme value theory
  • many more……

All our code is well tested. We have thousands of test cases that run daily.

download the trial version to experiment with the library to decide whether it is suitable for your purpose, or whether the features you are looking for are included in the library or a particular version of the library. For example, we have listed “OLS regression” in the feature list, but not all possible mathematics, subjects, or topics related to OLS regression are found in the NM Dev library.

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 polynomials

Functions

  • polynomial
  • polynomial evaluation using Horner scheme
  • polynomial root finding using analytical formulae up to degree 4
  • polynomial root finding using the Jenkins Traub method
  • continued fraction
  • special functions:
    • Beta
    • regularized Beta
    • inverse of regularized Beta
    • cumulative Normal
    • inverse of cumulative Normal
    • Digamma
    • Erf
    • inverse of Erf
    • Gamma
    • lower incomplete Gamma
    • regularized Gamma P
    • inverse of regularized Gamma P
    • regularized Gamma Q
    • incomplete upper Gamma
    • Gaussian
    • logBeta
    • logGamma
    • Lanczos method

Geometry

  • comprehensive collection of trigonometric functions (complementary to Java’s Math class)
  • point and line segment
  • polygonal chain
    • Ramer-Douglas-Peucker algorithm

Curve Fitting & Interpolation

  • curve fitting
    • least-squares
  • online interpolation
    • the Neville method
  • univariate
    • linear
    • Newton polynomial
    • (natural) cubic spline
    • cubic Hermite spline
  • bivariate grid
    • bilinear
    • bicubic
    • bicubic spline
  • multivariate grid
    • multi-linear
    • multi-cubic spline
    • general recursive grid interpolation

Linear Algebra

  • vector
  • vector space
  • various matrix representations:
    • bi-diagonal
    • diagonal
    • tri-diagonal
    • Givens
    • Hilbert
    • lower/upper triangular
    • permutation
  • sparse vector representations:
  • sparse matrix representations:
    • CSR
    • DOK
    • LIL
  • iterative sparse matrix solver:
    • stationary
      • Jacobi
      • Gauss-Seidel
      • SOR
      • SSOR
    • non-stationary
      • Steepest Descent
      • BiCG
      • BiCGStabl
      • CGNE
      • CGNR
      • CG
      • CGS
      • GCR
      • GMRES
      • MinRes
      • QMR
    • pre-conditioner support
      • Jacobi
      • SSOR
      • customized
  • matrix elementary operations
  • Householder transformation
  • matrix inverse
  • matrix measures:
    • determinant
    • rank
    • trace
    • max
    • min
  • power of matrix
  • matrix pseudoinverse
  • matrix bi-diagonalization
  • matrix tri-diagonalization
  • Cholesky decomposition
  • Doolittle factorization
  • Eigen factorization
  • Gauss-Jordan elimination
  • SVD factorization (for asymmetric matrix)
  • Gram-Schmidt factorization
  • Hessenberg factorization
  • LDL decomposition
  • LU decomposition
  • QR decomposition