{ "info": { "author": "Xixuan Han", "author_email": "xixuanhan@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7" ], "description": "# Order Flow Risk Measures\n\nCurrently, the packages only has VPIN.\n\n## Installation\nThe default way is to open a console and execute\n\n pip install flowrisk\n\nOne may also download from here and manually install\n\n git clone https://github.com/hanxixuana/flowrisk\n cd flowrisk\n python setup.py install\n\n\n## VPIN\nTo implement VPIN, we made\n\n 1. an EWMA estimator of volatility (RecursiveEWMAVol)\n 2. a numpy.ndarray based buckets with bulk classification of volumes in the MA style (RecursiveBulkClassMABuckets)\n 3. a numpy.ndarray based buckets with bulk classification of volumes in the EWMA style \n (RecursiveBulkClassEWMABuckets)\n 4. a recursive VPIN estimator (RecursiveVPIN)\n 5. a recursive VPIN estimator with VPIN confidence intervals (RecursiveConfVPIN)\n 6. a recursive model using an EWMA estimator of means and RecursiveEWMAVol, for modeling and log \n innovations of VPINs and for calculating VPINs' confidence intervals (RecursiveEWMABand)\n 7. a one-shoot VPIN estimator for a series of prices (BulkVPIN)\n 8. a one-shoot VPIN estimator for a series of prices with VPIN confidence intervals (BulkConfVPIN)\n 9. various configuration classes (RecursiveVPINConfig, RecursiveConfVPINConfig, BulkVPINConfig, \n BulkConfVPINConfig)\n \nFor illustration, we also put the 1-min data of five small caps (CBIO, FBNC, GNC NDLS, QES) and five large caps \n(V, AAPL, NVDA, GS, INTC) from the US stock market. The data covers Nov 12 to Nov 21, 2018. The data can used by, \nfor example,\n\n import flowrisk as fr\n\n class Config(fr.BulkConfVPINConfig): \n N_TIME_BAR_FOR_INITIALIZATION = 50\n \n config = Config()\n \n example = fr.examples.USStocks(config)\n symbols = example.list_symbols('small')\n result = example.estimate_vpin_and_conf_interval(symbols[0])\n \n example.draw_price_vpins_and_conf_intervals()\n\nThe piece of the code will automatically calculate VPINs and associated confidence intervals of GNC. We also put\nprices and volumes together with them into a nice picture, which is saved to ./pics/gnc.png by default. Note that\nthe calculation of VPINs is fast, but making nice pictures is slow. One may also find out more in test.py.\n\nNote that there are several differences between this implementation and the original paper:\n\n Easley, D., L\u00f3pez de Prado, M. M., & O'Hara, M. (2012). Flow toxicity and liquidity in a high-frequency world. \n The Review of Financial Studies, 25(5), 1457-1493.\n\nFor example,\n\n 1. we use an EWMA estimator for the volatility of PnLs, instead of using all samples for estimating the PnL \n volatility; and\n 2. VPINs are calculated from the very beginning, instead of after a certain number of buckets have been filled.\n\nWe made the differences because the core of our package is a recursive estimator of VPIN.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/hanxixuana/flowrisk", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "flowrisk", "package_url": "https://pypi.org/project/flowrisk/", "platform": "", "project_url": "https://pypi.org/project/flowrisk/", "project_urls": { "Homepage": "https://github.com/hanxixuana/flowrisk" }, "release_url": "https://pypi.org/project/flowrisk/0.2.2/", "requires_dist": null, "requires_python": "", "summary": "Order flow risk measures in Python", "version": "0.2.2" }, "last_serial": 4527942, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "1b6f6c2d904adface35bdba4bc46021b", "sha256": "7d3f1fc9b7efe8c934c8ae317290669a8559ad970ebfffab32e03484c6a986c1" }, "downloads": -1, "filename": "flowrisk-0.2.tar.gz", "has_sig": false, "md5_digest": "1b6f6c2d904adface35bdba4bc46021b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 269760, "upload_time": "2018-11-23T02:51:04", "url": "https://files.pythonhosted.org/packages/ef/de/1cda7f2318101eb060c844505a007a6d755aaa3e8624c46eaca475d2df6c/flowrisk-0.2.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "a8f80104eaf85ba9c669e0355f4958b0", "sha256": "fc57fb6fd22346d0041d49041e3b771ea1bb141f26d4faa0648d2f4dc0829a00" }, "downloads": -1, "filename": "flowrisk-0.2.2.tar.gz", "has_sig": false, "md5_digest": "a8f80104eaf85ba9c669e0355f4958b0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1637684, "upload_time": "2018-11-26T04:24:50", "url": "https://files.pythonhosted.org/packages/a5/5b/4e6092062ff9d53bb633dd87b96061fd5a560d1082df2ec70c3c4879fb5a/flowrisk-0.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a8f80104eaf85ba9c669e0355f4958b0", "sha256": "fc57fb6fd22346d0041d49041e3b771ea1bb141f26d4faa0648d2f4dc0829a00" }, "downloads": -1, "filename": "flowrisk-0.2.2.tar.gz", "has_sig": false, "md5_digest": "a8f80104eaf85ba9c669e0355f4958b0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1637684, "upload_time": "2018-11-26T04:24:50", "url": "https://files.pythonhosted.org/packages/a5/5b/4e6092062ff9d53bb633dd87b96061fd5a560d1082df2ec70c3c4879fb5a/flowrisk-0.2.2.tar.gz" } ] }