{ "info": { "author": "Zain Allarakhia", "author_email": "zain.allarakhia@gmail.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python" ], "description": "python_finance_tools\n=========\n\n\n## Overview ##\n\nThis is a set of common financial calculations. It is a work in progress.\n\n## Functions ##\n\n### pv - Present Value of a Cash Flow[1]\n\nUsage:\npv(cash_flow, period, cost_of_capital)\n\nArguments:\n\n** cash_flow: this is self-explanatory, it's the amount of cash flowing in or out\n\n** period: the period in which this cash flow occurs. It should match the cost_of_capital's period. For example, if you're paying an quarterly interest rate of 5%, your cash_flow should be a quarterly number and your cost_of_capital should be .05.\n\n** cost_of_capital[2]: The weighted average cost of capital for your business. If you're capital structure is 50% debt and 50% equity, you would calculate your cost_of_capital by evently weighting your interest rate on debt and expected rate of return on equity. If you are simply seeing how much a certain amount of cash will be worth in the future, the cost_of_capital is the risk-free interest rate, a good proxy for that is the rate of a short-term government bond because theoretically, those have no risk of default[4].\n\n\nOutput: the present value of the cash flow.\n\nSample: the value of recieving $100 in 2 years, assuming an annual risk-free interest rate of 3%:\n \n >>> from finance_tools import pv\n >>> pv(100, 2, .03)\n 94.25959091337543\n\n\n### dcf - Discounted Cash Flow Valuation[3]\n\nTheoretically, a business is worth the present value of its future cash flows.\n\nUsage:\ndcf(cash_flows, cost_of_capital)\n\nArguments:\n\n** cash_flows: This can be a list or dictionary. If a list, it assumes the index corresponds to the period. If a dictionary, the key:value interpretation is period:cash_flow.\n\n** cost_of_capital: Described above. For a business, a conceptual way to think about this is how risky the business is. A riskier business merits a higher cost of capital. A good approximation for the cost of capital of a business is the rate at which a bank is willing to lend to your business.\n\nOutput: The valuation of your cash generating entity/business.\n\nSample: My business is generating $100 this year, and 10% more every year for the next 2 years. One person owns all of the equity and I can get a business loan at 7% annually.\n\n >>>from finance_tools import pv, dcf\n >>>dcf([100, 100*1.1, 100*1.1**2, 100*1.1**3], .07)\n 417.1390718529881\n\nSample 2: Suppose a business will lose $200 in its current year of operation, and $100 the next year, and then break even, and grow at a rate of $100 per year for 3 years, assuming a WACC of 10%:\n\n >>>dcf({0:-200, 1:-100, 2: 0, 3:100, 4:200, 5:300}, .10)\n 107.1014771718275\n\nEquivalently:\n\n >>>dcf([-200, -100, 0, 100, 200, 300], .10)\n 107.1014771718275\n\nYears do not need to be continuous. This is useful for more abstract investments/businesses:\n\nRecieving $1000 5 quarters from now, and $5452 12 quarters from now, assuming a 17% cost of capital and an initial investment today of $1300:\n\n >>>dcf({0:-1300, 5:1000, 12:5452}, .17)\n -15.325903934344126\n\nWhat if we're able to pay 4 quarters into the future as opposed to today?\n\n >>>dcf({4:-1300, 5:1000, 12:5452}, .17)\n 590.9290333625488\n\nA positive DCF means this would be a good investment.\n\nThis is a useful analysis to run, because seeing how fluctuations in future cash flows impact valuation lets businesses make better decisions from a value-maximizing perspective.\n\nIf you see anything incorrect, please let me know. Thank you.\n\n\n[1] http://en.wikipedia.org/wiki/Present_value\n[2] http://en.wikipedia.org/wiki/Weighted_average_cost_of_capital\n[3] http://en.wikipedia.org/wiki/Discounted_cash_flow\n[4] http://en.wikipedia.org/wiki/Risk-free_interest_rate\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/zallarak/python_finance_tools", "keywords": "finance valuation", "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "finance_tools", "package_url": "https://pypi.org/project/finance_tools/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/finance_tools/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/zallarak/python_finance_tools" }, "release_url": "https://pypi.org/project/finance_tools/0.1/", "requires_dist": null, "requires_python": null, "summary": "Common financial calculations.", "version": "0.1" }, "last_serial": 791977, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "e1b6e50dd8544f6b17f82e8fcedfc456", "sha256": "4cd7820b6b6dd5e040786c2090c783f3c328ccf10aa7b9cd11d863a7cb31ddff" }, "downloads": -1, "filename": "finance_tools-0.1.tar.gz", "has_sig": false, "md5_digest": "e1b6e50dd8544f6b17f82e8fcedfc456", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2512, "upload_time": "2012-04-06T23:26:51", "url": "https://files.pythonhosted.org/packages/7e/fe/f20c28b91d1f49fce0275cec72886d1ef2fa42d9891eb0fa1e2a9a9301db/finance_tools-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e1b6e50dd8544f6b17f82e8fcedfc456", "sha256": "4cd7820b6b6dd5e040786c2090c783f3c328ccf10aa7b9cd11d863a7cb31ddff" }, "downloads": -1, "filename": "finance_tools-0.1.tar.gz", "has_sig": false, "md5_digest": "e1b6e50dd8544f6b17f82e8fcedfc456", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2512, "upload_time": "2012-04-06T23:26:51", "url": "https://files.pythonhosted.org/packages/7e/fe/f20c28b91d1f49fce0275cec72886d1ef2fa42d9891eb0fa1e2a9a9301db/finance_tools-0.1.tar.gz" } ] }