NanoQL 2.2.0

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package NanoQL --version 2.2.0
                    
NuGet\Install-Package NanoQL -Version 2.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NanoQL" Version="2.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NanoQL" Version="2.2.0" />
                    
Directory.Packages.props
<PackageReference Include="NanoQL" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NanoQL --version 2.2.0
                    
#r "nuget: NanoQL, 2.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package NanoQL@2.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NanoQL&version=2.2.0
                    
Install as a Cake Addin
#tool nuget:?package=NanoQL&version=2.2.0
                    
Install as a Cake Tool

NanoQL

Quantitative finance for .NET, stateless by design: calendars, curves, instruments, pricing engines and models, each a plain function of its inputs, with market conventions as data. There are no observers, lazy objects or global evaluation date, so the same inputs always give the same results, on any thread.

dotnet add package NanoQL

It targets .NET 10. The conventions' XML format and the instruments and models beyond the core are in a second package, NanoQL.Extensions.

A first swap

A five-year SOFR swap on a flat curve. The evaluation date goes in an EvaluationContext, the curve and the swap are values, and the engine is a static function of them:

using NanoQL;
using NanoQL.Indexes;
using NanoQL.Instruments;
using NanoQL.PricingEngines;
using NanoQL.TermStructures;
using NanoQL.Time;

var today = new Date(15, Month.October, 2026);
var context = new EvaluationContext { EvaluationDate = today };
var curve = new FlatForward(today, 0.036, new Actual365Fixed());

var swap = new MakeOIS(new Period(5, TimeUnit.Years), new Sofr(curve))
    .WithFixedRate(0.036).WithNominal(10e6)
    .ToOvernightIndexedSwap(context);

var result = DiscountingSwapEngine.Calculate(swap, context, curve);
Console.WriteLine($"NPV {result.NPV:N2}, fair rate {result.FairRate:P4}");

How it is checked

The core's results are checked against QuantLib 1.44, using test vectors generated by QuantLib's Python package and by QuantLib built from source; the extensions ported from QLNet are checked against QLNet 1.13.2. What the checks cover, per module, is on the validation page.

More

License

Apache 2.0. nanoql is derived from QuantLib. The package carries LICENSE, NOTICE and THIRD_PARTY_NOTICES.md, which keep the copyright notices and licences of QuantLib and of the other code it carries.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on NanoQL:

Package Downloads
NanoQL.Extensions

nanoql's extensions: market conventions as XML data (calendars, day counts, indexes and the instruments' defaults), and instruments and models beyond the core.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.3.0 45 11/8/2026
2.2.0 53 11/7/2026
2.1.0 51 11/7/2026
2.0.0 53 11/4/2026