Hello,
SAS Version: 9.4 M5
I have tried to use the function FINANCE 'ppmt' with 0 interest rate but I have received the following warning:
"NOTE: Argument 2 to function FINANCE('PPMT',0,2,120,1000000,0,0) at line 37 column 14 is invalid."
I have used the same parameters in PPMT function and it works. The code I used is below and the result I was expecting from FINANCE ppmt is -8333.33.
data test2;
temp_finance=finance('PPMT',0,2,120,1000000,0,0); ===> .
temp_ppm=ppmt(0,2,120,1000000,0,0); ===>8333.333
run;
data test1;
temp_finance=finance('PPMT',0.08,2,120,1000000,0,0); ===> -8.42762968
temp_ppm=ppmt(0.08,2,120,1000000,0,0); ===> 8.4276296798
run;
A similar issue has been raised for FINANCE 'pv' (Solved: Invalid argument to function FINANCE 'pv' with 0 interest rate - SAS Support Communities) and it looks like a bug.
Regards,
smm662002
Hello,
The FINANCE function has a limitation which checks for (strictly) positive values for the "rate". If a negative (or zero) value is passed, it will return the message in the SAS log that Argument 2 is invalid.
The PPMT functions do not have this limitation.
Please use the PPMT function instead of the FINANCE function with the PPMT as the first argument.
Here is the link to the documentation on the PPMT function:
https://go.documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.5&docsetId=lefunctionsref&docsetT...
Good luck,
Koen
Hello,
The FINANCE function has a limitation which checks for (strictly) positive values for the "rate". If a negative (or zero) value is passed, it will return the message in the SAS log that Argument 2 is invalid.
The PPMT functions do not have this limitation.
Please use the PPMT function instead of the FINANCE function with the PPMT as the first argument.
Here is the link to the documentation on the PPMT function:
https://go.documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.5&docsetId=lefunctionsref&docsetT...
Good luck,
Koen
Hi Koen,
Thank you for your answer.
It would be great if SAS documentation would clearly mention the limitations of FINANCE function.
Regards,
smm662002
@smm662002 wrote:
It would be great if SAS documentation would clearly mention the limitations of FINANCE function.
You are absolutely right.
I was also surprised this is not in the official doc.
You can provide feedback on the doc if you want.
See feedback button on the top right.
https://go.documentation.sas.com/doc/en/helpcenterwlcm/1.0/home.htm
Koen
@sbxkoenk wrote:Hello,
The FINANCE function has a limitation which checks for (strictly) positive values for the "rate". If a negative (or zero) value is passed, it will return the message in the SAS log that Argument 2 is invalid.
The PPMT functions do not have this limitation.
Please use the PPMT function instead of the FINANCE function with the PPMT as the first argument.
Here is the link to the documentation on the PPMT function:
https://go.documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.5&docsetId=lefunctionsref&docsetT...
Good luck,Koen
Hi,
I have the same problem with Finance function.
I did resolve a problem with negative values for Rate by adding
*(1+Rate)**Nper;
after the function, but still have a problem for Zero value for rate.
I'm not sure that PPMT function can be a solution in my case, cause I need make calculation for negative values in Pmt as well, while PPMT function requires this parameter to be positive only.
Can you help in my case?
Here an example for numbers I made calculation on them.
I except to get r = 94 with given numbers:
Data AAA;
/* Rate = -0.0138067061143984;*/
Rate = 0;
/* Rate = 1;*/
Nper = 1;
Pmt = -94;
Pv = 0;
Type = 1;
r = Finance('Pv', Rate, Nper, Pmt, Pv, Type)*(1+Rate)**Nper;
Run;
Hello @IgorR ,
Can you make a new topic (new request)?
This topic is already closed (solved) and nobody will look into your follow-up question because of that.
Thanks,
Koen
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.