Excel, SQL, or just code in general
Examples from the AO thread (started January 2011)
SpaceActuary:
{=SUM(($B5 = 'Loss Table'!$A$9:$A$8765) * ($Q5 = 'Loss Table'!$B$9:$B$8765) * (IF(TRIM($K5)="","0",TEXT($K5,"0")) = 'Loss Table'!$C$9:$C$8765) * (IF(TRIM($L5)="","0",TEXT($L5,"0")) = 'Loss Table'!$D$9:$D$8765) * (IF(TRIM($M5)="","0",TEXT($M5,"0")) = 'Loss Table'!$E$9:$E$8765) * (IF(TRIM($N5)="","0",TEXT($N5,"0")) = 'Loss Table'!$F$9:$F$8765) * (IF(TRIM($O5)="","0",TEXT($O5,"0")) = 'Loss Table'!$G$9:$G$8765) * (IF(TRIM($P5)="","0",TEXT($P5,"0")) = 'Loss Table'!$H$9:$H$8765) * ('Loss Table'!$I$9:$I$8765))}
Rake:
=1-(1-(SUMPRODUCT(PRODUCT(1-OFFSET(CSO_80_ANB,G2-1,IF(F2="M",0,2)+IF(I2="S",1,0),T2,1)*(H2*0.25+1)/1000)*1)-1)*(SUMPRODUCT(PRODUCT(1-OFFSET(CSO_80_ANB,L2-1,IF(K2="M",0,2)+IF(N2="S",1,0),T2,1)*(M2*0.25+1)/1000)*1)-1))/(1-(SUMPRODUCT(PRODUCT(1-OFFSET(CSO_80_ANB,G2-1,IF(F2="M",0,2)+IF(I2="S",1,0),T2-1,1)*(H2*0.25+1)/1000)*1)-1)*(SUMPRODUCT(PRODUCT(1-OFFSET(CSO_80_ANB,L2-1,IF(K2="M",0,2)+IF(N2="S",1,0),T2-1,1)*(M2*0.25+1)/1000)*1)-1))
Gedankenexperiment
SELECT IIf([LOB]="STD",[Amt Paid To Dt],[Amt Paid To Dt]*((1-0.995942407^(IIf(Int((IIf(IsNull([Close Date])=True,[Report Date],[Close Date])-DateAdd("d",[Elim Period],[Incurred Date]))*12/365.25)<1,1,Int((IIf(IsNull([Close Date])=True,[Report Date],[Close Date])-DateAdd("d",[Elim Period],[Incurred Date]))*12/365.25))))/0.004074124)*0.952380952^([Elim Period]/365.25)/(IIf(Int((IIf(IsNull([Close Date])=True,[Report Date],[Close Date])-DateAdd("d",[Elim Period],[Incurred Date]))*12/365.25)<1,1,Int((IIf(IsNull([Close Date])=True,[Report Date],[Close Date])-DateAdd("d",[Elim Period],[Incurred Date]))*12/365.25))))+[Reserve]*(0.95238095^(([Report Date]-[Incurred Date])/365)) AS PVPayRes
SirVLCIV
=IF($A$2<>3,0,IF(INDEX(CashBalanceSchedule,1,2+8*( $A$1-1))=1,MIN(AB25,AC25)*INDEX(CashBalanceBase,1,2+8*( $A$1-1))+MAX(AB25-AC25,0)*INDEX(CashBalanceExcess,1,2+8*($A$1-1)),0)+IF(INDEX(CashBalanceSchedule,1,2+8*($A$1-1))>1,MIN(AB25,AC25)*INDEX(CashBalanceSchedule2,MA TCH((IF(INDEX(CashBalanceSchedule,1,2+8*($A$1-1))=2,$B25,0)+IF(INDEX(CashBalanceSchedule,1,2+8*( $A$1-1))=3,$C25,0)+IF(INDEX(CashBalanceSchedule,1,2+8*( $A$1-1))=4,$B25+$C25)),INDEX(CashBalanceSchedule2,0,2+8 *($A$1-1)),-1),4+8*($A$1-1))+MAX(AB25-AC25,0)*INDEX(CashBalanceSchedule2,MATCH((IF(INDEX (CashBalanceSchedule,1,2+8*($A$1-1))=2,$B25,0)+IF(INDEX(CashBalanceSchedule,1,2+8*( $A$1-1))=3,$C25,0)+IF(INDEX(CashBalanceSchedule,1,2+8*( $A$1-1))=4,$B25+$C25)),INDEX(CashBalanceSchedule2,0,2+8 *($A$1-1)),-1),5+8*($A$1-1)),0))