BioSTEAMDevelopmentGroup / Bioindustrial-Park

BioSTEAM's Premier Repository for Biorefinery Models and Results
MIT License
36 stars 17 forks source link

Consultation about calculation of loan principal, loan interest payment, loan payment #102

Closed zasddsgg closed 3 months ago

zasddsgg commented 4 months ago

Hello, as for the calculation related to loans (for example, loan principal, loan interest payment, loan payment), the formula used by BioSTEAM seems different from that used in the NREL report (excel file). May I ask what your consideration is based on? The NREL excel report is in attachment. dw1910a.xlsx

The details are as follows:

In NREL report:

Loan payment: Equity is 0.4 Calculated by FCI*(1-Equity)* interest * fn / (fn - 1). See it in Cell B11 in NREL excel’s DCFROR worksheet.

Loan principal: 0.08, 0.6, 0.32 is the construction schedule

The first year:FCI*(1-Equity)*0.08
The second year:FCI*(1-Equity)*0.6 + The first year
The third year:FCI*(1-Equity)*0.32+ The second year
The fourth year:FCI*(1-Equity)-annual loan payment+loan interest payment
The fifth year:The fourth year’s loan principal-annual loan payment+loan interest payment
And so on for the rest
See it in Cell C46-O46 in NREL excel’s DCFROR worksheet.

Loan interest payment:

The first year:loan principal*loan interest
The second year:loan principal*loan interest
The third year:loan principal*loan interest
The fourth year:FCI*(1-Equity)*loan interest
The fifth year:The fourth year’s loan principal* loan interest
And so on for the rest.
See it in Cell C45-O45 in NREL excel’s DCFROR worksheet.

In BioSTEAM:

Loan: 0.08, 0.6, 0.32 is the construction schedule, Equity is 0.4

The first year:FCI*0.08* Equity
The second year:FCI*0.6* Equity
The third year:FCI*0.32* Equity
The Loan cell is not found in the NREL report. What is loan equivalent to in the NREL report?

Loan interest payment:

The first year:(0+loan)*loan interest
The second year:(The first year’s loan principal+loan)*loan interest
The third year:And so on for the rest

Loan payment: According to https://github.com/BioSTEAMDevelopmentGroup/biosteam/blob/master/biosteam/_tea.py#L776-L792, it is sum(F2:F4)*0.08*(1+0.08)^10/((1+0.08)^10-1) Cell F2-F4 is in Cash flow worksheet in the cellulosic_ethanol excel report. 0.08 is the interest, 10 is the years.

Loan principal:

The first year:0-loan payment+loan interest payment+loan
The second year:The first year’s loan principal-loan payment+loan interest payment+loan
The third year:And so on for the rest.
See it in https://github.com/BioSTEAMDevelopmentGroup/biosteam/blob/master/biosteam/_tea.py#L774-L783.
yoelcortes commented 4 months ago

@zasddsgg, thank you so much for posting this issue. We are on it.

@yalinli2, it looks like the excel report from NREL finances 60% of the FCI, not 40% (which is what is written in the report). Our loan interest payment (FCI*Equity* interest * fn / (fn - 1)) looks almost the same as NREL's (FCI*(1-Equity)* interest * fn / (fn - 1)) except that we assume we pay interest on the equity. Do you think it is worth contacting NREL about this discrepancy? I'd like to get your thoughts on this before I do.

yalinli2 commented 4 months ago

@yoelcortes @zasddsgg I believe here's where the Excel file is from: https://www.nrel.gov/extranet/biorefinery/aspen-models/, thanks for posting this!

Oh well I guess I never looked into the default loan ratio in BioSTEAM, for some reason I thought it's always 60% but turns out not. I think NREL's report and Excel are consistent - both of them indicate 40% equity and 60% loan. @yoelcortes where did you see it's 60% loan?

Here's what the Executive Summary says image

Here's the text description: image

I think the term "financed" is confusing, I feel like it can be used either way (equity vs. loan)...

yoelcortes commented 4 months ago

@yalinli2, ahh, so this is my misunderstanding. The fraction that is not equity is the loan/fraction financed. We can change the finance_fraction to 0.6 to be consistent with the NREL report.

@zasddsgg, I would like to thank you again for investigating this issue and taking the time to post it here. The finance fraction has been updated in commit 8b7223b. Keep in mind that this is the fraction of capital cost that is financed by the loan. The formula for the yearly loan payment is in https://github.com/BioSTEAMDevelopmentGroup/biosteam/blob/648cb31e410cb7deb4ac983db2729c1bfea5d7c5/biosteam/_tea.py#L86.

Thanks,

zasddsgg commented 4 months ago

Thanks for the update, but BioSTEAM and NREL also seem to be different when it comes to the calculation of loan principal and loan interest payment, as shown above. May I ask you what considerations BioSTEAM is based on?

yoelcortes commented 4 months ago

@zasddsgg, I don't see any difference. It should be the exactly the same. Note that the loan interest payment equation is the same as NREL's and the final value of the loan principal goes to 0.

zasddsgg commented 4 months ago

Take the first two years as example.

The first year. loan principal of NREL: FCI*0.6*0.08, 0.08 is construction schedule loan principal of BioSTEAM: 0+loan interest payment+loan loan is FCI*0.6*0.08, so difference is the loan interest payment

loan interest payment of NREL: loan principalloan interest, i.e. ```FCI0.60.08loan interest loan interest payment of BioSTEAM: (0+loan)*loan interest, i.e.FCI0.60.08* loan interest```

The second year: loan principal of NREL: FCI*0.6*0.6 + FCI*0.6*0.08 loan principal of BioSTEAM: FCI*0.6*0.08*(1+0.08) +loan interest payment+ FCI*0.6*0.6

loan interest payment of NREL: loan principalloan interest, i.e. ```(FCI0.60.6 + FCI0.60.08)loan interest loan interest payment of BioSTEAM: (The first year’s loan principal+loan)loan interest, i.e. (loan interest payment+ FCI0.60.08+ FCI0.60.6) loan interest```

yoelcortes commented 3 months ago

@zasddsgg, you misread the code. Pay attention to the indices and options in the code and you will find that the end result is the same. You can also verify this with the cash flow sheet in excel.

Thanks,

zasddsgg commented 3 months ago

I got it. Thanks for your help again.