{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "### Fixed Asset" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
Connecting engine server -> https://absbox.org/api/dev\n",
       "
\n" ], "text/plain": [ "Connecting engine server -> \u001b[4;94mhttps://absbox.org/api/dev\u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stderr", "output_type": "stream", "text": [ "/home/xiaoyu/repo/AbsBox/lib/python3.13/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\n", " warnings.warn(\n" ] }, { "data": { "text/html": [ "
✅Connected, local lib:0.46.5, server:0.50.1\n",
       "
\n" ], "text/plain": [ "✅Connected, local li\u001b[1;92mb:0\u001b[0m.\u001b[1;36m46.5\u001b[0m, server:\u001b[1;36m0.50\u001b[0m.\u001b[1;36m1\u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "from absbox import API,EnginePath\n", "\n", "localAPI = API(EnginePath.DEV, lang='english',check=False)" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "fixedAsset = [\"FixedAsset\" ,{\"start\":\"2023-11-01\",\"originBalance\":100_0000,\"originTerm\":20\n", " ,\"residual\":10_0000,\"period\":\"Monthly\",\"amortize\":\"Straight\"\n", " ,\"capacity\":(\"Fixed\",24*25*120*30)}\n", " ,{\"remainTerm\":10,\"currentBalance\":50_0000}]" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/home/xiaoyu/repo/AbsBox/lib/python3.13/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\n", " warnings.warn(\n" ] }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
BalanceDepreciationCumuDepreciationUnitCash
Date
2024-10-01460000400005400001728000691200000
2024-11-01420000400005800001728000691200000
2024-12-01380000400006200001728000691200000
2025-01-01340000400006600001728000691200000
2025-02-01300000400007000001728000691200000
2025-03-01260000400007400001728000691200000
2025-04-01220000400007800001728000691200000
2025-05-01180000400008200001728000691200000
2025-06-01140000400008600001728000691200000
2025-07-01100000400009000001728000691200000
\n", "
" ], "text/plain": [ " Balance Depreciation CumuDepreciation Unit Cash\n", "Date \n", "2024-10-01 460000 40000 540000 1728000 691200000\n", "2024-11-01 420000 40000 580000 1728000 691200000\n", "2024-12-01 380000 40000 620000 1728000 691200000\n", "2025-01-01 340000 40000 660000 1728000 691200000\n", "2025-02-01 300000 40000 700000 1728000 691200000\n", "2025-03-01 260000 40000 740000 1728000 691200000\n", "2025-04-01 220000 40000 780000 1728000 691200000\n", "2025-05-01 180000 40000 820000 1728000 691200000\n", "2025-06-01 140000 40000 860000 1728000 691200000\n", "2025-07-01 100000 40000 900000 1728000 691200000" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "r = localAPI.runAsset(\"2022-01-02\"\n", " ,[fixedAsset]\n", " ,poolAssump=(\"Pool\"\n", " ,(\"Fixed\", [[\"2022-01-01\",0.8]]\n", " , [[\"2022-01-01\",400]])\n", " ,None\n", " ,None)\n", " ,read=True)\n", "\n", "r[0]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.13.3" } }, "nbformat": 4, "nbformat_minor": 4 }