Skip to content

Instantly share code, notes, and snippets.

@acturtle
Last active August 24, 2023 09:00
Show Gist options
  • Save acturtle/a3cd1b2596d2bde7b4a1511c69324d3f to your computer and use it in GitHub Desktop.
Save acturtle/a3cd1b2596d2bde7b4a1511c69324d3f to your computer and use it in GitHub Desktop.
actuaries_digital_03
from cashflower import variable
from input import assumption, main
from settings import settings
@variable()
def survival_rate(t):
if t == 0:
return 1
return survival_rate(t-1) * (1-assumption["DEATH_PROB"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment