This scenario tests the YEARFRAC spreadsheet function, a function that is involved in many financial calculations.

In this scenario you will load a spreadsheet that contains several test cases using the YEARFRAC() function and compare your implementation's calculations with the reference results given in the spreadsheet.

  1. First read the presentation in the attached yearfrac.odp. This gives some background information on the YEARFRAC function and Day Count Conventions
  2. Next load one of the attached spreadsheet files. Use the ODS file if your implementations can process spreadsheets that use the ODF 1.2 formula namespace. Use the XLS file otherwise. These files have identical test cases.
  3. In columns A and B of the spreadsheet you will see the test dates. Column C calculates YEARFRAC given those dates. Column D gives the hard-coded correct results according to my interpretation of the ODF 1.2 Part 2 CD 02. Column E tests whether Column D equals Column C, in other words, whether the calculation of YEARFRAC is correct. It should indicate “True” or “1” depending on how your implementation displays Boolean values. Column F explains the test case.
  4. A successful run of this scenario will be one in which there are no “False” or “0” results in Column E.

yearfrac.odp yearfrac.ods yearfrac.xls

scenarios/20100415/yearfrac.txt · Last modified: 2010/10/24 18:14 (external edit)