pub struct LeaseGenerator { /* private fields */ }Expand description
Generator for lease accounting records (IFRS 16 / ASC 842).
Implementations§
Source§impl LeaseGenerator
impl LeaseGenerator
Sourcepub fn generate(
&mut self,
company_code: &str,
commencement_anchor: NaiveDate,
config: &LeaseAccountingConfig,
framework: AccountingFramework,
) -> Vec<Lease>
pub fn generate( &mut self, company_code: &str, commencement_anchor: NaiveDate, config: &LeaseAccountingConfig, framework: AccountingFramework, ) -> Vec<Lease>
Generate config.lease_count leases for one entity.
Lease parameters are drawn from:
- Term: Normal(mean=
config.avg_lease_term_months, σ=~12) clamped to [6, 240]. - Fair value: LogNormal(μ=11, σ=1.3) — centered around $60k, heavy right tail for large real-estate leases.
- Fixed payment: ~fair_value / term_months × (1 + margin), margin drawn from Normal(0.15, 0.08).
- Discount rate: Uniform [0.03, 0.08] (typical IBR band).
- Classification proportion: driven by
config.finance_lease_percentvia setting thetransfers_ownershipflag on that share (ASC 842 Test 1) so the standards library classifies them Finance.
Auto Trait Implementations§
impl Freeze for LeaseGenerator
impl RefUnwindSafe for LeaseGenerator
impl Send for LeaseGenerator
impl Sync for LeaseGenerator
impl Unpin for LeaseGenerator
impl UnsafeUnpin for LeaseGenerator
impl UnwindSafe for LeaseGenerator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more