Replies: 1 comment 2 replies
-
Do you have any recommendations for speeding up the calculations in general? I basically modified the BasicTerm_S model to fit a specific product (e.g. add a more variables/calculations). This is a really cool library and very easy to code and reminds a lot of developing models in MG-ALFA. However, the speed is a concern and maybe it's just a python issue. I have a model that is a paid-up whole life with no premiums nor dividends. It takes about 12 hours to run through 37,000 policies/model points. Do you have any recommendations or would you like to see the model? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Here's a response to comment on Getting Started with lifelib - Part 5 - YouTube:
"Is there a built-in function to aggregate across model points or is it up to the user to create a loop?"
BasicTerm_S projects cashflows for 1 model point at a time. By default, Model point 1 is selected and its results are calculated.
To change the selected model point, assign the new model point ID to
point_id
.Here's how to loop through multiple model points, and aggregate the results of the model points.
However, there's a much simpler approach.
Projection
is parameterized withpoint_id
, so you can create a copy of Projection by subscripting it.So to get the same sum , you can just do:
Note that this approach is memory hungry as all the copies their values are kept.
Beta Was this translation helpful? Give feedback.
All reactions