Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
ab3287a
add Amortisation Factor
sbatka May 10, 2023
07fdeee
add ContractTerm
sbatka May 11, 2023
e38c5c8
add InterpolationMethod at Start
sbatka May 11, 2023
62178af
prepare Getters in storage
sbatka May 11, 2023
2693e2c
add getters to ImportStorage
sbatka May 15, 2023
eb87139
add some tests
sbatka May 15, 2023
90f3a9a
Extrapolate Defferable Cashflow from first 12 values
sbatka May 15, 2023
b0b928e
add EconomicBasis to SDNP
sbatka May 16, 2023
ca45cd9
bit more
sbatka May 16, 2023
1fbdea5
enhance Param files
sbatka May 16, 2023
93b0e93
bit more data in Parameters + move CU and P
sbatka May 16, 2023
ff21851
adapt CFS for CU change
sbatka May 17, 2023
9c7c0fe
fix test file
sbatka May 17, 2023
acdff11
remove unused methods
sbatka May 17, 2023
15246af
fix signature & remove unused getter
sbatka May 17, 2023
6f949ff
reset Param files since these are optional
sbatka May 17, 2023
6401188
add validations to new parameter items
sbatka May 17, 2023
e0d659f
add ContractDuration to data model
sbatka May 17, 2023
6aad342
adapt data model
sbatka May 17, 2023
4db3cc3
adapt UnitTests for new Parameters (not passing yet)
sbatka May 17, 2023
07f3115
some documentation
sbatka May 17, 2023
23ce6b0
bit more
sbatka May 17, 2023
a9594c5
fix signature of Interpolate method
sbatka May 17, 2023
aa1066d
on importers and tests
dcolleoni May 22, 2023
935d678
clean up
dcolleoni May 22, 2023
e61b779
Cu,P
dcolleoni May 22, 2023
3863315
cu,P
dcolleoni May 22, 2023
41b4ed0
clean up
dcolleoni May 22, 2023
5952241
allow CashFlowPeriodicity and InterpolationMethod in cashflow importer
sbatka May 22, 2023
be46b84
fix tests
dcolleoni May 22, 2023
e8efe1f
Merge remote-tracking branch 'origin/DacAmortFactor' into DacAmortFactor
dcolleoni May 22, 2023
9d42003
renaming
sbatka May 23, 2023
cb180d1
fix validations
sbatka May 23, 2023
f6dbd76
more importer changes
sbatka May 23, 2023
9cfeaa3
normalize and test
dcolleoni May 23, 2023
733c7af
refactor the amortization factor calc
dcolleoni May 23, 2023
a047f48
fix test
dcolleoni May 23, 2023
e587885
fix tests
dcolleoni May 23, 2023
0230b25
update of scaffolding
sbatka May 23, 2023
b6817eb
fix test of ReleasePattern values
sbatka May 25, 2023
d7a59f9
documentation
sbatka May 25, 2023
3d2c3c7
update documentation and cleanup
sbatka May 25, 2023
9e1d33e
cosmetic
sbatka May 25, 2023
9f24a8d
fix the parser special cases & documentation
sbatka May 25, 2023
1af7594
new Validation
sbatka May 25, 2023
3137b9d
calculation
dcolleoni May 25, 2023
d0ad344
new data
dcolleoni May 25, 2023
717760e
Merge remote-tracking branch 'origin/DacAmortFactor' into PatternSetUp
dcolleoni May 25, 2023
f33831e
Merge branch 'develop' into DacAmortFactor
sbatka May 25, 2023
c21b122
rename
dcolleoni May 25, 2023
dd770a2
post merge fix
sbatka May 25, 2023
f95c97c
compiles after merge
dcolleoni May 25, 2023
e581caf
Normilize not to return null but empty enum
dcolleoni May 25, 2023
cab7a30
Merge branch 'paaData' into DacAmortFactor
dcolleoni May 25, 2023
b9f0ff3
Fix Amf from IfrsVariable (to be cherry picked)
dcolleoni May 26, 2023
fe77ff1
update bm and ifrsVartest
dcolleoni May 26, 2023
d8f0ca0
Merge remote-tracking branch 'origin/develop' into DacAmortFactor
dcolleoni May 26, 2023
60b5d24
Merge remote-tracking branch 'origin/develop' into DacAmortFactor
dcolleoni May 26, 2023
9929e65
fix metadata issue
dcolleoni May 26, 2023
9f47f4f
amortization factor scopes for deferrals
dcolleoni May 26, 2023
c172bc6
deferral calculation
dcolleoni May 30, 2023
7c30894
refinements
dcolleoni May 30, 2023
974f15c
reportVariable and clean up
dcolleoni May 31, 2023
8aa6258
improvements
dcolleoni May 31, 2023
c9c7fc0
fixes
dcolleoni Jun 1, 2023
299f4e8
refinements and add paa data
dcolleoni Jun 1, 2023
2fb9a96
clean up
dcolleoni Jun 1, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ReportingNode,Year,Month
CH,2020,12
,,
@@SingleDataNodeParameter,,
DataNode,PremiumAllocation,CashFlowPeriodicity,InterpolationMethod,ReleasePattern0,ReleasePattern1,ReleasePattern2,ReleasePattern3,ReleasePattern4
DataNode,PremiumAllocation,CashFlowPeriodicity,InterpolationMethod,EconomicBasisDriver,ReleasePattern0,ReleasePattern1,ReleasePattern2,ReleasePattern3,ReleasePattern4
GicComplex,0.8,Monthly,
DT1.1,0.8,Monthly,
DT1.2,0.8,Monthly,
Expand All @@ -15,7 +15,7 @@ DT2.2,0.8,Monthly,
DT3.1,0.8,Monthly,
DT4.1,0.8,Monthly,
DT10.1,0,Yearly,Uniform,
DT10.2,0,Yearly,Uniform,1.41,1.14,0.87,0.58
DT10.2,0,Yearly,Uniform,N,1.41,1.14,0.87,0.58
,,
@@InterDataNodeParameter,,
DataNode,LinkedDataNode,ReinsuranceCoverage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,16 @@
{
"cell_type": "code",
"source": [
"await Import.FromFile(\"../../Files/TransactionalData/NominalCashflows_CH_2020_12.csv\")",
"ProjectionCount = 5;"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"await Import.FromFile(\"../../Files/TransactionalData/NominalCashflowsPAA_CH_2020_12.csv\")",
"\n .WithFormat(ImportFormats.Cashflow)",
"\n .WithTarget(DataSource)",
"\n .WithActivityLog()",
Expand Down Expand Up @@ -229,7 +238,7 @@
{
"cell_type": "code",
"source": [
"var ivs = Scopes.ForIdentities(identities, storage).ToScopes<PvToIfrsVariable>().SelectMany(x => x.PvLocked.Concat(x.PvCurrent)).ToArray();"
"int projection = 0;"
],
"metadata": {},
"execution_count": 0,
Expand All @@ -238,7 +247,7 @@
{
"cell_type": "code",
"source": [
"var ivs = Scopes.ForIdentities(identities, storage).ToScopes<NominalToIfrsVariable>().SelectMany(x => x.CumulatedNominal).ToArray();"
"var ivs = Scopes.ForIdentities(identities.Select(id => id with {ProjectionPeriod = projection}), storage).ToScopes<PvToIfrsVariable>().SelectMany(x => x.PvLocked.Concat(x.PvCurrent)).ToArray();"
],
"metadata": {},
"execution_count": 0,
Expand All @@ -247,7 +256,7 @@
{
"cell_type": "code",
"source": [
"var ivs = Scopes.ForIdentities(identities, storage).ToScopes<RaToIfrsVariable>().SelectMany(x => x.RaCurrent.Concat(x.RaLocked)).ToArray();"
"var ivs = Scopes.ForIdentities(identities.Select(id => id with {ProjectionPeriod = projection}), storage).ToScopes<NominalToIfrsVariable>().SelectMany(x => x.CumulatedNominal).ToArray();"
],
"metadata": {},
"execution_count": 0,
Expand All @@ -256,7 +265,7 @@
{
"cell_type": "code",
"source": [
"var ivs = Scopes.ForIdentities(identities, storage).ToScopes<ActualToIfrsVariable>().SelectMany(x => x.Actual.Concat(x.AdvanceActual).Concat(x.OverdueActual)).ToArray();"
"var ivs = Scopes.ForIdentities(identities.Select(id => id with {ProjectionPeriod = projection}), storage).ToScopes<RaToIfrsVariable>().SelectMany(x => x.RaCurrent.Concat(x.RaLocked)).ToArray();"
],
"metadata": {},
"execution_count": 0,
Expand All @@ -265,7 +274,7 @@
{
"cell_type": "code",
"source": [
"var ivs = Scopes.ForIdentities(identities, storage).ToScopes<DeferrableToIfrsVariable>().SelectMany(x => x.DeferrableActual).ToArray();"
"var ivs = Scopes.ForIdentities(identities.Select(id => id with {ProjectionPeriod = projection}), storage).ToScopes<ActualToIfrsVariable>().SelectMany(x => x.Actual.Concat(x.AdvanceActual).Concat(x.OverdueActual)).ToArray();"
],
"metadata": {},
"execution_count": 0,
Expand All @@ -274,7 +283,7 @@
{
"cell_type": "code",
"source": [
"var ivs = Scopes.ForIdentities(identities, storage).ToScopes<EaForPremiumToIfrsVariable>().SelectMany(x => x.BeEAForPremium.Concat(x.ActEAForPremium)).ToArray();"
"var ivs = Scopes.ForIdentities(identities.Select(id => id with {ProjectionPeriod = projection}), storage).ToScopes<DeferrableToIfrsVariable>().SelectMany(x => x.Deferrable).ToArray();"
],
"metadata": {},
"execution_count": 0,
Expand All @@ -283,7 +292,7 @@
{
"cell_type": "code",
"source": [
"var ivs = Scopes.ForIdentities(identities, storage).ToScopes<EaForPremiumToIfrsVariable>().SelectMany(x => x.BeEAForPremium.Concat(x.ActEAForPremium)).ToArray();"
"var ivs = Scopes.ForIdentities(identities.Select(id => id with {ProjectionPeriod = projection}), storage).ToScopes<DeferrableAmortizationFactorToIfrsVariable>().SelectMany(x => x.DeferrableAmFactor).ToArray();"
],
"metadata": {},
"execution_count": 0,
Expand All @@ -292,7 +301,16 @@
{
"cell_type": "code",
"source": [
"var ivs = Scopes.ForIdentities(identities, storage).ToScopes<TmToIfrsVariable>().SelectMany(x => x.AmortizationFactor.Concat(x.Csms).Concat(x.Loss)).ToArray();"
"var ivs = Scopes.ForIdentities(identities.Select(id => id with {ProjectionPeriod = projection}), storage).ToScopes<EaForPremiumToIfrsVariable>().SelectMany(x => x.BeEAForPremium.Concat(x.ActEAForPremium)).ToArray();"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"var ivs = Scopes.ForIdentities(identities.Select(id => id with {ProjectionPeriod = projection}), storage).ToScopes<TmToIfrsVariable>().SelectMany(x => x.AmortizationFactor.Concat(x.Csms).Concat(x.Loss)).ToArray();"
],
"metadata": {},
"execution_count": 0,
Expand All @@ -307,6 +325,44 @@
"execution_count": 0,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"# Temporary test of DAC for PAA"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"var iv = Enumerable.Range(0,5).SelectMany(p=>",
"\n Scopes.ForIdentities(identities.Select(id => id with {ProjectionPeriod=p}), storage)",
"\n .ToScopes<DeferrableCashflowToIfrsVariable>().SelectMany(x => x.Deferrable))",
"\n.AggregateProjections().Where(x => x.Values.Any(v => Math.Abs(v) > Precision ))",
"\n.ToArray();",
"\n",
"\nvar eops= iv.Where(x => x.AocType == \"EOP\");",
"\nvar ams = iv.Where(x => x.AocType == \"AM\" && x.EstimateType == \"DA\");",
"\n",
"\niv"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"//Testing",
"\n(Math.Abs(eops.Single(x => x.AccidentYear == 0).Values.First() - 647.5)< Precision, Math.Abs(eops.Single(x => x.AccidentYear == 2).Values.First() - 918.125)< Precision, ",
"\nMath.Abs(ams.Single(x => x.AccidentYear == 0).Values.First() - -352.5)< Precision, Math.Abs(ams.Single(x => x.AccidentYear == 2).Values.First() - -381.87499999999994)< Precision)"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
Expand Down
2 changes: 2 additions & 0 deletions ifrs17/Constants/Consts.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,8 @@
"\n public const string ALE = nameof(ALE); // Allocated Loss Adjustment Expenses",
"\n public const string ULE = nameof(ULE); // Unallocated Loss Adjustment Expenses",
"\n public const string CU = nameof(CU); // Coverage Units",
"\n public const string DE = nameof(DE); // Deferrable Expenses",
"\n public const string DAE = nameof(DAE); // Deferrable Acquisition Expenses",
"\n}"
],
"metadata": {},
Expand Down
13 changes: 12 additions & 1 deletion ifrs17/Import/2ImportScope-PresentValue.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -892,15 +892,26 @@
"\n}",
"\n",
"\npublic interface AmfFromIfrsVariable : CurrentPeriodAmortizationFactor{",
"\n private double amortizationFactorForAmountType => GetStorage().GetValue(Identity.Id, Identity.AmountType, EstimateType, EconomicBasis, Identity.patternShift == 0 ? null : Identity.patternShift, Identity.Id.ProjectionPeriod);",
"\n private double amortizationFactorForAmountType => GetStorage().GetValue(Identity.Id, Identity.AmountType, EstimateType, EconomicBasis, ",
"\n Identity.patternShift == 0 ? null : Identity.patternShift, Identity.Id.ProjectionPeriod); //TODO shift of 0 is a valid value",
"\n double CurrentPeriodAmortizationFactor.Value => Math.Abs(amortizationFactorForAmountType) >= Precision",
"\n ? amortizationFactorForAmountType ",
"\n : GetStorage().GetValue(Identity.Id, null, EstimateType, EconomicBasis, Identity.patternShift == 0 ? null : Identity.patternShift, Identity.Id.ProjectionPeriod);",
"\n string CurrentPeriodAmortizationFactor.EffectiveAmountType => Math.Abs(amortizationFactorForAmountType) >= Precision ? Identity.AmountType : null;",
"\n}"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
""
],
"metadata": {},
"execution_count": 0,
"outputs": []
}
]
}
Loading