Coder Social home page Coder Social logo

sahb1239 / excelfinancialfunctions Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fsprojects/excelfinancialfunctions

0.0 0.0 0.0 2.16 MB

A .NET library that provides the full set of financial functions from Excel.

Home Page: http://fsprojects.github.io/ExcelFinancialFunctions

License: Other

Batchfile 0.24% F# 99.65% Shell 0.11%

excelfinancialfunctions's Introduction

Issue Stats Issue Stats

ExcelFinancialFunctions NuGet Status

What is it?

This is a .NET 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.

Where I can find documentation on these functions?

Just open Excel and click on Formulas/Financial or go to this link There's also API reference

I don't think one of the function is right. Excel produces the wrong results! Why don't you do it right?

The 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

How do I use the library?

Just add ExcelFinancialFunctions.dll to the references in your project. The functions are provided as static methods on a Financial class in the Excel.FinancialFunctions namespace

Have you tested this thing?

Yes, there're 199,252 testcases running against it. You can easily raise that number significantly by adding new values to test in testdef.fs.
ExcelFinancialFunctions.ConsoleTests.sln contains the tests comparing the library results to Excel, so it should be installed on a test machine.
ExcelFinancialFunctions.Test.sln - the unit tests matching Excel 2010 (their parameters and results are read from files).
You can find more information on compatibility here.

Are there any functions that behave different from Excel?

Yes, there are two of them.

CoupDays

The Excel algorithm seems wrong in that it doesn't respect the following:

coupDays = coupDaysBS + coupDaysNC.

This equality should stand. The result differs from Excel by +/- one or two days when the date spans a leap year.

VDB

In the excel version of this algorithm the depreciation in the period (0,1) is not the same as the sum of the depreciations in periods (0,0.5) (0.5,1).

VDB(100,10,13,0,0.5,1,0) + VDB(100,10,13,0.5,1,1,0) <> VDB(100,10,13,0,1,1,0)

Notice 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.

(Note, the original version of the library is still available here.)

Build status

Build status

Build Status

Maintainer(s)

The default maintainer account for projects under "fsprojects" is @fsprojectsgit - F# Community Project Incubation Space (repo management)

excelfinancialfunctions's People

Contributors

fsprojectsgit avatar luajalla avatar misterspeedy avatar reedcopsey avatar sahb1239 avatar sergey-tihon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.