• COUNTDOWN TO 2024 UK RANKINGS

  • C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

C# referencing a table

Joined
7/16/08
Messages
1
Points
11
Hi there,

I normally work in APL where this question would be easy to solve but my boss wants me to begin working in C# so I need to figure out how to do this in C#. I working with the Visual Studio 2008 set up.

I have to build a program that reads an excel file and then does a number of calculations based on the data from each row of the file and then output a new Excel file with the original data plus a few new columns containing the results of the calculations. I don't know how to do this yet but my concern is getting the program ready in the form of an Excel user defined fuction and then I will change it to the format that my boss wants. My question regards referencing data from a table. The calculations that this program will do are related to calculating the present value of whole life annuities and therefore require referencing data on mortality rates. These normally have the following form. There are three columns, the first is the age, from 1 to 101. The second is the number of men remaing alive of an initial group of 100,000. The third is the same as the second but for women.

First of all, how can I add a table of data like this to a C# program? Secondly, how can I reference it in the formulas calculating the whole life annuities? From the start age I will need to calculate an annuity of each length multiplied by the probability that the person receiving the annuity will live exactly that length of payments. I plan to do this using a for loop. If anybody could help me with this I would really appreciate it.

Cheers,

Skip
:wall
 
Back
Top