|
| 1 | +package experiments |
| 2 | + |
| 3 | +import RPT.* |
| 4 | +import cats.syntax.all.* |
| 5 | + |
| 6 | +@main def pricingFun = |
| 7 | + |
| 8 | + val iterations = Array(1,1,2,3,1,2,3,4,5,10,10,10,10,10).sorted |
| 9 | + val days = Array(1,2,3,4,5,6,7,8,9,10,11,12,13,14) |
| 10 | + val amounts = Array(20.0,0,0,0,Int.MaxValue,0,0,0,0,0,25,30,0,0) |
| 11 | + |
| 12 | + println(iterations.printArr) |
| 13 | + println(amounts.printArr) |
| 14 | + |
| 15 | + |
| 16 | + val scen = Scenarr( |
| 17 | + iterations = iterations, |
| 18 | + days = days, |
| 19 | + amounts = amounts, |
| 20 | + numberIterations = 10, |
| 21 | + threshold = 0.0 |
| 22 | + ) |
| 23 | + |
| 24 | + val tower = Tower.singleShot(15, Array(10, 10, 10)) |
| 25 | + |
| 26 | + val iter10 = scen.iteration(10) |
| 27 | + |
| 28 | + val (ceded, retained, splits) = tower.splitScenarioAmounts(scen)(using true) |
| 29 | + val (ceded10, retained10, splits10) = tower.splitScenarioAmounts(iter10)(using true) |
| 30 | + |
| 31 | + println(ceded10.printArr) |
| 32 | + |
| 33 | + splits10.map(_.cededToLayer).foreach(arr => println(arr.printArr)) |
| 34 | + |
| 35 | + splits.map(s => s.lossReport(scen.numberIterations, scen.iterations, ReportDenominator.FirstLimit)).ptbln |
0 commit comments