Overview
Develop a sophisticated yield calculation engine that accurately computes returns with support for multiple compounding modes (daily, continuous), APR/APY conversions, and yield projections (±0.01% accuracy).
Description
The yield engine powers accurate earnings tracking and reporting. It must handle various compounding schedules, support variable rate changes with time-weighted accrual, and provide projections for yield forecasting.
Direction
- Implement compound interest formulas for daily and continuous compounding modes
- Create
open_yield_position() to initialize yield tracking with principal and APR
- Develop
accrue_yield() to checkpoint yield calculations to the current timestamp
- Implement
current_yield() for real-time yield without state mutations
- Create
set_yield_rate() with time-weighted accrual on APR changes
- Implement APR/APY conversion functions with configurable precision
- Develop
project_yield() for future earnings estimation
Acceptance Criteria
Overview
Develop a sophisticated yield calculation engine that accurately computes returns with support for multiple compounding modes (daily, continuous), APR/APY conversions, and yield projections (±0.01% accuracy).
Description
The yield engine powers accurate earnings tracking and reporting. It must handle various compounding schedules, support variable rate changes with time-weighted accrual, and provide projections for yield forecasting.
Direction
open_yield_position()to initialize yield tracking with principal and APRaccrue_yield()to checkpoint yield calculations to the current timestampcurrent_yield()for real-time yield without state mutationsset_yield_rate()with time-weighted accrual on APR changesproject_yield()for future earnings estimationAcceptance Criteria