BookmarkSubscribeRSS Feed
sebsastian
Calcite | Level 5

Hello SAS community, I need a bit of help with the following problem. I am trying to calculate the the break even interest rate on a standard loan, in essence I am trying to goal seek for an interest rate that will result in an net present value of interest income equal to zero. To solve for this rate I am trying to use Proc Model from SAS/ETS. However, when I run the code I receive the following error message:

"1. ERROR: There are no model parameters declared. Cannot perform requested FIT task."

I do not know what this error is telling me. The code I am running is below:

data loan_characteristics;
input principal interest_rate months annual_fixed_cost cost_of_capital;
cards;
25000 0.05 12 500 0.1
;
run;

data loan_profit;
set loan_characteristics;
npv_interest_income = 0;

do m = 1 to months;
  interest_income =  principal*(interest_rate/12);
  npv_interest_income = npv_interest_income + (interest_income - annual_fixed_cost/12)/(1+cost_of_capital/12)**m;
  output;
end;
run;

data goal;
npv_interest_income = 0;
run;

proc model data=loan_profit
outmodel=loan_profitModel;
    npv_interest_income = npv_interest_income + (interest_income - annual_fixed_cost/12)/(1+cost_of_capital/12)**m;
    fit npv_interest_income / outest=demest;                                                    
    solve interest_rate / estdata=demest data=goal solveprint;
run;

5 REPLIES 5
ets_kps
SAS Employee

While I don't quite follow exactly what you would like to do, you need a "parameters ; " statement your PROC MODEL code for it to estimate anything. That is, you need an unknown parameter.  See this SAS/ETS User's Guide Example Programs

If your problem is to find an optimal solution, some example code is here. SAS/ETS User's Guide Example Programs

Best-Ken

FriedEgg
SAS Employee

You have several issues one of which ets_kps and your log have pointed out:

You do not define any parameters to estimate in order to look for fit in your model.  This can be done using several different statements depending on how you wish to define it's values;

GenDemo
Quartz | Level 8
Does anybody have an alternate solution to doing this without using proc model?
colabsas
Calcite | Level 5

Hi,

 

Proc Optmodel capability within SAS offers a promising solution to the similar to mentioned by you.

 

Regards

GenDemo
Quartz | Level 8

... and if you dont have proc optmodel...

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 2497 views
  • 1 like
  • 5 in conversation