Lease
%load_ext autoreload
%autoreload 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
Simple Lease
Each rental on all periods are same during life time of lease
lease = ["Lease"
,{"rental": ("byDay", 6, ["DayOfMonth",15])
,"originTerm": 6,"originDate": "2022-01-05"}
,{"status":"Current","remainTerm": 6}
]
r = localAPI.runAsset("2022-01-02"
,[lease]
,poolAssump=("Pool"
,("Lease",None, {"Days":60}, ("byAnnualRate",0.00), ("byExtTimes",0))
,None
,None)
,read=True)
r[0]
/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 | Rental | Default | |
|---|---|---|---|
| Date | |||
| 2022-01-15 | 906 | 60 | 0 |
| 2022-02-15 | 720 | 186 | 0 |
| 2022-03-15 | 552 | 168 | 0 |
| 2022-04-15 | 366 | 186 | 0 |
| 2022-05-15 | 186 | 180 | 0 |
| 2022-06-15 | 0 | 186 | 0 |
With aging lease ( remain term = 3 )
lease = ["Lease"
,{"rental": ("byDay", 12.0, ["DayOfMonth",15])
,"originTerm": 6,"originDate": "2022-01-05"}
,{"status":"Current","remainTerm": 3}
]
r = localAPI.runAsset("2022-01-02"
,[lease]
,poolAssump=("Pool"
,("Lease",None, {"Days":60}, ("byAnnualRate",0.00), ("byExtTimes",0))
,None
,None)
,read=True)
r[0]
/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 | Rental | Default | |
|---|---|---|---|
| Date | |||
| 2022-04-15 | 732 | 372 | 0 |
| 2022-05-15 | 372 | 360 | 0 |
| 2022-06-15 | 0 | 372 | 0 |
Step Up Lease
The payment amount changes during the lease term. It can be :
increase/decrease by a constant rate by each period
increase/decrease by a constant amount by each period
increase/decrease by an amount vector in all periods
increase/decrease by an rate vector in all periods
Increase/decrease by constant rate
On each payment period, rental increase by 10%
leaseStepUp = ["Lease"
,{"rental": ("byDay", 12.0, ["DayOfMonth",15])
,"stepUp":("flatRate",1.1) ,"originTerm": 4
,"originDate": "2022-01-05"}
,{"status":"Current","remainTerm": 4}
]
r = localAPI.runAsset("2022-01-02"
,[leaseStepUp]
,poolAssump=("Pool"
,("Lease",None, {"Days":60}, ("byAnnualRate",0.00), ("byExtTimes",0))
,None
,None)
,read=True)
r[0]
/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 | Rental | Default | |
|---|---|---|---|
| Date | |||
| 2022-01-15 | 1310.83 | 120.00 | 0 |
| 2022-02-15 | 901.63 | 409.20 | 0 |
| 2022-03-15 | 495.07 | 406.56 | 0 |
| 2022-04-15 | 0.00 | 495.07 | 0 |
On each payment period, rental increase by 1$
leaseStepUp = ["Lease"
,{"rental": ("byDay", 12.0, ["DayOfMonth",15])
,"stepUp":("flatAmount",1.0)
,"originTerm": 6 ,"originDate": "2022-01-05"}
,{"status":"Current" ,"remainTerm": 6}
]
r = localAPI.runAsset("2022-01-02"
,[leaseStepUp]
,poolAssump=("Pool"
,("Lease",None, {"Days":60}, ("byAnnualRate",0.00), ("byExtTimes",0))
,None
,None)
,read=True)
r[0]
/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 | Rental | Default | |
|---|---|---|---|
| Date | |||
| 2022-01-15 | 2267 | 120 | 0 |
| 2022-02-15 | 1864 | 403 | 0 |
| 2022-03-15 | 1472 | 392 | 0 |
| 2022-04-15 | 1007 | 465 | 0 |
| 2022-05-15 | 527 | 480 | 0 |
| 2022-06-15 | 0 | 527 | 0 |
User can set rental change by rate on each payment period
leaseStepUp = ["Lease"
,{"rental": ("byDay", 12.0, ["DayOfMonth",15])
,"stepUp":("byRates",1.1,1.0,1.0,1.0,1.2)
,"originTerm": 6
,"originDate": "2022-01-05"}
,{"status":"Current"
,"remainTerm": 6}
]
r = localAPI.runAsset("2022-01-02"
,[leaseStepUp]
,poolAssump=("Pool"
,("Lease",None, {"Days":60}, ("byAnnualRate",0.00), ("byExtTimes",0))
,None
,None)
,read=True)
r[0]
/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 | Rental | Default | |
|---|---|---|---|
| Date | |||
| 2022-01-15 | 2075.04 | 120.00 | 0 |
| 2022-02-15 | 1665.84 | 409.20 | 0 |
| 2022-03-15 | 1296.24 | 369.60 | 0 |
| 2022-04-15 | 887.04 | 409.20 | 0 |
| 2022-05-15 | 491.04 | 396.00 | 0 |
| 2022-06-15 | 0.00 | 491.04 | 0 |
409.2 / 31, 369.6/ 28, 409.2/31, 396.00/30,491.04/31/1.2 # let's verify the rentals
(13.2, 13.200000000000001, 13.2, 13.2, 13.200000000000001)
User can set a vector of rental changes of life time
leaseStepUp = ["Lease"
,{"rental": ("byDay", 12.0, ["DayOfMonth",15])
,"stepUp":("byAmounts", 1, 1, -1, -3)
,"originTerm": 5
,"originDate": "2022-01-05"}
,{"status":"Current","remainTerm": 5}
]
r = localAPI.runAsset("2022-01-02"
,[leaseStepUp]
,poolAssump=("Pool"
,("Lease",None, {"Days":60}, ("byAnnualRate",0.00), ("byExtTimes",0))
,None
,None)
,read=True)
r[0]
/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 | Rental | Default | |
|---|---|---|---|
| Date | |||
| 2022-01-15 | 1498 | 120 | 0 |
| 2022-02-15 | 1095 | 403 | 0 |
| 2022-03-15 | 703 | 392 | 0 |
| 2022-04-15 | 300 | 403 | 0 |
| 2022-05-15 | 0 | 300 | 0 |
403 / 31, 392 / 28, 403/31, 300/30 # let's verify the rentals
(13.0, 14.0, 13.0, 10.0)
leaseStepUp = ["Lease"
,{"rental": ("byDay", 12.0, ["DayOfMonth",15])
,"stepUp":("byAmounts", 1, 1, -1, -3)
,"originTerm": 5
,"originDate": "2022-01-05"}
,{"status":"Current","remainTerm": 3}
]
r = localAPI.runAsset("2021-01-02"
,[leaseStepUp]
,poolAssump=("Pool"
,("Lease",None, {"Days":60}, ("byAnnualRate",0.00), ("byExtTimes",0))
,None
,None)
,read=True)
r[0]
/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 | Rental | Default | |
|---|---|---|---|
| Date | |||
| 2022-03-15 | 703 | 392 | 0 |
| 2022-04-15 | 300 | 403 | 0 |
| 2022-05-15 | 0 | 300 | 0 |