{"id":15011637,"url":"https://github.com/fsprojects/excelfinancialfunctions","last_synced_at":"2025-05-16T06:02:52.971Z","repository":{"id":12613398,"uuid":"15284484","full_name":"fsprojects/ExcelFinancialFunctions","owner":"fsprojects","description":".NET Standard library providing the full set of financial functions from Excel.","archived":false,"fork":false,"pushed_at":"2024-05-31T06:28:02.000Z","size":2437,"stargazers_count":199,"open_issues_count":7,"forks_count":64,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-04-08T15:12:31.151Z","etag":null,"topics":["dotnet-core","excel","financial-functions","fintech","nuget-package"],"latest_commit_sha":null,"homepage":"https://fsprojects.github.io/ExcelFinancialFunctions","language":"F#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fsprojects.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-12-18T13:55:08.000Z","updated_at":"2025-03-11T04:27:46.000Z","dependencies_parsed_at":"2023-01-11T20:19:08.372Z","dependency_job_id":"376ca49f-292a-47ea-8524-4a329c4ed7b3","html_url":"https://github.com/fsprojects/ExcelFinancialFunctions","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsprojects%2FExcelFinancialFunctions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsprojects%2FExcelFinancialFunctions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsprojects%2FExcelFinancialFunctions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsprojects%2FExcelFinancialFunctions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fsprojects","download_url":"https://codeload.github.com/fsprojects/ExcelFinancialFunctions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247867362,"owners_count":21009240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dotnet-core","excel","financial-functions","fintech","nuget-package"],"created_at":"2024-09-24T19:41:22.529Z","updated_at":"2025-04-08T15:12:44.447Z","avatar_url":"https://github.com/fsprojects.png","language":"F#","readme":"# Excel Financial Functions\n\nThis is a .NET Standard library that provides the full set of financial functions from Excel. The main goal for the library is compatibility with Excel, by providing the same functions, with the same behaviour. Note though that this is not a wrapper over the Excel library; the functions have been re-implemented in managed code so that you do not need to have Excel installed to use this library.\n\n[![Build+Test+Docs](https://github.com/fsprojects/ExcelFinancialFunctions/actions/workflows/push-master.yml/badge.svg)](https://github.com/fsprojects/ExcelFinancialFunctions/actions/workflows/push-master.yml)\n[![NuGet Badge](https://img.shields.io/nuget/v/ExcelFinancialFunctions.svg?style=flat)](https://www.nuget.org/packages/ExcelFinancialFunctions/)\n\n## Goal: Match Excel \n\nWe replicate the results Excel would produce in every situation,\neven in cases where we might disagree with Excel\\'s approach. Please have a look at the [Compatibility](http://fsprojects.github.io/ExcelFinancialFunctions/compatibility.html) page for more detail on this topic.\n\nMicrosoft\\'s official documentation on [Excel Functions](https://support.microsoft.com/en-us/office/excel-functions-by-category-5f91f4e9-7b42-46d2-9bd1-63f26a86c0eb) is the best place to learn more about how the functions should work. The scope for this library is the full set of functions in the \"Financial Functions\" category.\n\n### Thoroughly tested\n\nAs of last count, the library is validated against 199,252 test cases.\n\n* [ExcelFinancialFunctions.Tests](./tests/ExcelFinancialFunctions.Tests): Unit tests checking against previously-determined truth values from Excel 2010. Inputs and expected outputs are read from data files.\n* [ExcelFinancialFunctions.ConsoleTests](./tests/ExcelFinancialFunctions.ConsoleTests): Test cases comparing the library results directly to running Excel code via interop. These should be run on a Windows machine with Excel 2013 (or later) installed.  \n\n### Difference #1: CoupDays\n\nThere are two notable areas where we judged that Excel was sufficiently incorrect\nsuch that we needed to deviate from the primary goal of matching Excel precisely.\n\nThe first is the coupDays algorithm. Excel doesn't respect the following:\n\n```\ncoupDays = coupDaysBS + coupDaysNC.\n```\n\nThis equality should stand. The result differs from Excel by +/- one or two days when the date spans a leap year.\n\n### Difference #2: VDB\n\nIn the excel version of this algorithm the depreciation in the period (0,1) is not the same as \nthe sum of the depreciations in periods (0,0.5) (0.5,1).\n\n```\nVDB(100,10,13,0,0.5,1,0) + VDB(100,10,13,0.5,1,1,0) \u003c\u003e VDB(100,10,13,0,1,1,0)\n```    \n\nNotice that in Excel by using '1' (no_switch) instead of '0' as the last parameter everything works as expected.  The last parameter should have no influence in the calculation given that in the first period there is no switch to sln depreciation.\n\n### You can help!\n\nFound a discrepency? [Open an Issue](https://github.com/fsprojects/ExcelFinancialFunctions/issues)! Or better yet, a [Pull Request](https://github.com/fsprojects/ExcelFinancialFunctions/pulls).\n\n## Adding it to your project\n\nExcel Financial Functions is a .NET Standard 2.0 library, which you can add to any project\nbased on a .NET implementation which [supports the standard](https://docs.microsoft.com/en-us/dotnet/standard/net-standard). This includes .NET Framework 4.6.1 or later, and .NET Core 2.0 or later.\n\nSimply add it from NuGet in the usual way:\n\n```\nPS\u003e dotnet add package ExcelFinancialFunctions\n\n  Determining projects to restore...\ninfo : Adding PackageReference for package 'ExcelFinancialFunctions' into project \ninfo :   GET https://api.nuget.org/v3/registration5-gz-semver2/excelfinancialfunctions/index.json\ninfo :   OK https://api.nuget.org/v3/registration5-gz-semver2/excelfinancialfunctions/index.json 69ms\ninfo : Restoring packages for project.csproj...\ninfo : PackageReference for package 'ExcelFinancialFunctions' version '2.4.1' added to file 'project.csproj'.\ninfo : Committing restore...\nlog  : Restored project.csproj (in 72 ms).\n```\n\n## Using it\n\nEven though the libary is written in F#, you can use it from any .NET language, including C#. The functions are provided as static methods on a Financial class in the Excel.FinancialFunctions namespace.\n\n``` c#\nusing Excel.FinancialFunctions;\n\nConsole.WriteLine( Financial.IPmt(rate: 0.005, per: 53, nper: 180, pv: 200000, fv: 0, typ: PaymentDue.EndOfPeriod) );\n// Displays -796.3747578439793\n\nConsole.WriteLine( Financial.Pmt(rate: 0.005, nper: 180, pv: 200000, fv: 0, typ: PaymentDue.EndOfPeriod) );\n// Displays -1687.7136560969248\n```\n\nOr from F#:\n\n```F#\nopen Excel.FinancialFunctions\n\nprintfn \"%f\" \u003c| Financial.IPmt (0.005, 53., 180., 200000., 0., PaymentDue.EndOfPeriod) \n// Displays -796.374758\n\nprintfn \"%f\" \u003c| Financial.Pmt (0.005, 180., 200000., 0., PaymentDue.EndOfPeriod) \n// Displays -1687.713656\n```\n\n## Code of Conduct\n\nThis repository is governed by the [Contributor Covenant Code of Conduct](https://www.contributor-covenant.org/).\n\nWe pledge to be overt in our openness, welcoming all people to contribute, and pledging in return to value them as whole human beings and to foster an atmosphere of kindness, cooperation, and understanding.\n\n## Library license\n\nThe library is available under Apache 2.0. For more information see the [License file](./LICENSE.txt).\n\n## The origin\n\nThe original author is [Luca Bolognese](https://github.com/lucabol). His story:\n\n\u003e I coded it the summer my daughter was born 12 years ago while back in Italy for three months. It is one of my first forays into functional programming.\n\u003e \n\u003e I coded most of them with the sea in front of me. I would bet that it is one of the most Excel-compliant libraries in existence across all languages.\n\u003e \n\u003e I am happy that the tests still pass! This is a testament to good backward compatibility in the language.\n\u003e \n\u003e We think this is one of the most Excel compliant libraries in existence because of the extensive test-suite.\n\n## Maintainers\n\nCurrent maintainer is [James Coliz](https://github.com/jcoliz).\n\nHistorical maintainers of this project are [Natallie Baikevich](https://github.com/luajalla) and [Chris Pell](https://github.com/jcoliz). And of course, where would we be without [Don Syme](https://github.com/dsyme)?\n\nThe default maintainer account for projects under \"fsprojects\" is [@fsprojectsgit](https://github.com/fsprojectsgit) - F# Community Project Incubation Space (repo management)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffsprojects%2Fexcelfinancialfunctions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffsprojects%2Fexcelfinancialfunctions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffsprojects%2Fexcelfinancialfunctions/lists"}