Skip to content

Instantly share code, notes, and snippets.

@acturtle
Created August 24, 2023 08:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save acturtle/2119a4ecdf21caedb056d3a7b032972b to your computer and use it in GitHub Desktop.
Save acturtle/2119a4ecdf21caedb056d3a7b032972b to your computer and use it in GitHub Desktop.
actuaries_digital_04
@variable()
def expected_benefit(t):
if t == 0:
return 0
if t > main.get("remaining_term"):
return 0
return survival_rate(t-1) * assumption["DEATH_PROB"] * main.get("sum_assured")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment