Skip to content

Commit

Permalink
changes to FP (#378)
Browse files Browse the repository at this point in the history
  • Loading branch information
dtrzesniak authored Aug 29, 2023
1 parent b31408a commit d9d6a55
Showing 1 changed file with 40 additions and 4 deletions.
44 changes: 40 additions & 4 deletions ifrs17/Report/ReportScopes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1546,8 +1546,11 @@
"\n private IDataCube<ReportVariable> FcfDeltas => GetScope<Fcf>(Identity).Fcf.Filter((\"VariableType\", \"!BOP\"),(\"VariableType\", \"!EOP\")) +",
"\n GetScope<Fcf>(Identity).Fcf.Filter((\"VariableType\", AocTypes.BOP),(\"Novelty\", \"!I\"));",
"\n ",
"\n private IDataCube<ReportVariable> CurrentFcfDeltas => GetScope<CurrentFcf>(Identity).CurrentFcf.Filter((\"VariableType\", \"!BOP\"),(\"VariableType\", \"!EOP\")) +",
"\n GetScope<CurrentFcf>(Identity).CurrentFcf.Filter((\"VariableType\", AocTypes.BOP),(\"Novelty\", \"!I\"));",
"\n private IDataCube<ReportVariable> CurrentFcfDeltas => Identity.Id switch {",
"\n { ValuationApproach: ValuationApproaches.PAA, LiabilityType: LiabilityTypes.LRC } => FcfDeltas,",
"\n _ => GetScope<CurrentFcf>(Identity).CurrentFcf.Filter((\"VariableType\", \"!BOP\"),(\"VariableType\", \"!EOP\")) +",
"\n GetScope<CurrentFcf>(Identity).CurrentFcf.Filter((\"VariableType\", AocTypes.BOP),(\"Novelty\", \"!I\"))",
"\n };",
"\n ",
"\n // Financial Fp",
"\n private string variableTypeFpFinancial => Identity.Id switch {",
Expand Down Expand Up @@ -1614,13 +1617,46 @@
"\n // LoReCo",
"\n private IDataCube<ReportVariable> Loreco => GetScope<Loreco>(Identity).Loreco.Filter((\"VariableType\", \"!BOP\"),(\"VariableType\", \"!EOP\")) +",
"\n GetScope<Loreco>(Identity).Loreco.Filter((\"VariableType\", AocTypes.BOP),(\"Novelty\", \"!I\"));",
"\n ",
"\n",
"\n private IDataCube<ReportVariable> LorecoFx => -1 * Loreco.Filter((\"VariableType\", AocTypes.FX))",
"\n .AggregateOver(nameof(Novelty))",
"\n .SelectToDataCube(v => v with { VariableType = \"IFIE3\" });",
"\n",
"\n // PAA Revenues",
"\n private IDataCube<ReportVariable> PaaRevenue => GetScope<Revenues>(Identity).Revenues.Filter((\"VariableType\", \"!BOP\"),(\"VariableType\", \"!EOP\")) +",
"\n GetScope<Revenues>(Identity).Revenues.Filter((\"VariableType\", AocTypes.BOP),(\"Novelty\", \"!I\"));",
"\n",
"\n private IDataCube<ReportVariable> PaaRevenueFx => -1 * PaaRevenue.Filter((\"VariableType\", AocTypes.FX))",
"\n .AggregateOver(nameof(Novelty))",
"\n .SelectToDataCube(v => v with { VariableType = \"IFIE3\" });",
"\n",
"\n private IDataCube<ReportVariable> PaaRevenueFinancialChanges => 1 * (PaaRevenue.Filter((\"VariableType\", AocTypes.IA)) +",
"\n PaaRevenue.Filter((\"VariableType\", AocTypes.YCU)) +",
"\n PaaRevenue.Filter((\"VariableType\", AocTypes.CRU)) )",
"\n .AggregateOver(nameof(Novelty), nameof(VariableType))",
"\n .SelectToDataCube(v => v with { Novelty = Novelties.C, VariableType = variableTypeFpFinancial });",
"\n",
"\n // PAA Deferrals",
"\n private IDataCube<ReportVariable> PaaDeferrals => Identity.Id switch {",
"\n { ValuationApproach: ValuationApproaches.PAA, LiabilityType: LiabilityTypes.LRC }",
"\n => GetScope<Deferrals>(Identity).Deferrals.Filter((\"VariableType\", \"!BOP\"),(\"VariableType\", \"!EOP\")) +",
"\n GetScope<Deferrals>(Identity).Deferrals.Filter((\"VariableType\", AocTypes.BOP),(\"Novelty\", \"!I\")),",
"\n _ => Enumerable.Empty<ReportVariable>().ToArray().ToDataCube()",
"\n };",
"\n",
"\n private IDataCube<ReportVariable> PaaDeferralsFx => -1 * PaaDeferrals.Filter((\"VariableType\", AocTypes.FX))",
"\n .AggregateOver(nameof(Novelty))",
"\n .SelectToDataCube(v => v with { VariableType = \"IFIE3\" });",
"\n",
"\n private IDataCube<ReportVariable> PaaDeferralsFinancialChanges => 1 * (PaaDeferrals.Filter((\"VariableType\", AocTypes.IA)) +",
"\n PaaDeferrals.Filter((\"VariableType\", AocTypes.YCU)) +",
"\n PaaDeferrals.Filter((\"VariableType\", AocTypes.CRU)) )",
"\n .AggregateOver(nameof(Novelty), nameof(VariableType))",
"\n .SelectToDataCube(v => v with { Novelty = Novelties.C, VariableType = variableTypeFpFinancial });",
"\n",
"\n //Insurance Finance Income/Expense Oci",
"\n IDataCube<ReportVariable> InsuranceFinanceIncomeExpenseOci => FpFcfFx + FpFcfFinancial + OciFcfFx + OciFcfFinancial + CsmFx + CsmFinancialChanges + LcFx + LcFinancialChanges + LorecoFx;",
"\n IDataCube<ReportVariable> InsuranceFinanceIncomeExpenseOci => FpFcfFx + FpFcfFinancial + OciFcfFx + OciFcfFinancial + CsmFx + CsmFinancialChanges + LcFx + LcFinancialChanges + LorecoFx",
"\n + PaaRevenueFinancialChanges + PaaRevenueFx + PaaDeferralsFinancialChanges + PaaDeferralsFx;",
"\n}"
],
"metadata": {},
Expand Down

0 comments on commit d9d6a55

Please sign in to comment.