usnistgov / E3

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

Add mid-year discounting convention #22

Closed jkneifel closed 3 years ago

jkneifel commented 3 years ago

Currently E3 assumes end-of-year (EOY) discounting. We need to add a discounting convention variable that can be used to define whether its EOY or mid-year discounting (could eventually introduce continuous discounting using the same variable). Notes on mid-year discounting. Costs in Year 0 are discounted using t=0 (not discounted). Residual Values are discounted at the end of year (use t). All other costs are discounted at mid-year (t-0.5) instead of (t).

tashakim commented 3 years ago

Would the mid-year discounting variable a part of the Analysis object? Is this option (end-of-year or mid-year) something the users can select?

jkneifel commented 3 years ago

Yes, it would need to be a variable in the Analysis object. I will let David decide how we want to include it, either through adding a new variable or replacing an existing variable.

dw13813 commented 3 years ago

Hi,

There are two timestep inputs in Analysis. Timestep value is meant to hold the description of the timestep (“Monthly”, “Quarterly”, etc) while timestepVal is, for the time being, always one to represent compounding at the end of the timestep. timestepComp could easily be adapted to handle switching between compounding schemes. One could be retained for the standard end of timestep compounding, 0.5 for midyear compounding, and zero for continuous compounding, once it’s added. Just be careful as timestepComp is used in multiple formulas. I’m currently looking into the irr issue, but I already have a good idea where the problem is with that. I’m also building tests when I have time.

I’ve merged one of the pull requests for today but the “Refactor: Analysis object conditions” merge has a conflict. I’ll look at that in more detail tomorrow when I have time. The training course I’m taking is self-paced, so I’m trying to get through material as fast as I feel comfortable, hopefully I’ll be back to full time on E3 by Thursday.

David

From: jkneifel @.> Reply-To: usnistgov/E3 @.> Date: Monday, October 25, 2021 at 8:51 AM To: usnistgov/E3 @.> Cc: Subscribed @.> Subject: Re: [usnistgov/E3] Add mid-year discounting convention (Issue #22)

Yes, it would need to be a variable in the Analysis object. I will let David decide how we want to include it, either through adding a new variable or replacing an existing variable.

— 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/22#issuecomment-950891882, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AANSOMETRH5SPPWYRYFRJM3UIVHDBANCNFSM5GJGNCPQ. 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%7Cb132f7915ef54da4401008d997b6188d%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C637707630635012483%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=8KwUw2%2Fp8qCkNtyKrr%2BHlOhsK7Vy5HIOZwqsnmTxJUQ%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%7Cb132f7915ef54da4401008d997b6188d%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C637707630635022441%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=OGcB0vMj03oR8wh1%2FpSOAmQ3ez99cQ7UGeVQDHJNqB8%3D&reserved=0.

dw13813 commented 3 years ago

Sorry, timestepComp is the current value that is always one, NOT timestepVal.

From: jkneifel @.> Reply-To: usnistgov/E3 @.> Date: Monday, October 25, 2021 at 8:51 AM To: usnistgov/E3 @.> Cc: Subscribed @.> Subject: Re: [usnistgov/E3] Add mid-year discounting convention (Issue #22)

Yes, it would need to be a variable in the Analysis object. I will let David decide how we want to include it, either through adding a new variable or replacing an existing variable.

— 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/22#issuecomment-950891882, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AANSOMETRH5SPPWYRYFRJM3UIVHDBANCNFSM5GJGNCPQ. 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%7Cb132f7915ef54da4401008d997b6188d%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C637707630635012483%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=8KwUw2%2Fp8qCkNtyKrr%2BHlOhsK7Vy5HIOZwqsnmTxJUQ%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%7Cb132f7915ef54da4401008d997b6188d%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C637707630635022441%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=OGcB0vMj03oR8wh1%2FpSOAmQ3ez99cQ7UGeVQDHJNqB8%3D&reserved=0.

tashakim commented 3 years ago

Hi David, the merge conflict in “Refactor: Analysis object conditions” resulted from an earlier pull request - I am working on updating it and will push the changes today

Edit: Format was updated. There are no merge conflicts now