Files
PhpSpreadsheet/tests/data/Calculation/Financial/PRICE.php
Mark Baker a34695e0f9 Financial functions more rationalization (#1990)
* Additional unit tests and rationalisation for Financial Functions
* Providing a series of sample files for Financial functions
* Refactor the last of the existing Financial functions
* Some more unit tests with default assignments from null arguments

Co-authored-by: Adrien Crivelli <adrien.crivelli@gmail.com>
2021-04-12 22:08:58 +02:00

226 lines
3.4 KiB
PHP

<?php
// Result, Settlement, Maturity, Rate, Yield, Redemption, Frequency, Basis
return [
[
'#VALUE!',
'xyz',
'15-Nov-2017',
0.0575,
0.065,
100,
2,
0,
],
[
'#VALUE!',
'15-Feb-2008',
'xyz',
0.0575,
0.065,
100,
2,
0,
],
[
'#VALUE!',
'15-Feb-2008',
'15-Nov-2017',
'xyz',
0.065,
100,
2,
0,
],
[
'#VALUE!',
'15-Feb-2008',
'15-Nov-2017',
0.0575,
'xyz',
100,
2,
0,
],
[
'#VALUE!',
'15-Feb-2008',
'15-Nov-2017',
0.0575,
0.065,
'xyz',
2,
0,
],
[
'#VALUE!',
'15-Feb-2008',
'15-Nov-2017',
0.0575,
0.065,
100,
'xyz',
0,
],
[
'#VALUE!',
'15-Feb-2008',
'15-Nov-2017',
0.0575,
0.065,
100,
2,
'xyz',
],
[
'#NUM!',
'15-Feb-2008',
'15-Nov-2017',
0.0575,
0.065,
100,
2,
-1, // invalid basis
],
[
'#NUM!',
'15-Feb-2008',
'15-Nov-2017',
0.0575,
0.065,
100,
2,
5, // invalid basis
],
[
'#NUM!',
'15-Nov-2017', // maturity before settlement
'15-Feb-2008',
0.0575,
0.065,
100,
2,
0,
],
[
'#NUM!',
'15-Feb-2008',
'15-Nov-2017',
0.0575,
0.065,
100,
5, // invalid frequency
0,
],
[
'#NUM!',
'15-Feb-2008',
'15-Nov-2017',
0.0575,
0.065,
100,
6, // had been coded as valid for gnumeric, but it isn't
0,
],
[
'#NUM!',
'15-Feb-2008',
'15-Nov-2017',
0.0575,
0.065,
100,
12, // had been coded as valid for gnumeric, but it isn't
0,
],
[
94.6343616213221,
'15-Feb-2008',
'15-Nov-2017',
0.0575,
0.065,
100,
2,
0,
],
[
94.635449207877201,
'15-Feb-2008',
'15-Nov-2017',
0.0575,
0.065,
100,
2,
1,
],
[
94.67215001,
'15-Feb-2008',
'15-Nov-2017',
0.0575,
0.065,
100,
1,
0,
],
[
110.83448359321601,
'01-Apr-2012',
'31-Mar-2020',
0.12,
0.10,
100,
2,
],
[
110.834537395859,
'01-Apr-2012',
'31-Mar-2020',
0.12,
0.10,
100,
2,
1,
],
[
110.9216934,
'01-Apr-2012',
'31-Mar-2020',
0.12,
0.10,
100,
4,
0,
],
[
110.9216934,
'01-Apr-2012',
'31-Mar-2020',
0.12,
0.10,
100,
4,
null,
],
[
110.9217251,
'01-Apr-2012',
'31-Mar-2020',
0.12,
0.10,
100,
4,
1,
],
[
110.9216934,
'01-Apr-2012',
'31-Mar-2020',
0.12,
0.10,
100,
4,
4,
],
];