This project is read-only.

1. Introduction is a free/open-source library with the aim to provide a object-oriented framework for
  • numerical computations, i.e. Linear Algebra operations, Numerical Integration, Fast-Fourier-Transformation, 1-/n-dimensional Optimization, curve/surface fitting, special functions etc.
  • quantitative finance (pricing and risk management).
The Excel interface of contains a part that can be seen as a high-level extension of the Excel-DNA library, i.e. it serves as building block for individual Excel Add-In's.
  • The runtime is free for all use, and distributed under a permissive open-source license that also allows commercial use.
  • The project Roadmap provide an overview of progress made towards releasing a version.
Release notes

2. Preliminaries

As the name indicates, the library requires
  • Microsoft .NET framework, at least .NET 4.0.
Moreover, the operation system should be
  • Windows XP, Windows Vista or Windows 7 etc. (32- or 64 bit).
Perhaps the framework works under Mono in an Linux environment as well, but it is not tested yet. The complete feature set of requires external libraries for BLAS, LAPACK, Random Number Generators, Fast-Fourier-Transformations (FFT) etc. Some assemblies contains unsafe code (for native code wrapper), thus the library must run in a full trust environment; in general this is no restriction at all.

... for the Excel Add-In:
The Excel interface is based on the Excel-DNA project, an intuitive open source .NET library for using .NET functions in Excel, designed by Govert van Drimmelen. The Add-In has been tested with
  • Microsoft Excel 2007 and Excel 2010 (32- and 64 bit).
It should work with other MS Excel versions as well. Macro running must be enable, at least for the .XLL file of the Add-In, change the security level if required. Moreover one should have the right to change (configuration) files in the specified directory.

3. Installation

The distribution of the project contains a .XLL file and several .dll files. One can use the .XLL file directly in Microsoft Excel. One may change the configuration of the Add-In in the corresponding menu entry (Ribbon). Furthermore the dll's of the project can be imported into your individual project. The Excel Add-In does not support all features of the framework.

The complete feature set of requires external (native) libraries for
  • BLAS,
  • Random Number Generators,
  • Fast-Fourier-Transformations (FFT), optimizer etc.
which are not part of the distribution (some managed code is available as fallback implementation). If these features are used one has to copy the corresponding libraries (dll's) into the specified binary folder. The configuration of the Excel-AddIn shows the corresponding file names etc., see also Dodoni.BasicMathLibrary etc.

4. Structure of the framework

The source code, thus the binaries as well, of the framework are separated into several assemblies, i.e. dll's. Each assembly is related to a specific purpose. The project consist of the following assemblies:

Contains basic classes and methods needed for the project. This assembly provide general stuff which is not directly related to mathematical problems, mathematical finance, Excel interface etc., for example a logfile framework and methods for configuration files etc.

Provides mainly the infrastructure and some basic implementations for mathematical operations, for example:
  • BLAS library (interface structure + a managed fallback implementation),
  • LAPACK library (wrapper for native code),
  • generic interface for Fast-Fourier-Transformations (FFT) (+ a dummy managed fallback implementation),
  • Vector operations (interface structure + a managed fallback implementation),
  • interfaces for Special functions,
  • interfaces for interpolation and parametrization of curves and surfaces with some basic implementations (linear, spline etc.)
  • interfaces for numerical integration, Random Number Generators, Optimization etc.
  • implementation for root finding algorithms for polynomials etc.
This enables to incorporate the functionality of 3th party mathematical libraries, as for example Math Kernel Library (MKL), AMD Core Math Library (ACML), Fastest Fourier Transform in the West (FFTW), NLopt, Yeppp! etc. See namespace
Dodoni.MathLibary.Native.<Name of 3th party Library>
for a specific wrapper. The Managed Extensibility Framework (MEF) is used to dynamic link some of the external mathematical libraries to the framework. The following assemblies provides wrapper for specific (native) 3th Party Libraries to enable the use of these Libraries within the framework:

Assembly Library
Dodoni.MathLibrary.Native.ACML AMD Core Math Library (ACML) Library
Dodoni.MathLibrary.Native.BLAS BLAS Library (Fortran interface)
Dodoni.MathLibrary.Native.CBLAS C-Interface of the BLAS Library (CBLAS)
Dodoni.MathLibrary.Native.FFTW FFTW Library
Dodoni.MathLibrary.Native.LibM LibM, a 64bit software library containing a collection of basic math functions and vector functions
Dodoni.MathLibrary.Native.MKL Math Kernel Library (MKL) Library
Dodoni.MathLibrary.Native.NLopt NLopt, a free/open-source library for nonlinear optimization
Dodoni.MathLibrary.Native.Yeppp Yeppp!, a high-performance SIMD-optimized mathematical library for x86, ARM, and MIPS processors on Windows, Android, Mac OS X, and GNU/Linux systems

Contains some managed implementation of mathematikcal functions, for example:
  • numerical integration algorithms (for example Gauss-Kronrod-Patterson etc.),
  • some curve/surface interpolation approaches,
  • some Special functions (for example erf(x), erfc(x), LambertW(x) etc.),
  • some 1-/n-dimensional optimization algorithm (Brent, Powell, PRAXIS etc.) etc.

Provides interfaces for day count conventions, business day conventions, holiday calendars, Market convention templates etc. Moreover it contains some Tenor arithmetic, Compounding rules, date factory etc. as well as an implementation of the Black-Scholes and the Bachelier (=normal Black) model etc. It does not contain an engine for pricing or risk management for financal instruments etc. This is located in a separate assembly.

Contains market usages, i.e. implementations for day count conventions, business day conventions, holiday calendars etc.

... for the Excel Add-In:

Provide functionality for a generic Excel Add-In, i.e. extends Excel-DNA by high-level methods, for example an object pool easy accessible in Excel, property/value Excel range queries etc.

Serves as Excel Add-In for the project that provides UDF's (user defined functions) for most of the functionality of the project. The source code is not yet published.

5. Further documentation

  • A documentation of the API of the framework is part of the distribution.
  • The unit tests of the project serves as living documentation.
... for the Excel Add-In:
  • A documentation of the UDF's (user defined functions) provided by the Excel Add-In of the project is still not available, but the distribution contains several example Excel sheets.
  • The name of each user defined function (UDF) of the Add-In starts with 'do' which can be interpreted as do for doing or as short-name for

6. Howto

  • ....write individual Excel Add-Ins with Excel-DNA and
Create a new .net project (at least .NET 4.0). Add references at least to the following assemblies of the distribution of Excel-DNA and
  • Dodoni.BasicComponents.dll,
  • Dodoni.XLBasicComponents.dll,
  • ExcelDna.Integration.dll.
Copy the 32- or 64-bit XLL file of Excel-DNA to the directory of the binaries of your .net project and store it under a file name of your choice. Create a text file with the same file name and suffix .dna with the following content:

<DnaLibrary RuntimeVersion="v4.0">
  <ExternalLibrary Path="Dodoni.XLBasicComponents.dll" ExplicitExports="true" Pack="true"/>
  <ExternalLibrary Path="NameOfYourProject.dll" ExplicitExports="true" Pack="true"/>
  <Reference AssemblyPath="Dodoni.BasicComponents.dll" Pack="true"/>

Of course the above file represents the simplest case only (the entry Pack="true" is optional). If necessary one has to add further references in the .dna file. One may have a deeper look in the documentation of the Excel-DNA project. For the features of the Dodoni.XLBasicComponents assembly we refer to the documentation of the API. Moreover the distribution contains a simple example project in the repository.
  • ...extend the Excel Add-In of the project?
If you like to add further UDF (user defined functions) to the Excel Add-In it is not recommended to extend or modify the Dodoni.XLIntegration assembly. Instead, create a new .net project (at least .NET 4.0) and add references to ExcelDna.Integration.dll of the distribution of Excel-DNA and to the required assemblies of the project, i.e. at least
  • Dodoni.BasicComponents.dll,
  • Dodoni.XLBasicComponents.dll,
  • Dodoni.XLIntegration.dll.
Copy the XLDodoni.dna file of the distribution of the project to the directory of the binaries of your .net project and store it under a file name of your choice. Modify the .dna file in a way that it refers to your .net project as well. Copy the 32- or 64-bit XLL file of Excel-DNA to the same directory and store it under the same name as the .dna file. This XLL should make available your individual UDF's.
  • ...use a specific logging?
Write an individual implementation for the ILogger interface and mark it with the Export attribute of the Managed Extensibility Framework (MEF), i.e.


Create or modify the configuration file of the project or of your individual project in the following way; for more information see BasicComponents:

<?xml version="1.0" encoding="utf-8"?>
    <section name="LoggingSetting" type="Dodoni.BasicComponents.Logging.Configuration.LoggingConfigurationFileSection, Dodoni.BasicComponents"/>
  <LoggingSetting typeName="YourNamespace.YourClass, YourAssemblyName" />
  • ...create an individual user interface with a separate implementation for Holiday calendar, business day conventions etc.? For example how to link the framework to a trading system?
Perhaps instead of the Excel Add-In you may use functionality of the library in a different program, for example a trading system. In this case you should ignore the assemblies of the framework which are connected to the Excel Add-In, i.e.
  • Dodoni.XLBasicComponents.dll and
  • Dodoni.XLIntegration.dll.
In general a trading system already contains implementations for Holiday calendar, business day conventions etc. Therefore you should replace Dodoni.FinanceCommonMarketUsages by a new assembly that wraps these functions and structures to the infastructure of

Last edited Jul 1, 2015 at 9:27 PM by dodoni, version 70