Financial Functions for .NET
Considering that the .NET framework is easily on the short list for the most popular business application platform, it is surprising that financial functions are largely ignored. Sure there is a handful of methods squirreled away in VisualBasic.Financial, but most developers don’t even think to look there. It is no wonder companies often turn to Excel.
Luca Bolognese wears many hats. He is the lead program manager for C#, VB, and F# languages and compilers, as well as the DLR framework. Yet somehow he was able to take some time to reimplement 50 financial functions from Excel in F#.
The vast majority of the functions were coded to match Excel’s logic. Unfortunately Excel’s methods are designed for backwards compatibility and do not necessarily give the right answers. To wit Luca says,
My goal is to replicate Excel results (right and wrong). Feel free to contribute to the effort by coding what you think is the right solution and I'll add an ExcelCompliant flag to the function to conditionally invoke your code.
The source code can be downloaded from MSDN Code Gallery. It is released under the Microsoft Public License.
Tom Gilb & Kai Gilb Jan 26, 2015