finance.payback_period
Calculates simple payback period from an initial investment and periodic cash flows, using linear interpolation to identify when cumulative cash flow becomes non-negative.
Instructions
단순 투자회수기간을 계산한다. cashflows 의 index 0 은 음수인 초기 투자이고 이후 값은 기간별 현금흐름이다. 누적 현금흐름이 처음 0 이상이 되는 기간 안에서 선형 보간하며, 회수되지 않으면 payback_period=null 과 recovered=false 를 반환한다. 화폐의 시간가치는 반영하지 않으며 decimals(기본 6)자리로 rounding(기본 HALF_EVEN) 처리한다.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| decimals | No | ||
| rounding | No | HALF_EVEN | |
| cashflows | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| _meta | No | 서버가 붙이는 영수증(integrity), 엔진, 힌트 | |
| trace | Yes | 계산 근거(tool, formula, inputs, steps, output) | |
| recovered | Yes | ||
| payback_period | Yes |