Преглед на файлове

amortizing exercise spelled out

Tamas преди 2 години
родител
ревизия
dc6f7b694d
променени са 1 файла, в които са добавени 51 реда и са изтрити 1 реда
  1. 51 1
      bin/bonds.ipynb

+ 51 - 1
bin/bonds.ipynb

@@ -109,10 +109,60 @@
     "\n"
    ]
   },
+  {
+   "cell_type": "markdown",
+   "id": "f871c05e-02e5-48a7-94ad-9d4a8aa517fa",
+   "metadata": {},
+   "source": [
+    "non-amortizing\n",
+    "month  balance  principal  interest\n",
+    "0      100      0          5\n",
+    "1      100      0          5\n",
+    "2\n",
+    "3\n",
+    "...\n",
+    "119   100       0          5\n",
+    "120   0         100        5\n",
+    "\n",
+    "\n",
+    "Amortizing bond:\n",
+    "r = 6%\n",
+    "month  balance  principal  interest\n",
+    "0      100      0.          0\n",
+    "1      99.9      .1         0.5\n",
+    "2      99.799    .101       0.499\n",
+    "...\n",
+    "119    1        1          0.051\n",
+    "120    0        1          0.05\n",
+    "\n",
+    "condition: \n",
+    "r = a given number (yearly interest rate) \n",
+    "interest = previuos balance * r / 12\n",
+    "principal + intersst = constant for the life of the bond\n",
+    "balance at the final month = 0\n",
+    "\n",
+    "create a function:\n",
+    "f( first principal) -> last balance\n",
+    "\n",
+    "def lastBalance( fp):\n",
+    "    ....\n",
+    "    ....\n",
+    "    ....\n",
+    "    \n",
+    "lastBalance(0.1) \n",
+    "2\n",
+    "\n",
+    "lastBalance(1) \n",
+    "-20\n",
+    "\n",
+    "\n",
+    "\n"
+   ]
+  },
   {
    "cell_type": "code",
    "execution_count": null,
-   "id": "34384d3e-b1e7-42e3-9654-acc894492eb6",
+   "id": "b1adb876-0acb-439f-a32c-5b20d87c0e02",
    "metadata": {},
    "outputs": [],
    "source": []