usnistgov / E3

API that provides standards based economic calculations.
Other
6 stars 3 forks source link

Analysis Object Conditions #27

Closed jkneifel closed 2 years ago

jkneifel commented 2 years ago

(1) I think we should adjust the requirement for a minimum of 2 of 3 values for real discount rate, nominal discount rate, and inflation rate. Here are the conditions: If real discount rate boolean = true, then you need either the real discount rate or both the nominal discount and inflation rates (used to calculate the real discount rate). Else need 2 of the 3 to ensure you have or can calculate the nominal discount and inflation rates (2) the federal and other income tax rates should not be required because we do not use them. they are for future versions that will be designed to handle profits/taxable gains (not applicable for the current non-income calculations). (3) check to see if the code will autofill the interest rate, MARR, and reinvestment rate with the appropriate discount rate (nominal discount rate if real boolean = false and real discount rate if real boolean = true)

dw13813 commented 2 years ago

For [1]: the code should be doing that already. The Pseudocode was designed to check if either the real DR or nominal DR values were missing and then fill in only if the one required by the Boolean was omitted. There may be an error in implementation. I’m trying to build tests in between training sessions but haven’t found time to run them. For [2]: We can either make them not required or default them to zero and alter their values only if the user explicitly gives values. For [3]: We can autofill them, however there’s no guarantee that the user’s MARR or reinvestment rate will equal the discount rate. We could treat them as optional for now and return blank values in the case there not needed.

From: jkneifel @.> Reply-To: usnistgov/E3 @.> Date: Tuesday, October 19, 2021 at 4:47 PM To: usnistgov/E3 @.> Cc: Subscribed @.> Subject: [usnistgov/E3] Analysis Object Conditions (Issue #27)

(1) I think we should adjust the requirement for a minimum of 2 of 3 values for real discount rate, nominal discount rate, and inflation rate. Here are the conditions: If real discount rate boolean = true, then you need either the real discount rate or both the nominal discount and inflation rates (used to calculate the real discount rate). Else need 2 of the 3 to ensure you have or can calculate the nominal discount and inflation rates (2) the federal and other income tax rates should not be required because we do not use them. they are for future versions that will be designed to handle profits/taxable gains (not applicable for the current non-income calculations). (3) check to see if the code will autofill the interest rate, MARR, and reinvestment rate with the appropriate discount rate (nominal discount rate if real boolean = false and real discount rate if real boolean = true)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/usnistgov/E3/issues/27, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AANSOMBBORMJZMGGAVTTSYLUHXKMLANCNFSM5GKBT6KA. Triage notifications on the go with GitHub Mobile for iOShttps://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7Cdavid.webb%40nist.gov%7C91d345d245eb4f4729c008d993419bfe%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C637702732282340622%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=0xWxY5kTb1vA0lyLii1l5QM0jMvoBx0dHXJpDmRD%2F7c%3D&reserved=0 or Androidhttps://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7Cdavid.webb%40nist.gov%7C91d345d245eb4f4729c008d993419bfe%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C637702732282350575%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=vyNU8lzobX9wHAiNoXqAWakjsARHyfeIlU5%2Fyx3wdD4%3D&reserved=0.

jkneifel commented 2 years ago

For (1), i know for certain that I cannot just provide the real discount rate as it errors out. For (2), i am ok with either approach. whatever the team thinks is best practice. For (3), agreed. I like making them optional and then only auto-populating if they are "null" and required. But the MARR and reinvestment rate will almost always be needed because they are needed for the AIRR. The interest rate is not currently being used and could be null.

dw13813 commented 2 years ago

Hi Josh,

[1] We have the option to make those three inputs optional, generate the objects, and only return an error if there isn’t enough information to obtain the desired discount rate. [2] I’ll let Tasha and Luke determine which is easier for them to implement on that. [3] I believe the current formula for AIRR uses the reinvest rate according to the formula in the original SRS document. We could add a check to that formula that looks to see if the reinvest rate exists and, if it doesn’t, uses the discount rate instead (it should probably throw a warning too) or we could make it required.

David

From: jkneifel @.> Reply-To: usnistgov/E3 @.> Date: Wednesday, October 20, 2021 at 8:39 AM To: usnistgov/E3 @.> Cc: "Webb, David H. (Fed)" @.>, Comment @.***> Subject: Re: [usnistgov/E3] Analysis Object Conditions (Issue #27)

For (1), i know for certain that I cannot just provide the real discount rate as it errors out. For (2), i am ok with either approach. whatever the team thinks is best practice. For (3), agreed. I like making them optional and then only auto-populating if they are "null" and required. But the MARR and reinvestment rate will almost always be needed because they are needed for the AIRR. The interest rate is not currently being used and could be null.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/usnistgov/E3/issues/27#issuecomment-947624306, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AANSOMB3BQOXIBZO7BBQJFDUH2Z6TANCNFSM5GKBT6KA. Triage notifications on the go with GitHub Mobile for iOShttps://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7Cdavid.webb%40nist.gov%7C23c8956148df41aa2a8308d993c69d70%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C637703303523632091%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=eWLPpm5hhWHbWRw48mPmKIF8LN1I%2Bf0D5RD3AUNjmuM%3D&reserved=0 or Androidhttps://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7Cdavid.webb%40nist.gov%7C23c8956148df41aa2a8308d993c69d70%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C637703303523632091%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=yZJxFsjOo5zoe%2F4zCnpT3z%2B3AB1LW5Qfd9j%2FkAaz2UI%3D&reserved=0.