{ "info": { "author": "Oleg Melnikov", "author_email": "xisreal@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Education", "Intended Audience :: End Users/Desktop", "Intended Audience :: Financial and Insurance Industry", "Intended Audience :: Science/Research", "License :: OSI Approved :: GNU General Public License (GPL)", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Office/Business :: Financial", "Topic :: Office/Business :: Financial :: Investment", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Mathematics", "Topic :: Utilities" ], "description": "=======================================================\r\nQFRM, Quantitative Financial Risk Management\r\n=======================================================\r\n\r\nQuantitative Financial Risk Management (QFRM) project is a (rapidly growing) set of analytical tools\r\nto measure, manage and visualize identified risks of derivatives and portfolios in finance.\r\n\r\nWhy use Quantitative Financial Risk Management (QFRM) package:\r\n------------------------------------------------------------------------------------------------\r\n\r\n* We apply `object-oriented programming (OOP) paradigm `_\r\n to abstract the complexities of financial valuation.\r\n* Plentiful examples: each class has a numerous examples, including sensitivity plots and multidimensional visualization.\r\n* Resources: we included references (J.C.Hull's `OFOD `_ textbook, academic research and online resources) we used to build and validate our analytical tools.\r\n* Simplicity, consistency and usability: QFRM uses basic data structures as user inputs inputs/outputs (I/O).\r\n* Longevity: qfrm dependencies are limited to `Python Standard Library `_, pandas, numpy, scipy, and matplotlib.\r\n* We try to sensibly vectorize our functions to help you with application of QFRM functionality.\r\n* All programing is done with usability/scalability/extendability/performance in mind.\r\n* This project grows rapidly with an effort from a dozen of bright quant finance developers. Check back for updates throughout Fall 2015.\r\n\r\n\r\nOur Team:\r\n----------\r\n\r\nThis is a group of ambitious and diligent Rice University science students from doctoral, masters and undergraduate programs. United in their work, we expand and contribute to finance community and QFRM course, led by Oleg Melnikov, a statistics doctoral student and instructor of QFRM course at Rice University, Department of Statistics.\r\n\r\n1. `Oleg Melnikov `_ (author, creator), Department of Statistics, Rice University, http://Oleg.Rice.edu, xisreal@gmail.com\r\n\r\n#. Thaw Da Aung (contributor),\tDepartment of Physics, Thawda.Aung@rice.edu\r\n\r\n#. Yen-Fei Chen (contributor),\tDepartment of Statistics, Yen-Fei.Chen@rice.edu\r\n\r\n#. Patrick J. Granahan\t(contributor), Department of Computer Science, pjgranahan@rice.edu\r\n\r\n#. Hanting Li (contributor), Department of Statistics, HANTING.LI@rice.edu\r\n\r\n#. Sha (Andy) Liao (contributor), Department of Physics, Andy.Liao@rice.edu\r\n\r\n#. Scott Morgan (contributor), Department of Computer Science, spmorgan@rice.edu\r\n\r\n#. Andrew M. Weatherly (contributor), Department of Computational and Applied Mathematics, amw13@rice.edu\r\n\r\n#. Mengyan Xie (contributor), Department of Electrical Engineering, Mengyan.Xie@rice.edu\r\n\r\n#. Tianyi Yao (contributor), Department of Electrical Engineering, Tianyi.Yao@rice.edu\r\n\r\n#. Runmin Zhang (contributor), Department of Physics, Runmin.Zhang@rice.edu\r\n\r\n\r\n\r\nOOP Design and functionality:\r\n------------------------------\r\n\r\nIn progress:\r\n\r\nBond pricing is temporarily disabled (will return soon), but you'll find numerous exotic option pricing (via Black-Scholes model, lattice tree, Monte Carlo simulation and finite differencing) in the package.\r\n\r\n* class ``PVCF`` (present value of cash flows) accepts time-indexed cash flows and a yield curve to compute:\r\n * net present value (NPV), internal rate or return (IRR), time value of money (TVM)\r\n * Linearly interpolated yield curve with time-to-maturities (TTM) matching those of cash flows (CF)\r\n * Visualization: CF diagram\r\n\r\n* class ``Bond`` (inherits ``PVCF``) accepts coupon/frequency/TTM specification along with optional yield curve (with optional TTM) to compute:\r\n * Valuation and performance analytics: clean/dirty price, yield to maturity (ytm), par and current yield\r\n * interest rates (IR) are assumed to be continuously compounded (CC), but user has a method to convert from/to any frequency.\r\n * Risk analytics: Macaulay/Modified/Effective durations, convexity\r\n * Visualization: CF diagram, dirty/clean price convergence, price sensitivity curves and slopes with and without convexity adjustment.\r\n\r\n* class ``Util`` provides some helpful functionality for verifying/standardizing in I/O of other class' methods.\r\n\r\nPlanned implementation:\r\n---------------------------\r\n\r\nFixed income portfolio analytics, exotic option pricing (via lattice, Black-Scholes model (BSM),\r\nMonte Carlo simulations, and Finite Differencing Methods (FDM)), and further visualization of concepts in finance.\r\n\r\n\r\nGenesis:\r\n---------\r\n\r\nThis project started as a `QFRM R package `_\r\nin Spring 2015 QFRM course (STAT 449 and STAT 649) at Rice University.\r\n\r\nThe course is part of computational finance and economic systems (`CoFES `_) program,\r\nled by `Dr. Katherine Ensor. `_\r\n\r\n\r\nUnderlying textbook (source of financial calculations and algorithms)\r\n------------------------------------------------------------------------\r\n\r\n`Options, Futures and other Derivatives (OFOD) `_ by John C. Hull, 9ed, 2014, `ISBN 0133456315 `_ is a well established text in finance and risk management. Major certification exams in finance (CFA, FRM, CAIA, CQF, ...) list it as a core reference.\r\n\r\n\r\nInstall:\r\n---------\r\n\r\nDirectly from PyPI with pip command in a terminal (or windows command, cmd.exe) prompt, assuming ``pip`` is in your PATH:\r\n\r\n.. code:: bash\r\n\r\n $ pip install qfrm\r\n\r\n\r\nTypical usage:\r\n------------------\r\n\r\n3% annually-paying bond with 3.1 TTM (in years), evaluated at 5% continuously compounded (CC) yield-to-maturity (YTM),\r\ni.e. flat yield curve (YC)\r\n\r\n.. code:: python\r\n\r\n >>> Bond(3,1,3.1, pyz=.05).analytics()\r\n\r\n ------------------ Bond analytics: ------------------------\r\n * Annual coupon, $: 3\r\n * Coupon frequency, p.a.: 1\r\n Time to maturity (ttm), yrs: 3.1\r\n * Cash flows, $ p.a.: (3.0, 3.0, 3.0, 103.0)\r\n Time to cash flows (ttcf), yrs: (0.10000000000000009, 1.1, 2.1, 3.1)\r\n Dirty price (PVCF), $: 96.73623\r\n * Clean price (PVCF - AI), $: 94.03623\r\n YTM, CC rate: 0.05\r\n YTM, rate at coupon frequency: 0.05127\r\n Current yield, rate at coupon frequency: 0.0319\r\n * Par yield, rate at coupon frequency: 0.03883\r\n Yield curve, CC rate: (0.05, 0.05, 0.05, 0.05)\r\n Macaulay duration, yrs: 2.9208\r\n Modified duration, yrs: 2.77835\r\n Effective duration, yrs: 2.92126\r\n * Convexity, yrs^2: 8.92202\r\n Desc: {}\r\n ------------------------------------------------------------------------------\r\n Median run time (microsec) for 1 iteration(s): 11604.918843659107\r\n\r\n\r\n.. figure:: http://oleg.rice.edu/files/2015/09/Ex2-001-1o4qx9i.jpg\r\n :width: 200px\r\n :align: center\r\n :height: 100px\r\n :alt: sample output plot\r\n :figclass: align-center\r\n\r\n\r\nTextbook example (default) of 6% SA bond with 2 years/time to maturity (TTM), see p.83 in Hull's OFOD/9ed\r\n\r\n.. code:: python\r\n\r\n >>> Bond().analytics()\r\n\r\n4% semi-annual (SA) bond with 4.25 ttm (4 years and 3 mo), evaluated at $97.5 PVCF (which computes to 4.86% ytm or flat YC)\r\n\r\n.. code:: python\r\n\r\n >>> b = Bond(4,2,4.25, pyz=97.5)\r\n >>> b.ytm() # compute yield from supplied (PVCF) price ($97.5 assumed)\r\n 0.048615328294339864\r\n >>> b.ytm(px_target=(97.5, 98, 99, 100, 101)) # vectorized computation of yield-to-maturity\r\n (0.048615328294339864, 0.047305618596811434, 0.04470725938701976, 0.04213648737177501, 0.039592727021145635)\r\n >>> b.analytics() # prints full report and visualization\r\n\r\nThe same 4% SA bond evaluated with a specific YC.\r\nZero rates are assumed to have TTM matching those of cash flows (CF), left to right.\r\nInsufficient rates are extrapolated with a constant.\r\n\r\n.. code:: python\r\n\r\n >>> b.set_pyz(pyz=(.05,.06,.07,.08)).analytics()\r\n\r\nThe same 4% SA bond evaluated with a specific YC. User provides zero rates with corresponding TTM.\r\nTTM required to evaluate CF are extra/interpolated from existing curve with constant rates on each side.\r\n\r\n.. code:: python\r\n\r\n >>> b.set_pyz(pyz=(.05,.06,.04,.03), ttz=(.5,1,2,6)).analytics()\r\n\r\n\r\nThis project uses industry-accepted acronyms:\r\n--------------------------------------------------------\r\n\r\n * AI: accrued interest\r\n * APT: arbitrage pricing theorem\r\n * ASP: active server pages (i.e. HTML scripting on server side) by Microsoft\r\n * b/w: between\r\n * bip: basis points\r\n * BM: Brownian motion (aka Wiener Process)\r\n * Bmk: benchmark\r\n * BOPM: binomial option pricing model\r\n * bp: basis points\r\n * BSM: Black-Scholes model or Black-Scholes-Merton model\r\n * BT: binomial tree\r\n * c.c.: continuous compounding\r\n * CC: continuous compounding\r\n * CCP: central counterparty\r\n * CCRR: continuously compounded rate of return\r\n * CDS: credit default swap\r\n * CDO: credit default obligation\r\n * CF: cash flows\r\n * Cmdt: commodity\r\n * Corp: corporate (finance or sector)\r\n * CP: counterparty (in finance)\r\n * CUSIP: Committee on Uniform Security Identification Procedures, North-American financial security identifier (like ISIN)\r\n * ESO: employee stock option\r\n * ETD: exchange-traded derivative\r\n * FE: financial engineering\r\n * FDM: Finite differencing method\r\n * FRA: forward rate agreement\r\n * FRN: floating rate notes\r\n * Fwd: forward\r\n * FX: foreign currency or foreign currency exchange\r\n * FV: future value\r\n * GBM: geometric Brownian motion\r\n * Gvt: government\r\n * Hld: holding\r\n * Idx: index\r\n * IM: initial margin\r\n * IR: interest rate\r\n * IRD: interest rate derivatives\r\n * IRTS: interest rate term structure\r\n * ISIN: International Securities Identification Number\r\n * LIBID: London Interbank bid rate\r\n * LIBOR: London Interbank Offered Rate\r\n * LT: lattice tree (i.e binomial, trinomial, ...)\r\n * MA: margin account; moving average\r\n * MC: margin call\r\n * MC: Monte Carlo simulation\r\n * Mgt: management\r\n * Mkt: market\r\n * MM: maintenance margin\r\n * MP: Markov process\r\n * MTM: marking to market\r\n * Mtge: mortgage\r\n * MV: multivariate\r\n * OFOD: Options, Futures, and Other Derivatives\r\n * OFOD9e: Options, Futures, and Other Derivatives, 9th edition\r\n * OIS: overnight index SWAP rate\r\n * OOP: object oriented programming\r\n * p.a.: per annum\r\n * PD: probability of default\r\n * PDE: partial differential equation\r\n * PM: portfolio manager\r\n * PORTIA: portfolio accounting system by Thomson Financial\r\n * Pts: points\r\n * PV: present value\r\n * PVCF: present value of cash flows\r\n * QFRM: quantitative financial risk management\r\n * REPO: Repurchase agreement rate\r\n * RFR: risk free rate\r\n * RN: risk-neutral\r\n * RNW: risk-neutral world\r\n * RoI: return on investment\r\n * RoR: rate of return\r\n * r.v.: random variable\r\n * s.a.: semi-annual\r\n * SA: semi-annual\r\n * SAC: semi-annual compounding\r\n * SP: stochastic process\r\n * SQL: sequel query language\r\n * SQP: standard Wiener process\r\n * SURF: step up recovery floaters (floating rate notes)\r\n * TBA: to be announced\r\n * TBD: To be determined\r\n * TOMS: Trade Order Management Solution (or System)\r\n * Trx: transaction\r\n * TS: time series\r\n * TSA: time series analysis\r\n * TTCF: time to cash flows\r\n * TTM: time to maturity\r\n * TVM: time value of money\r\n * UDF: user defined function\r\n * URL: universe resource locator\r\n * VaR: value at risk\r\n * Var: variance\r\n * VB: Visual Basic (by Microsoft)\r\n * VBA: Visual Basic for Applications\r\n * Vol: volatility\r\n * WAC: weighted-average coupon\r\n * WAM: weighted-average maturity\r\n * WP: Wiener process (aka Brownian motion)\r\n * YC: yield curve\r\n * Yld: yield\r\n * ZCB: zero coupon bond", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://oleg.rice.edu/stat-449-649-fall-2015/", "keywords": "finance risk management bond duration yield curve duration PVCF present value of cash flows IRR TVM NPV interest rate", "license": "LICENSE.txt", "maintainer": null, "maintainer_email": null, "name": "qfrm", "package_url": "https://pypi.org/project/qfrm/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/qfrm/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://oleg.rice.edu/stat-449-649-fall-2015/" }, "release_url": "https://pypi.org/project/qfrm/0.2.0.27/", "requires_dist": null, "requires_python": null, "summary": "Quantitative Financial Risk Management: awesome OOP tools for measuring, managing and visualizing risk of financial instruments and portfolios.", "version": "0.2.0.27" }, "last_serial": 2027004, "releases": { "0.1.1.12": [ { "comment_text": "", "digests": { "md5": "fde773c5c9d8be1b1be0a39f347489fa", "sha256": "4b82a3beca4de04dd4af773e02bcf9facc9dcbe9cbfaa21b60aadcf855883602" }, "downloads": -1, "filename": "qfrm-0.1.1.12.zip", "has_sig": false, "md5_digest": "fde773c5c9d8be1b1be0a39f347489fa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16794, "upload_time": "2015-09-28T17:40:15", "url": "https://files.pythonhosted.org/packages/f0/fc/b7349cf7962408cb03187a0ce1246122a3683f92e9873939968fefd90f79/qfrm-0.1.1.12.zip" } ], "0.2.0.23": [ { "comment_text": "", "digests": { "md5": "351e4be73204361c2ca54f9a4a68729c", "sha256": "d82e0cabbea8db05cf6d3d46e02bfe8c83d1d075fc00a854412f93ce242ea888" }, "downloads": -1, "filename": "qfrm-0.2.0.23-py3-none-any.whl", "has_sig": false, "md5_digest": "351e4be73204361c2ca54f9a4a68729c", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 113423, "upload_time": "2015-12-06T06:02:24", "url": "https://files.pythonhosted.org/packages/c8/de/379851bc23ad905a40b20935c90b513ca86b57747f440120e6910675f233/qfrm-0.2.0.23-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "00e034380d2cf34ad2aeceac11181619", "sha256": "d1a7d82b98fb3c2f80f63e74dd117085a27f2836854fe74e1d6195dc7c451cc1" }, "downloads": -1, "filename": "qfrm-0.2.0.23.zip", "has_sig": false, "md5_digest": "00e034380d2cf34ad2aeceac11181619", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 119285, "upload_time": "2015-12-06T06:02:17", "url": "https://files.pythonhosted.org/packages/fc/15/bb6ca6eae3785352446350da02f9319ab2cd5fe841292d018280b4dbc0af/qfrm-0.2.0.23.zip" } ], "0.2.0.24": [ { "comment_text": "", "digests": { "md5": "ba18bb0564e6704b0021c145fbf4fd94", "sha256": "0511718ea8d20cd4d30f8ec84b4c184e846383394151b56feab1913054ba577a" }, "downloads": -1, "filename": "qfrm-0.2.0.24-py3-none-any.whl", "has_sig": false, "md5_digest": "ba18bb0564e6704b0021c145fbf4fd94", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 110012, "upload_time": "2015-12-09T07:16:51", "url": "https://files.pythonhosted.org/packages/3d/aa/31b53f247d88c2e7058581fe5b2eb5ff901709464f3f5a496c6fabbe3c45/qfrm-0.2.0.24-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "51a7f95ffac377c57c6d0f20b985dff1", "sha256": "a418906719678ffcef22a9a634f2741a778e88bb22e85a424064e9c436823ded" }, "downloads": -1, "filename": "qfrm-0.2.0.24.zip", "has_sig": false, "md5_digest": "51a7f95ffac377c57c6d0f20b985dff1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 116142, "upload_time": "2015-12-09T07:16:46", "url": "https://files.pythonhosted.org/packages/f6/88/5fd738122d20c2435405c4c4b12655733b144583bc011658bcdff17f4ba6/qfrm-0.2.0.24.zip" } ], "0.2.0.25": [ { "comment_text": "", "digests": { "md5": "c2d358f575406d0d5fdebf1a76abcf9a", "sha256": "71eae77fa1bc3af68e5688473ac1512da4e9bf2edd83d398d846dbe4b8dcebb2" }, "downloads": -1, "filename": "qfrm-0.2.0.25-py3-none-any.whl", "has_sig": false, "md5_digest": "c2d358f575406d0d5fdebf1a76abcf9a", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 110522, "upload_time": "2015-12-09T21:50:17", "url": "https://files.pythonhosted.org/packages/6f/1e/e0d5e6b5f597727c915d165fd0008846efade50d0a2330c4a86fbc14aee6/qfrm-0.2.0.25-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8c4ef2071d31cb8b975e455c2d46b5bc", "sha256": "774dbbfa6594e9494f7b93cc5f15e5f68b55c121a0cd4daa25e59e71b62bab31" }, "downloads": -1, "filename": "qfrm-0.2.0.25.zip", "has_sig": false, "md5_digest": "8c4ef2071d31cb8b975e455c2d46b5bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 116650, "upload_time": "2015-12-09T21:50:01", "url": "https://files.pythonhosted.org/packages/df/d7/6b5e20a6ade17c554f0c79c24489afa8d369b30ce6b0d5b8634359773c3f/qfrm-0.2.0.25.zip" } ], "0.2.0.26": [ { "comment_text": "", "digests": { "md5": "07bc19920035e00b1319a457e6b2495d", "sha256": "94b7dec39e95be17c2bf685eddb034bb6999e16efd68f36b9b9b462f00cabf1f" }, "downloads": -1, "filename": "qfrm-0.2.0.26-py3-none-any.whl", "has_sig": false, "md5_digest": "07bc19920035e00b1319a457e6b2495d", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 110529, "upload_time": "2015-12-10T15:02:14", "url": "https://files.pythonhosted.org/packages/94/62/db113cccf30c06fc7ee9d08dbf73d3195a417eafa02e5c3fabb55d6f77df/qfrm-0.2.0.26-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "57b60e155cfa1164659200a8ef559d8b", "sha256": "a7f4271ff29f6fe7ba46a81e66f88e245696d126f8ce8363a7fb91c4bff38a46" }, "downloads": -1, "filename": "qfrm-0.2.0.26.zip", "has_sig": false, "md5_digest": "57b60e155cfa1164659200a8ef559d8b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 116695, "upload_time": "2015-12-10T15:01:42", "url": "https://files.pythonhosted.org/packages/d9/82/32ba38995eb73e265decab4be7587542c0c8ed6810ba84ae0abd93349a5f/qfrm-0.2.0.26.zip" } ], "0.2.0.27": [ { "comment_text": "", "digests": { "md5": "653d74e485830ebe8d406e06c2fe216f", "sha256": "eefacfbd5dce7d68dffa040da328eaf84e0b76457b7fc2962ccf3feca56b2f96" }, "downloads": -1, "filename": "qfrm-0.2.0.27-py3-none-any.whl", "has_sig": false, "md5_digest": "653d74e485830ebe8d406e06c2fe216f", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 110679, "upload_time": "2015-12-12T19:41:12", "url": "https://files.pythonhosted.org/packages/ea/7f/fb0e34cc75d3129f40dd3b0292e051851c320b064b3587d0a3d2df5179f4/qfrm-0.2.0.27-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "644c4b55d0c4f593fd331364877f8691", "sha256": "1a43e83c2cd2d8c3e86662aae559f859ea3e9c4ec637bd4e62bb7a304533aa02" }, "downloads": -1, "filename": "qfrm-0.2.0.27.zip", "has_sig": false, "md5_digest": "644c4b55d0c4f593fd331364877f8691", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 116848, "upload_time": "2015-12-12T19:41:06", "url": "https://files.pythonhosted.org/packages/a1/a9/ccc342903a8375b9686405d4443c94f20b25a68c27d633d9285f391a5f56/qfrm-0.2.0.27.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "653d74e485830ebe8d406e06c2fe216f", "sha256": "eefacfbd5dce7d68dffa040da328eaf84e0b76457b7fc2962ccf3feca56b2f96" }, "downloads": -1, "filename": "qfrm-0.2.0.27-py3-none-any.whl", "has_sig": false, "md5_digest": "653d74e485830ebe8d406e06c2fe216f", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 110679, "upload_time": "2015-12-12T19:41:12", "url": "https://files.pythonhosted.org/packages/ea/7f/fb0e34cc75d3129f40dd3b0292e051851c320b064b3587d0a3d2df5179f4/qfrm-0.2.0.27-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "644c4b55d0c4f593fd331364877f8691", "sha256": "1a43e83c2cd2d8c3e86662aae559f859ea3e9c4ec637bd4e62bb7a304533aa02" }, "downloads": -1, "filename": "qfrm-0.2.0.27.zip", "has_sig": false, "md5_digest": "644c4b55d0c4f593fd331364877f8691", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 116848, "upload_time": "2015-12-12T19:41:06", "url": "https://files.pythonhosted.org/packages/a1/a9/ccc342903a8375b9686405d4443c94f20b25a68c27d633d9285f391a5f56/qfrm-0.2.0.27.zip" } ] }