Installment

from absbox import API,EnginePath

localAPI = API(EnginePath.DEV,lang='english',check=False)
Connecting engine server -> https://absbox.org/api/dev
/home/docs/checkouts/readthedocs.org/user_builds/absbox-doc/envs/stable/lib/python3.11/site-packages/urllib3/connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'absbox.org'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
✅Connected, local lib:0.52.3, server:0.52.3
installment = ["Installment"
                    ,{"originBalance": 1000.0
                    ,"feeRate": ["fix",0.01]
                    ,"originTerm": 12
                    ,"freq": "Monthly"
                    ,"type": "f_p"
                    ,"originDate": "2022-01-01"}
                    ,{"status": "Current"
                        ,"currentBalance":1000
                        ,"remainTerm":8}]
r = localAPI.runAsset("2022-01-02"
                     ,[installment]
                     ,poolAssump=("Pool"
                                    ,("Installment", None, None, None, None)
                                    ,None
                                    ,None)
                     ,read=True)
/home/docs/checkouts/readthedocs.org/user_builds/absbox-doc/envs/stable/lib/python3.11/site-packages/urllib3/connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'absbox.org'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(

Installment : Default

r = localAPI.runAsset("2022-01-02"
                     ,[installment]
                     ,poolAssump=("Pool"
                                    ,("Installment", {"CDR":0.01}, None, None, None)
                                    ,None
                                    ,None)
                     ,read=True)

r[0].head()
/home/docs/checkouts/readthedocs.org/user_builds/absbox-doc/envs/stable/lib/python3.11/site-packages/urllib3/connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'absbox.org'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
Balance Principal Interest Prepayment Default Recovery Loss WAC CumPrincipal CumPrepay CumDelinq CumDefault CumRecovery CumLoss
Date
2022-05-01 1000.00 0.00 0.00 0 0.00 0 0.00 0.01 0.00 0 0 0.00 0 0.00
2022-06-01 874.27 124.88 14.98 0 0.85 0 0.85 0.01 124.88 0 0 0.85 0 0.85
2022-07-01 748.77 124.78 14.97 0 0.72 0 0.72 0.01 249.66 0 0 1.57 0 1.57
2022-08-01 623.47 124.67 14.96 0 0.63 0 0.63 0.01 374.33 0 0 2.20 0 2.20
2022-09-01 498.38 124.56 14.94 0 0.53 0 0.53 0.01 498.89 0 0 2.73 0 2.73

Installment: Prepayment

r = localAPI.runAsset("2022-01-02"
                     ,[installment]
                     ,poolAssump=("Pool"
                                    ,("Installment", {"CDR":0.01}, {"CPR":0.01}, None, None)
                                    ,None
                                    ,None)
                     ,read=True)

r[0].head()
/home/docs/checkouts/readthedocs.org/user_builds/absbox-doc/envs/stable/lib/python3.11/site-packages/urllib3/connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'absbox.org'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
Balance Principal Interest Prepayment Default Recovery Loss WAC CumPrincipal CumPrepay CumDelinq CumDefault CumRecovery CumLoss
Date
2022-05-01 1000.00 0.00 0.00 0.00 0.00 0 0.00 0.01 0.00 0.00 0 0.00 0 0.00
2022-06-01 873.53 124.77 14.97 0.85 0.85 0 0.85 0.01 124.77 0.85 0 0.85 0 0.85
2022-07-01 747.52 124.57 14.94 0.72 0.72 0 0.72 0.01 249.34 1.57 0 1.57 0 1.57
2022-08-01 621.90 124.36 14.92 0.63 0.63 0 0.63 0.01 373.70 2.20 0 2.20 0 2.20
2022-09-01 496.70 124.14 14.89 0.53 0.53 0 0.53 0.01 497.84 2.73 0 2.73 0 2.73

Installment: Fee-Free / Interest Free for first N period

Let’s use new Weekly frequency

installment2 = ["Installment"
                    ,{"originBalance": 1200.0
                    ,"feeRate": ["fix",0.01]
                    ,"originTerm": 12
                    ,"freq": "Weekly"
                    ,"type": ("PO_FirstN", 2)
                    ,"originDate": "2022-01-01"}
                    ,{"status": "Current"
                        ,"currentBalance":1200
                        ,"remainTerm":12}]


r = localAPI.runAsset("2021-12-01"
                     ,[installment2]
                     ,read=True)

r[0].head()
/home/docs/checkouts/readthedocs.org/user_builds/absbox-doc/envs/stable/lib/python3.11/site-packages/urllib3/connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'absbox.org'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
Balance Principal Interest Prepayment Default Recovery Loss WAC CumPrincipal CumPrepay CumDelinq CumDefault CumRecovery CumLoss
Date
2022-01-01 1200 0 0 0 0 0 0 0.01 0 0 0 0 0 0
2022-01-08 1100 100 0 0 0 0 0 0.01 100 0 0 0 0 0
2022-01-15 1000 100 0 0 0 0 0 0.01 200 0 0 0 0 0
2022-01-22 900 100 12 0 0 0 0 0.01 300 0 0 0 0 0
2022-01-29 800 100 12 0 0 0 0 0.01 400 0 0 0 0 0

Same with default with None

r = localAPI.runAsset("2021-12-01"
                     ,[installment2]
                     ,poolAssump=("Pool"
                                    ,("Installment", None, None, None, None)
                                    ,None
                                    ,None)
                     ,read=True)

r[0].head()
/home/docs/checkouts/readthedocs.org/user_builds/absbox-doc/envs/stable/lib/python3.11/site-packages/urllib3/connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'absbox.org'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
Balance Principal Interest Prepayment Default Recovery Loss WAC CumPrincipal CumPrepay CumDelinq CumDefault CumRecovery CumLoss
Date
2022-01-01 1200 0 0 0 0 0 0 0.01 0 0 0 0 0 0
2022-01-08 1100 100 0 0 0 0 0 0.01 100 0 0 0 0 0
2022-01-15 1000 100 0 0 0 0 0 0.01 200 0 0 0 0 0
2022-01-22 900 100 12 0 0 0 0 0.01 300 0 0 0 0 0
2022-01-29 800 100 12 0 0 0 0 0.01 400 0 0 0 0 0

Default Stress

r = localAPI.runAsset("2021-12-01"
                     ,[installment2]
                     ,poolAssump=("Pool"
                                    ,("Installment", {"CDR":0.01}, None, None, None)
                                    ,None
                                    ,None)
                     ,read=True)

r[0].head()
/home/docs/checkouts/readthedocs.org/user_builds/absbox-doc/envs/stable/lib/python3.11/site-packages/urllib3/connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'absbox.org'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
Balance Principal Interest Prepayment Default Recovery Loss WAC CumPrincipal CumPrepay CumDelinq CumDefault CumRecovery CumLoss
Date
2022-01-01 1200.00 0.00 0.00 0 0.00 0 0.00 0.01 0.00 0 0 0.00 0 0.00
2022-01-08 1099.79 99.98 0.00 0 0.23 0 0.23 0.01 99.98 0 0 0.23 0 0.23
2022-01-15 999.62 99.96 0.00 0 0.21 0 0.21 0.01 199.94 0 0 0.44 0 0.44
2022-01-22 899.49 99.94 11.99 0 0.19 0 0.19 0.01 299.88 0 0 0.63 0 0.63
2022-01-29 799.40 99.92 11.99 0 0.17 0 0.17 0.01 399.80 0 0 0.80 0 0.80