A free/open-source quantitative finance library written in C++ and connected to C# via SWIG.
Uses QuantLib-1.8 for 64-bit systems.
https://www.nuget.org/packages/NQuantLib64/
These instructions assume you are using Visual Studio 2013 and NuGet Package Explorer. Note that some of the sub-steps in steps 4, 12, and 14 may have already been implemented by the QuantLib developers.
- Download Boost and build in 64-bit mode.
- Download both QuantLib and QuantLib-SWIG.
- Open the QuantLib solution.
- In the QuantLib project Properties, perform the following settings for Configuration All Configurations and Platform All Platforms:
- Set General->Output Directory to **lib$(Platform)**.
- Set General->Intermediate Directory to **build$(qlCompilerTag)$(Platform)$(Configuration)**.
- Set VC++ Directories->Include Directories to the Boost directory (e.g., C:\boost_1_61_0).
- Set VC++ Directories->Library Directories to the Boost library file (e.g., C:\boost_1_61_0\lib64-msvc-12.0).
- Close the QuantLib project Properties.
- Set the Configuration Manager->Active solution platform to x64.
- Build the QuantLib project in both Debug and Release modes.
- Close the QuantLib solution.
- Add QL_DIR to your environmental variables and set it to the QuantLib directory (e.g., C:\QuantLib-1.8)
- Run swig.cmd in the QuantLib-SWIG C# solution directory.
- The swig.cmd file must point to your locally-installed swig executable (e.g., swig.exe for Windows). If you do not have this, you must download and install it from here.
- Open the QuantLib-SWIG C# solution.
- In the NQuantLibc project Properties, perform the following settings for Configuration All Configurations and Platform All Platforms:
- Set General->Output Directory to **bin$(qlCompilerTag)$(Platform)$(Configuration)**.
- Set General->Intermediate Directory to **build$(qlCompilerTag)$(Platform)$(Configuration)**.
- Set Linker->General to
$(QL_DIR)\lib$ (Platform).
- Close the QuantLib-SWIG C# project Properties.
- In the NQuantLib project Properties, perform the following settings for Platform x64:
- For Configuration set to Debug, set Build->Output path to **bin\x64\Debug**.
- For Configuration set to Release, set Build->Output path to **bin\x64\Release**.
- Build the NQuantLib project in both Debug and Release modes.
- Close the QuantLib-SWIG C# solution.
- Follow this tutorial on how to build your NuGet package.