Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions ifrs17/Import/ImportScopeCalculation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1869,7 +1869,7 @@
"\n //Switch",
"\n static ApplicabilityBuilder ScopeApplicabilityBuilder(ApplicabilityBuilder builder) => ",
"\n builder.ForScope<AllocateTechnicalMargin>(s => s",
"\n .WithApplicability<AllocateTechnicalMarginForReinsuranceCL>(x => x.Identity.IsReinsurance && x.Identity.AocType == AocTypes.CL) ",
"\n .WithApplicability<AllocateTechnicalMarginForReinsuranceCL>(x => x.Identity.IsReinsurance && x.Identity.AocType == AocTypes.CL)",
"\n .WithApplicability<AllocateTechnicalMarginForReinsurance>(x => x.Identity.IsReinsurance, ",
"\n p => p.ForMember(s => s.ComputedEstimateType)",
"\n .ForMember(s => s.HasSwitch))",
Expand All @@ -1881,11 +1881,10 @@
"\n ",
"\n [NotVisible] double AggregatedTechnicalMargin => GetScope<TechnicalMargin>(Identity).AggregatedValue; ",
"\n [NotVisible] double TechnicalMargin => GetScope<TechnicalMargin>(Identity).Value;",
"\n ",
"\n [NotVisible] string ComputedEstimateType => ComputeEstimateType(GetScope<TechnicalMargin>(Identity).AggregatedValue + TechnicalMargin);",
"\n [NotVisible] bool HasSwitch => ComputedEstimateType != ComputeEstimateType(GetScope<TechnicalMargin>(Identity).AggregatedValue);",
"\n ",
"\n //Allocate ",
"\n //Allocate",
"\n [NotVisible] string EstimateType => GetContext();",
"\n ",
"\n double Value => (HasSwitch, EstimateType == ComputedEstimateType) switch {",
Expand Down Expand Up @@ -1914,14 +1913,14 @@
"\n",
"\npublic interface AllocateTechnicalMarginForReinsurance : AllocateTechnicalMargin",
"\n{ ",
"\n //TODO add Reinsurance Coverage Update (RCU, Novelty=I) AocStep",
"\n //TODO add Reinsurance Coverage Update (RCU, Novelty=I) AocStep",
"\n private IEnumerable<string> underlyingGic => GetStorage().GetUnderlyingGic(Identity);",
"\n ",
"\n private double weightedUnderlyingTM => underlyingGic.Sum(gic => GetStorage().GetReinsuranceCoverage(Identity, gic) * ",
"\n GetScope<AllocateTechnicalMargin>(Identity with {DataNode = gic}).TechnicalMargin);",
"\n GetScope<TechnicalMargin>(Identity with {DataNode = gic}).Value);",
"\n ",
"\n private double weightedUnderlyingAggregatedTM => underlyingGic.Sum(gic => GetStorage().GetReinsuranceCoverage(Identity, gic) * ",
"\n GetScope<AllocateTechnicalMargin>(Identity with {DataNode = gic}).AggregatedTechnicalMargin);",
"\n GetScope<TechnicalMargin>(Identity with {DataNode = gic}).AggregatedValue);",
"\n ",
"\n private string ComputeReinsuranceEstimateType(double aggregatedFcf) => aggregatedFcf > Precision ? EstimateTypes.LR : EstimateTypes.C;",
"\n ",
Expand All @@ -1935,10 +1934,10 @@
"\n private IEnumerable<string> underlyingGic => GetStorage().GetUnderlyingGic(Identity);",
"\n ",
"\n private double weightedUnderlyingTM => underlyingGic.Sum(gic => GetStorage().GetReinsuranceCoverage(Identity, gic) * ",
"\n GetScope<AllocateTechnicalMargin>(Identity with {DataNode = gic}).TechnicalMargin);",
"\n GetScope<TechnicalMargin>(Identity with {DataNode = gic}).Value);",
"\n ",
"\n private double weightedUnderlyingAggregatedTM => underlyingGic.Sum(gic => GetStorage().GetReinsuranceCoverage(Identity, gic) * ",
"\n GetScope<AllocateTechnicalMargin>(Identity with {DataNode = gic}).AggregatedTechnicalMargin);",
"\n GetScope<TechnicalMargin>(Identity with {DataNode = gic}).AggregatedValue);",
"\n private string ComputeReinsuranceEstimateType(double aggregatedFcf) => aggregatedFcf > Precision ? EstimateTypes.LR : EstimateTypes.C;",
"\n ",
"\n string AllocateTechnicalMargin.ComputedEstimateType => ComputeReinsuranceEstimateType(weightedUnderlyingAggregatedTM + weightedUnderlyingTM);",
Expand Down Expand Up @@ -1970,7 +1969,6 @@
"\n : (double)default; });",
"\n",
"\n [NotVisible] bool AllocateTechnicalMargin.HasSwitch => Math.Abs(balancingValue) > Precision;",
"\n ",
"\n [NotVisible] double AllocateTechnicalMargin.AggregatedTechnicalMargin => balancingValue;",
"\n}",
"\n",
Expand Down
Loading