{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Lab 6\n", "\n", "* calculate NPV. The rate is a float and the cash flows and investment are in a list.\n", "* create a function called NPV to calculate NPV\n", "* create a function to calcule IRR. In order to calculate IRR you may aproximate the follwoing expression:\n", "rate= rate*(1-NPV(CFList, rate)/invest). Remeber that invest is the first cashflow. \n", "* create a function to calculate the payback period\n", "* create a class adding all the properties and methods" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "#Supose you have the follwoing cashflow" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# create a function called NPV to calculate NPV\n", "# sugestion: iterate both by index and value using enumerate function" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "#create a function called NPV that returns the NPV value" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "#create a function to calculate the payback period" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "# create a class adding all the properties and methods\n", "#\n", "# +-------------+\n", "# | project |\n", "# |-------------| \n", "# | cashflow |\n", "# | name | \n", "# | rate | \n", "# |-------------| \n", "# | __init__ |\n", "# | calcNPV |\n", "# | calcIRR |\n", "# | seeCahsflow |\n", "# +-------------+\n", "#" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "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.8.5" } }, "nbformat": 4, "nbformat_minor": 2 }