acturtle / cashflower

An open-source Python framework for actuarial cash flow models
https://cashflower.acturtle.com
MIT License
38 stars 9 forks source link

Interconnected cycles #365

Closed zchmielewska closed 1 month ago

zchmielewska commented 7 months ago

As in email by MK

zchmielewska commented 4 months ago
@variable()
def a(t):
    if t == 0:
        return 0
    else:
        return b(t - 1)

@variable()
def b(t):
    return a(t) - y(t) - x(t)

@variable()
def x(t):
    return a(t)

@variable()
def y(t):
    return a(t)
zchmielewska commented 4 months ago

image