?
Solved

Calculate XIRR and XNPV in VB.Net

Posted on 2007-11-20
8
Medium Priority
?
6,433 Views
Last Modified: 2013-11-26
Does anyone know how to calculate XIRR and XNPV in VB.Net without referencing Excel.

I know there a .Net functions for IRR and NPV but I need to calculate XIRR and XNPV.
0
Comment
Question by:Estate_Master
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 1500 total points
ID: 20325898
Here is a well tested XIRR program with VB source code:
http://www.geocities.com/alexgutierrezotero/
0
 
LVL 53

Expert Comment

by:Dhaest
ID: 20325904
I would like to provide you the suggestions as follows:

1. Automation is a process that allows applications that are written in languages such as Visual Basic to programmatically control other applications. Automation to Excel allows you to perform actions such as creating a new workbook, adding data to the workbook, or creating charts. With Excel and other Microsoft Office applications, virtually all of the actions that you can perform manually through the user interface can also be performed programmatically by using Automation.

Excel exposes this programmatic functionality through an object model. The object model is a collection of classes and methods that serve as counterparts to the logical components of Excel. For example, there is an Application object, a Workbook object, and a Worksheet object, each of which contain the functionality of those components of Excel. To access the object model from Visual Basic .NET, you can set a project reference to the type library.

For further information, please take a look at the following article on Excel automation:

How to automate Microsoft Excel from Visual Basic .NET
http://support.microsoft.com/kb/301982/

2. List of Worksheet Functions Available to Visual Basic
http://msdn2.microsoft.com/en-us/library/bb211378.aspx
 
The list represents all of the worksheet functions that can be called using the WorkSheetFunction object.

3. There is a sample on using XIRR function in Visual Basic. You can consider to upgrade the project in VB 2005 IDE and run the project as VB.NET application

http://www.geocities.com/alexgutierrezotero/ 

0
 

Author Comment

by:Estate_Master
ID: 20336657
Thanks

I used the example and created it for XIRR.

Do you know of any of XNPV?
0
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20336848
I just have found a C++ implementation:
http://www.codecogs.com/cog-297
0
 

Expert Comment

by:DEWebWorks
ID: 34072490
Every article I read on this subject points to this:
http://www.geocities.com/alexgutierrezotero/

But that's a dead link :(
0
 

Expert Comment

by:barnaby-m
ID: 35933128
Does anyone on this thread have the source code?  
As DEWevWorks said above, it is a dead link :(
0
 

Author Comment

by:Estate_Master
ID: 35935720
Maybe you can get it from the cached version of that site?: http://web.archive.org/web/20091024014951/http://geocities.com/alexgutierrezotero/
0
 

Expert Comment

by:barnaby-m
ID: 35936436
Great thank you so much!
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question