From 97a7f80f68a4268a9d43833fe02d2deda9137964 Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Mon, 9 Apr 2012 21:17:07 +0000 Subject: [PATCH] Unit test data git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@89038 2327b42d-5241-43d6-9e2a-de5ac946f064 --- unitTests/rawTestData/Calculation/Financial/MIRR.data | 6 ++++++ .../rawTestData/Calculation/Financial/NOMINAL.data | 6 ++++++ unitTests/rawTestData/Calculation/Financial/NPER.data | 10 ++++++++++ unitTests/rawTestData/Calculation/Financial/NPV.data | 5 +++++ unitTests/rawTestData/Calculation/Financial/XIRR.data | 4 ++++ 5 files changed, 31 insertions(+) create mode 100644 unitTests/rawTestData/Calculation/Financial/MIRR.data create mode 100644 unitTests/rawTestData/Calculation/Financial/NOMINAL.data create mode 100644 unitTests/rawTestData/Calculation/Financial/NPER.data create mode 100644 unitTests/rawTestData/Calculation/Financial/NPV.data create mode 100644 unitTests/rawTestData/Calculation/Financial/XIRR.data diff --git a/unitTests/rawTestData/Calculation/Financial/MIRR.data b/unitTests/rawTestData/Calculation/Financial/MIRR.data new file mode 100644 index 00000000..0faa2b7d --- /dev/null +++ b/unitTests/rawTestData/Calculation/Financial/MIRR.data @@ -0,0 +1,6 @@ +#values finance_rate reinvestment_rate Result +{-120000;39000|30000|21000|37000|46000}, 0.10, 0.12, 0.12609413036591 +{-120000;39000|30000|21000}, 0.10, 0.12, -0.048044655249981 +{-120000;39000|30000|21000|37000|46000}, 0.10, 0.14, 0.13475911082831 +{-100;12|14|11}, 5.5, 5, 0.74021752686287 +{-100;12|14|11|13|16}, 5.5, 5, 1.8579321744785 diff --git a/unitTests/rawTestData/Calculation/Financial/NOMINAL.data b/unitTests/rawTestData/Calculation/Financial/NOMINAL.data new file mode 100644 index 00000000..932628c2 --- /dev/null +++ b/unitTests/rawTestData/Calculation/Financial/NOMINAL.data @@ -0,0 +1,6 @@ +#effect_rate npery result +0.053543, 4, 0.052500319868356 +0.10, 4, 0.09645475633778 +0.10, 2, 0.097617696340303 +0.025, 12, 0.024718035238113 +-0.025, 12, "#NUM!" diff --git a/unitTests/rawTestData/Calculation/Financial/NPER.data b/unitTests/rawTestData/Calculation/Financial/NPER.data new file mode 100644 index 00000000..0e0495a6 --- /dev/null +++ b/unitTests/rawTestData/Calculation/Financial/NPER.data @@ -0,0 +1,10 @@ +#rate pmt pv fv type result +0.01, -100, -1000, 10000, 1, 59.673865674295 +0.01, -100, -1000, 10000, 60.082122853762 +0.01, -100, -1000, -9.5785940398132 +0.003333333333, -1000, 50000, 54.78757726 +0.015, -1200, 9000, 5000, 1, 11.90373729 +0.015, -1200, 9000, 5000, 2, "#NUM!" +0.015, 0.0, 0.0, 5000, 1, "#NUM!" +0.0, 0.0, -500, 5000, 1, "#NUM!" +0.0, -50, -250, 150, 1, -2.0 diff --git a/unitTests/rawTestData/Calculation/Financial/NPV.data b/unitTests/rawTestData/Calculation/Financial/NPV.data new file mode 100644 index 00000000..41cd8012 --- /dev/null +++ b/unitTests/rawTestData/Calculation/Financial/NPV.data @@ -0,0 +1,5 @@ +#rate values result +0.10, -10000, 3000, 4200, 6800, 1188.4434123352 +0.08, 8000, 9200, 10000, 12000, 14500, 41922.061554932 +0.08, 8000, 9200, 10000, 12000, 14500, -9000, 36250.534912984 +0.05, 2000, 2400, 2900, 3500, 4100, 12678.677633095 diff --git a/unitTests/rawTestData/Calculation/Financial/XIRR.data b/unitTests/rawTestData/Calculation/Financial/XIRR.data new file mode 100644 index 00000000..7e3faeee --- /dev/null +++ b/unitTests/rawTestData/Calculation/Financial/XIRR.data @@ -0,0 +1,4 @@ +#values dates guess Result +{-10000;2750|4250|3250|2750|46000}, {"2008-01-01";"2008-03-01"|"2008-10-30"|"2009-02-15"|"2009-04-01"}, 0.10, 0.373362535 +{-100;20|40|25}, {"2010-01-01";"2010-04-01"|"2010-10-01"|"2011-02-01"}, -0.3024 +{-100;20|40|25|8|15}, {"2010-01-01";"2010-04-01"|"2010-10-01"|"2011-02-01"|"2011-03-01"|"2011-06-01"}, 0.2095