pub struct GoingConcernGenerator { /* private fields */ }Expand description
Generator for ISA 570 / ASC 205-40 going concern assessments.
Implementations§
Source§impl GoingConcernGenerator
impl GoingConcernGenerator
Sourcepub fn new(seed: u64) -> Self
pub fn new(seed: u64) -> Self
Create a new generator with the given seed and default configuration.
Sourcepub fn with_config(seed: u64, config: GoingConcernGeneratorConfig) -> Self
pub fn with_config(seed: u64, config: GoingConcernGeneratorConfig) -> Self
Create a new generator with custom configuration.
Sourcepub fn generate_for_entity(
&mut self,
entity_code: &str,
assessment_date: NaiveDate,
period: &str,
) -> GoingConcernAssessment
pub fn generate_for_entity( &mut self, entity_code: &str, assessment_date: NaiveDate, period: &str, ) -> GoingConcernAssessment
Generate a going concern assessment for a single entity.
§Arguments
entity_code— Entity code being assessed.assessment_date— Date the assessment was finalised (typically the financial statement approval date).period— Human-readable period descriptor (e.g. “FY2024”).
Sourcepub fn generate_for_entities(
&mut self,
entity_codes: &[String],
assessment_date: NaiveDate,
period: &str,
) -> Vec<GoingConcernAssessment>
pub fn generate_for_entities( &mut self, entity_codes: &[String], assessment_date: NaiveDate, period: &str, ) -> Vec<GoingConcernAssessment>
Generate assessments for multiple entities in a single batch.
Sourcepub fn generate_for_entity_with_input(
&mut self,
input: &GoingConcernInput,
period: &str,
) -> GoingConcernAssessment
pub fn generate_for_entity_with_input( &mut self, input: &GoingConcernInput, period: &str, ) -> GoingConcernAssessment
Generate a going concern assessment driven by actual financial data.
Financial indicators (recurring losses, negative working capital, negative
operating cash flow) are determined from the supplied GoingConcernInput.
Non-financial indicators (litigation, regulatory action, etc.) retain the
random element since they cannot be inferred from journal entries alone.
§Indicator mapping
net_income < 0→GoingConcernIndicatorType::RecurringOperatingLossesworking_capital < 0→GoingConcernIndicatorType::WorkingCapitalDeficiencyoperating_cash_flow < 0→GoingConcernIndicatorType::NegativeOperatingCashFlow
§Conclusion
0 indicators → NoMaterialUncertainty, 1–2 → MaterialUncertaintyExists,
3+ → GoingConcernDoubt (same rule as [generate_for_entity]).
Sourcepub fn generate_for_entities_with_inputs(
&mut self,
entity_codes: &[String],
inputs: &[GoingConcernInput],
assessment_date: NaiveDate,
period: &str,
) -> Vec<GoingConcernAssessment>
pub fn generate_for_entities_with_inputs( &mut self, entity_codes: &[String], inputs: &[GoingConcernInput], assessment_date: NaiveDate, period: &str, ) -> Vec<GoingConcernAssessment>
Generate assessments for multiple entities using financial data inputs.
Entities without a corresponding input fall back to random behaviour.