BookmarkSubscribeRSS Feed
Timbim
Obsidian | Level 7

Hi Team,

I am working on a mini project and as part of that I need to determine the Present Value.

 

Can someone please help me how to compute Present Value? I could not find a PV function in SAS?

 

I was doing something like the following but SAS could not recognise the PV function I inserted.

 

PV((Current_DRInterestRate/Current_LoanPaymentFrequency),RemainingPeriods,CALCULATED MonthlyPmtPostMod)

 

 

Kind regards,

Mags

4 REPLIES 4
ballardw
Super User

The FINANCE function will do something like 53 different financial calculation from ACCRINT, accrued interest, to YIELDMAT, annual yield of a security that pays interest at maturity.

Timbim
Obsidian | Level 7

Hi Ballardw,

 

I am getting an error with the finance function. Below is my logic

 

Data loans06;

set loans05;

r= finance('pv',Current_DRInterestRate/Current_LoanPaymentFrequency,RemainingPeriods,MonthlyPmtPostMod);

run;

 

Below is the error message

 

SYMBOLGEN: Macro variable ACCESSIBLE resolves to ACCESSIBLE

14 Data loans06;

15 set loans05;

16 r= finance('pv',Current_DRInterestRate/Current_LoanPaymentFrequency,RemainingPeriods,MonthlyPmtPostMod);

_______

68

ERROR 68-185: The function FINANCE is unknown, or cannot be accessed.

17 run;

ballardw
Super User

@Timbim wrote:

Hi Ballardw,

 

I am getting an error with the finance function. Below is my logic

 

Data loans06;

set loans05;

r= finance('pv',Current_DRInterestRate/Current_LoanPaymentFrequency,RemainingPeriods,MonthlyPmtPostMod);

run;

 

Below is the error message

 

SYMBOLGEN: Macro variable ACCESSIBLE resolves to ACCESSIBLE

14 Data loans06;

15 set loans05;

16 r= finance('pv',Current_DRInterestRate/Current_LoanPaymentFrequency,RemainingPeriods,MonthlyPmtPostMod);

_______

68

ERROR 68-185: The function FINANCE is unknown, or cannot be accessed.

17 run;


When we have a MACRO message, such as our SYMBOLGEN result the issue can be related to a number of other macro generated statements from previous lines of code. And without the definition of the macro or data sets it is hard to trace.

If you extract that code from the middle of your macro and run alone what does the log show?

 

Since the FINANCE function is a BASE SAS function about the only reason I would expect to see such an error without macro code is either you are running a version of SAS that predates the FINANCE function or you are running this code in some module of SAS that can't access the function for some reason.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 2217 views
  • 0 likes
  • 3 in conversation