Run Asset Pool 2
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
Pool
In Pool , it will have a field named assets ,which contains a list of assets
mortgage1 = ["Mortgage"
,{"originBalance": 12000.0
,"originRate": ["fix",0.045]
,"originTerm": 40
,"freq": "monthly"
,"type": "level"
,"originDate": "2021-02-01"}
,{"currentBalance": 10000.0
,"currentRate": 0.075
,"remainTerm": 30
,"status": "current"}]
mortgage2 = ["Mortgage"
,{"originBalance": 8000.0
,"originRate": ["fix",0.045]
,"originTerm": 25
,"freq": "monthly"
,"type": "level"
,"originDate": "2021-02-01"}
,{"currentBalance": 6000.0
,"currentRate": 0.075
,"remainTerm": 15
,"status": "current"}]
myPool = {'assets':[ mortgage1, mortgage2 ],
'cutoffDate':"2022-03-01"}
Assumption on Pool Level
User can set assumption on pool level ,which suggests the assumption will be applied to all the assets in the pool.
r = localAPI.runPool(myPool
,poolAssump=("Pool",("Mortgage",{"CDR":0.01},None,None,None)
,None
,None)
,read=True)
r['PoolConsol']['flow'].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 | BorrowerNum | PrepayPenalty | CumPrincipal | CumPrepay | CumDelinq | CumDefault | CumRecovery | CumLoss | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Date | ||||||||||||||||
| 2022-03-01 | 13891.98 | 693.78 | 91.15 | 0 | 11.24 | 0 | 11.24 | 0.075 | None | None | 693.78 | 0 | 0 | 11.24 | 0 | 11.24 |
| 2022-04-01 | 13182.62 | 697.52 | 86.74 | 0 | 11.84 | 0 | 11.84 | 0.075 | None | None | 1391.30 | 0 | 0 | 23.08 | 0 | 23.08 |
| 2022-05-01 | 12470.45 | 701.30 | 82.31 | 0 | 10.87 | 0 | 10.87 | 0.075 | None | None | 2092.60 | 0 | 0 | 33.95 | 0 | 33.95 |
| 2022-06-01 | 11754.74 | 705.08 | 77.87 | 0 | 10.63 | 0 | 10.63 | 0.075 | None | None | 2797.68 | 0 | 0 | 44.58 | 0 | 44.58 |
| 2022-07-01 | 11036.14 | 708.90 | 73.40 | 0 | 9.70 | 0 | 9.70 | 0.075 | None | None | 3506.58 | 0 | 0 | 54.28 | 0 | 54.28 |
Assumption on Asset Level
assetLevelAssump = ("ByIndex"
,([0],(("Mortgage",{"CDR":0.01},None,None,None)
,None
,None))
,([1],(("Mortgage",None,{"CPR":0.01},None,None)
,None
,None))
)
r = localAPI.runPool(myPool
,poolAssump=assetLevelAssump
,read=True)
r['PoolConsol']['flow'].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 | BorrowerNum | PrepayPenalty | CumPrincipal | CumPrepay | CumDelinq | CumDefault | CumRecovery | CumLoss | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Date | ||||||||||||||||
| 2022-03-01 | 13891.98 | 693.78 | 91.15 | 4.02 | 7.22 | 0 | 7.22 | 0.075 | None | None | 693.78 | 4.02 | 0 | 7.22 | 0 | 7.22 |
| 2022-04-01 | 13182.62 | 697.52 | 86.74 | 4.12 | 7.72 | 0 | 7.72 | 0.075 | None | None | 1391.30 | 8.14 | 0 | 14.94 | 0 | 14.94 |
| 2022-05-01 | 12470.45 | 701.30 | 82.31 | 3.66 | 7.21 | 0 | 7.21 | 0.075 | None | None | 2092.60 | 11.80 | 0 | 22.15 | 0 | 22.15 |
| 2022-06-01 | 11754.74 | 705.08 | 77.87 | 3.45 | 7.18 | 0 | 7.18 | 0.075 | None | None | 2797.68 | 15.25 | 0 | 29.33 | 0 | 29.33 |
| 2022-07-01 | 11036.14 | 708.90 | 73.40 | 3.01 | 6.69 | 0 | 6.69 | 0.075 | None | None | 3506.58 | 18.26 | 0 | 36.02 | 0 | 36.02 |
Cumulative Stats
User can annotate the HistoryDefaults which suggusts as of the cutoffDate, how much balance is in status of Default
myPool2 = {'assets':[ mortgage1, mortgage2 ],
'cutoffDate':"2022-03-01"
,'issuanceStat':{"HistoryDefaults":200,"HistoryLoss":50}}
r = localAPI.runPool(myPool2
,poolAssump=("Pool",("Mortgage",{"CDR":0.01},None,None,None)
,None
,None)
,read=True)
r['PoolConsol']['flow'].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 | BorrowerNum | PrepayPenalty | CumPrincipal | CumPrepay | CumDelinq | CumDefault | CumRecovery | CumLoss | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Date | ||||||||||||||||
| 2022-03-01 | 13891.98 | 693.78 | 91.15 | 0 | 11.24 | 0 | 11.24 | 0.075 | None | None | 693.78 | 0 | 0 | 11.24 | 0 | 11.24 |
| 2022-04-01 | 13182.62 | 697.52 | 86.74 | 0 | 11.84 | 0 | 11.84 | 0.075 | None | None | 1391.30 | 0 | 0 | 23.08 | 0 | 23.08 |
| 2022-05-01 | 12470.45 | 701.30 | 82.31 | 0 | 10.87 | 0 | 10.87 | 0.075 | None | None | 2092.60 | 0 | 0 | 33.95 | 0 | 33.95 |
| 2022-06-01 | 11754.74 | 705.08 | 77.87 | 0 | 10.63 | 0 | 10.63 | 0.075 | None | None | 2797.68 | 0 | 0 | 44.58 | 0 | 44.58 |
| 2022-07-01 | 11036.14 | 708.90 | 73.40 | 0 | 9.70 | 0 | 9.70 | 0.075 | None | None | 3506.58 | 0 | 0 | 54.28 | 0 | 54.28 |