{"ref":{"kind":"component","id":"discounted_cash_flow","key":"sha256:c4cdf3546263dd18512c95be6f7a689fcd0730c455efab31379749e51ed0192c"},"label":"Discounted Cash Flow","description":"Discount signed cash flows at explicit year fractions without imposing a price floor.","inputs":[{"label":"Cash Flow","name":"cash_flow","valueType":{"axes":[{"extent":null,"name":"payment","variable":true}],"dtype":"f64","unit":"$"}},{"label":"Discount Rate","name":"discount_rate","valueType":{"axes":[],"dtype":"f64","unit":"%"}},{"label":"Elapsed Years","name":"elapsed_years","valueType":{"axes":[{"extent":null,"name":"payment","variable":true}],"dtype":"f64","unit":"1"}}],"outputs":[{"label":"Available","name":"available","valueType":{"axes":[],"dtype":"f64","unit":"flag"}},{"label":"Discounted","name":"discounted","valueType":{"axes":[{"extent":null,"name":"payment","variable":true}],"dtype":"f64","unit":"$"}},{"label":"Value","name":"value","valueType":{"axes":[],"dtype":"f64","unit":"$"}}],"dependencies":[],"libraries":["returns"],"notes":{"conventions":["Cash flows are signed amounts in one currency and scale; elapsed years locate each payment relative to the valuation date.","Use one effective annual discount rate greater than minus one. Rates, timing, cash availability and equity versus enterprise scope belong to the caller.","Negative cash flows and negative present values remain visible. There is no price floor, inferred terminal value or automatic addition of balance-sheet cash.","Invalid negative times or an inadmissible discount rate produce zero placeholders with availability false; read the flag with every value."]},"calculation":{"nodes":[{"id":"input-cash_flow","label":"Cash Flow","kind":"input"},{"id":"input-discount_rate","label":"Discount Rate","kind":"input"},{"id":"input-elapsed_years","label":"Elapsed Years","kind":"input"},{"id":"step-value1","label":"(Discount Rate > -1)","kind":"step","rule":"(Discount Rate > -1)","sources":[{"node":"input-discount_rate"}]},{"id":"step-value0","label":"Conditional result using (Discount Rate > -1)","kind":"step","rule":"if (Discount Rate > -1), then if (Sum(Higher of (Elapsed Years × -1) and 0) = 0), then true, otherwise false, otherwise false","sources":[{"node":"step-value1"},{"node":"input-elapsed_years"}]},{"id":"step-discounted","label":"Discounted","kind":"step","rule":"if Conditional result using (Discount Rate > -1), then (Cash Flow ÷ ((1 + if (Discount Rate > -1), then Discount Rate, otherwise 0) ^ Higher of Elapsed Years and 0)), otherwise 0","sources":[{"node":"step-value0"},{"node":"input-cash_flow"},{"node":"step-value1"},{"node":"input-discount_rate"},{"node":"input-elapsed_years"}]},{"id":"output-available","kind":"output","label":"Available","rule":"if Conditional result using (Discount Rate > -1), then 1, otherwise 0","sources":[{"node":"step-value0"}]},{"id":"output-discounted","kind":"output","label":"Discounted","rule":"Discounted","sources":[{"node":"step-discounted"}]},{"id":"output-value","kind":"output","label":"Value","rule":"Sum(Discounted)","sources":[{"node":"step-discounted"}]}],"topics":[{"label":"Discounted Cash Flow","results":["output-available","output-discounted","output-value"]}]},"usedBy":[]}
