Loan
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
loan1 = ["Loan"
,{"originBalance": 80000
,"originRate": ["floater",0.045,{"index":"SOFR3M"
,"spread":0.01
,"reset":"QuarterEnd"}]
,"originTerm": 24
,"freq": "Monthly"
,"type": "i_p"
,"originDate": "2021-03-01"}
,{"currentBalance": 65000
,"currentRate": 0.06
,"remainTerm": 12
,"status": "Current"}]
r = localAPI.runAsset("2020-01-02"
,[loan1]
,poolAssump=("Pool",("Loan",None,None,None,None)
,None
,None)
,rateAssump=[("SOFR3M",0.04)]
,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-03-01 | 65000 | 0 | 0.00 | 0 | 0 | 0 | 0 | 0.06 | 0 | 0 | 0 | 0 | 0 | 0 |
| 2022-04-01 | 65000 | 0 | 331.23 | 0 | 0 | 0 | 0 | 0.06 | 0 | 0 | 0 | 0 | 0 | 0 |
| 2022-05-01 | 65000 | 0 | 320.54 | 0 | 0 | 0 | 0 | 0.06 | 0 | 0 | 0 | 0 | 0 | 0 |
| 2022-06-01 | 65000 | 0 | 331.23 | 0 | 0 | 0 | 0 | 0.06 | 0 | 0 | 0 | 0 | 0 | 0 |
| 2022-07-01 | 65000 | 0 | 267.12 | 0 | 0 | 0 | 0 | 0.05 | 0 | 0 | 0 | 0 | 0 | 0 |
Default
r = localAPI.runAsset("2020-01-02"
,[loan1]
,poolAssump=("Pool",("Loan",{"CDR":0.01},None,None,None)
,None
,None)
,rateAssump=[("SOFR3M",0.04)]
,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-03-01 | 65000.00 | 0.0 | 0.00 | 0 | 0.00 | 0 | 0.00 | 0.06 | 0.0 | 0 | 0 | 0.00 | 0 | 0.00 |
| 2022-04-01 | 64944.55 | 0.0 | 330.95 | 0 | 55.45 | 0 | 55.45 | 0.06 | 0.0 | 0 | 0 | 55.45 | 0 | 55.45 |
| 2022-05-01 | 64890.93 | 0.0 | 320.01 | 0 | 53.62 | 0 | 53.62 | 0.06 | 0.0 | 0 | 0 | 109.07 | 0 | 109.07 |
| 2022-06-01 | 64835.57 | 0.0 | 330.39 | 0 | 55.36 | 0 | 55.36 | 0.06 | 0.0 | 0 | 0 | 164.43 | 0 | 164.43 |
| 2022-07-01 | 64782.04 | 0.0 | 266.22 | 0 | 53.53 | 0 | 53.53 | 0.05 | 0.0 | 0 | 0 | 217.96 | 0 | 217.96 |
Prepayment
r = localAPI.runAsset("2020-01-02"
,[loan1]
,poolAssump=("Pool",("Loan",None,{"CPR":0.01},None,None)
,None
,None)
,rateAssump=[("SOFR3M",0.04)]
,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-03-01 | 65000.00 | 0.0 | 0.00 | 0.00 | 0 | 0 | 0 | 0.06 | 0.0 | 0.00 | 0 | 0 | 0 | 0 |
| 2022-04-01 | 64944.55 | 0.0 | 330.95 | 55.45 | 0 | 0 | 0 | 0.06 | 0.0 | 55.45 | 0 | 0 | 0 | 0 |
| 2022-05-01 | 64890.93 | 0.0 | 320.01 | 53.62 | 0 | 0 | 0 | 0.06 | 0.0 | 109.07 | 0 | 0 | 0 | 0 |
| 2022-06-01 | 64835.57 | 0.0 | 330.39 | 55.36 | 0 | 0 | 0 | 0.06 | 0.0 | 164.43 | 0 | 0 | 0 | 0 |
| 2022-07-01 | 64782.04 | 0.0 | 266.22 | 53.53 | 0 | 0 | 0 | 0.05 | 0.0 | 217.96 | 0 | 0 | 0 | 0 |
Loan With Schedule Repayment
loan2 = ["Loan"
,{"originBalance": 80000
,"originRate": ["floater",0.045,{"index":"SOFR3M"
,"spread":0.01
,"reset":"QuarterEnd"}]
,"originTerm": 3
,"freq": "SemiAnnually"
,"type": ("Schedule",[["2021-10-10",20000]
,["2022-01-10",20000]
,["2022-10-10",40000]
])
,"originDate": "2021-03-01"}
,{"currentBalance": 80000
,"currentRate": 0.06
,"remainTerm": 3
,"status": "Current"}]
r = localAPI.runAsset("2020-01-02"
,[loan2]
,poolAssump=("Pool",("Loan",None,None,None,None)
,None
,None)
,rateAssump=[("SOFR3M",0.04)]
,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 | ||||||||||||||
| 2021-03-01 | 80000 | 0 | 0.00 | 0 | 0 | 0 | 0 | 0.06 | 0 | 0 | 0 | 0 | 0 | 0 |
| 2021-10-10 | 60000 | 20000 | 2932.60 | 0 | 0 | 0 | 0 | 0.06 | 20000 | 0 | 0 | 0 | 0 | 0 |
| 2022-01-10 | 40000 | 20000 | 756.16 | 0 | 0 | 0 | 0 | 0.05 | 40000 | 0 | 0 | 0 | 0 | 0 |
| 2022-10-10 | 0 | 40000 | 1495.89 | 0 | 0 | 0 | 0 | 0.05 | 80000 | 0 | 0 | 0 | 0 | 0 |
Schedule Repayment with stress
r = localAPI.runAsset("2020-01-02"
,[loan2]
,poolAssump=("Pool",("Loan",None,{"CPR":0.01},None,None)
,None
,None)
,rateAssump=[("SOFR3M",0.04)]
,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 | ||||||||||||||
| 2021-03-01 | 80000.00 | 0.00 | 0.00 | 0.00 | 0 | 0 | 0 | 0.06 | 0.00 | 0.00 | 0 | 0 | 0 | 0 |
| 2021-10-10 | 59632.72 | 19877.56 | 2914.65 | 489.72 | 0 | 0 | 0 | 0.06 | 19877.56 | 489.72 | 0 | 0 | 0 | 0 |
| 2022-01-10 | 39654.58 | 19827.27 | 749.63 | 150.87 | 0 | 0 | 0 | 0.05 | 39704.83 | 640.59 | 0 | 0 | 0 | 0 |
| 2022-10-10 | 0.00 | 39357.62 | 1471.86 | 296.96 | 0 | 0 | 0 | 0.05 | 79062.45 | 937.55 | 0 | 0 | 0 | 0 |