{ "info": { "author": "Zhenfei Yuan, Taizhong Hu", "author_email": "zfyuan@mail.ustc.edu.cn, thu@ustc.edu.cn", "bugtrack_url": null, "classifiers": [], "description": "Regular vine copula provides rich models for dependence structure\r\nmodeling. It combines vine structures and families of bivariate\r\ncopulas to construct a number of multivariate distributions that can\r\nmodel a wide range dependence patterns with different tail dependence\r\nfor different pairs. Two special cases of regular vine copulas, C-vine\r\nand D-vine copulas, have been deeply investigated.\r\n\r\nWe propose the Python package, pyvine, for modeling, sampling and\r\ntesting a more generalized regular vine copula (R-vine for\r\nshort). R-vine modeling algorithm searches for the R-vine structure\r\nwhich maximizes the vine tree dependence, i.e., the sum of the\r\nabsolute values of kendall's tau for paired variables on edges using\r\nPRIM algorithm of minimum-spanning-tree in a sequential way. The\r\nmaximum likelihood estimation algorithm takes the sequential\r\nestimation as initial value and uses L-BFGS-B algorithm for the\r\nlikelihood value optimization. R-vine sampling algorithm traverses all\r\nthe edges of vine structure from the last tree in a recursive way, and\r\ngenerates the marginal samples on each edge according to some nested\r\nconditions. Goodness-of-fit testing algorithm first generates\r\nRosenblatt's transformed data E, then tests the composite hypothesis\r\nH_0*: E ~ C* by using Anderson-Darling statistic, where C* is the\r\nindependence copula. Bootstrap method will generate the empirical\r\ndistribution of Anderson-Darling statistic replications to compute an\r\nadjusted P-value.\r\n\r\nThe computing of related functions of copulas such as cumulative\r\ndistribution functions often meets with the problem of overflow. We\r\nsolve this problem by reinvestigating the following six popular\r\nfamilies of bivariate opulas: Normal, Student t, Clayton, Gumbel,\r\nFrank and Joe copulas. Approximations of the above related functions\r\nof copulas are given when the overflow occurs in the computations. All\r\nthese are implemented in a subpackage bvcopula of pyvine, in which\r\nsubroutines are written in Fortran and wrapped into Python via f2py\r\nand good performance and high precision are both guaranteed.\r\n\r\nAn example for Rvine copula modeling is given as below::\r\n\r\n # Example\r\n \r\n import pandas as ps\r\n import pyvine as pv\r\n \r\n ## read the data and do rank transformation\r\n dat = ps.read_csv(\"data.csv\",index_col = 0, parse_dates = 0) \r\n \r\n cp_dat = dat.rank() / ( len(dat) + 1 ) \r\n\r\n ## initialize R-vine object named rv\r\n\r\n rv = pv.Rvine(cp_dat)\r\n \r\n ## sequential estimation for rv. 'structure' accepts 'r' for R-vine, \r\n ## 'c' for C-vine and 'd' for D-vine, 'familyset' accepts list of\r\n ## integers from 1 to 6, 'threads_num' accepts integer specifying number\r\n ## of threads using for taking mle on edges of the same vine tree\r\n ## simultaneously.\r\n \r\n rv.modeling(structure = 'r', familyset = [1,2,3,4,5,6], threads_num = 2)\r\n \r\n ## maximum likelihood estimation for rv. 'disp' controls the printing\r\n ## of ratio of progress of iterating for L-BFGS-B algorithm, 'threads_num'\r\n ## specifies the number of threads using for computing loglikelihood value\r\n ## for each edge in the same vine tree.\r\n \r\n rv.mle(disp=False, threads_num = 2)\r\n \r\n ## plot the R-vine structure for modeled object rv. All the vine trees will\r\n ## be plotted as default.\r\n \r\n rv.plot()\r\n \r\n ## display the result of estimation on each edge. 'ndigits' controls number\r\n ## of decimal digits for result.\r\n \r\n rv.res(ndigits = 3)\r\n \r\n ## testing\r\n \r\n rv.test()\r\n\r\nTo compile and install on linux (substitute 'gnu95' with 'mingw32' on Windows)::\r\n\r\n $ python setup.py config_fc --opt=\"-fopenmp\" build --fcompiler=gnu95\r\n $ python setup.py install", "description_content_type": null, "docs_url": null, "download_url": "taizhonglab.ustc.edu.cn/software/pyvine/pyvine-0.5.0.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "taizhonglab.ustc.edu.cn/software/pyvine.html", "keywords": "", "license": "GPL (>= 2)", "maintainer": "", "maintainer_email": "", "name": "pyvine", "package_url": "https://pypi.org/project/pyvine/", "platform": "Windows,Linux", "project_url": "https://pypi.org/project/pyvine/", "project_urls": { "Download": "taizhonglab.ustc.edu.cn/software/pyvine/pyvine-0.5.0.tar.gz", "Homepage": "taizhonglab.ustc.edu.cn/software/pyvine.html" }, "release_url": "https://pypi.org/project/pyvine/0.5.0/", "requires_dist": null, "requires_python": null, "summary": "This package provides regular vine modeling, sampling and testing algorithms. Also some popular bivariate copulas routines which are optimized for wider range of parameters, high precision and good performances.", "version": "0.5.0" }, "last_serial": 809639, "releases": { "0.4.2": [ { "comment_text": "", "digests": { "md5": "1df992923e7696fb96e44d62926f13f8", "sha256": "2bbdd541834f3b530336a762725429a66d644ff7b3b013cdf318be661c27e500" }, "downloads": -1, "filename": "pyvine-0.4.2.tar.gz", "has_sig": false, "md5_digest": "1df992923e7696fb96e44d62926f13f8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 398300, "upload_time": "2013-01-13T03:36:06", "url": "https://files.pythonhosted.org/packages/ac/2b/851853f666cab412a38ec5cbd2948a3262539481e2f5b9a9b5d165f7a09d/pyvine-0.4.2.tar.gz" }, { "comment_text": "", "digests": { "md5": "617889504b696c2910c69b0c777f187a", "sha256": "590782d40135d4cd17520bf98f55585bd509e744be0a80d0df202a4f8c23efb2" }, "downloads": -1, "filename": "pyvine-0.4.2.win32-py2.7.exe", "has_sig": false, "md5_digest": "617889504b696c2910c69b0c777f187a", "packagetype": "bdist_wininst", "python_version": "2.7", "requires_python": null, "size": 795671, "upload_time": "2013-01-13T04:19:55", "url": "https://files.pythonhosted.org/packages/e5/c9/56ded9e6d9d10096803da83f57680b0f65479000f9db37f07ea548555a2f/pyvine-0.4.2.win32-py2.7.exe" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "e76e84a7dc31b5b20525996a67511642", "sha256": "20811c953fdf79caa3b3ea02c7b1c6328286b90390922ac23b8fc78619d2c11f" }, "downloads": -1, "filename": "pyvine-0.5.0.tar.gz", "has_sig": false, "md5_digest": "e76e84a7dc31b5b20525996a67511642", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 398152, "upload_time": "2013-04-11T14:30:46", "url": "https://files.pythonhosted.org/packages/14/4a/bcda963f67f3cb20b1d6227a98055309c6ad53ca08799f61653bdcbfade8/pyvine-0.5.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e76e84a7dc31b5b20525996a67511642", "sha256": "20811c953fdf79caa3b3ea02c7b1c6328286b90390922ac23b8fc78619d2c11f" }, "downloads": -1, "filename": "pyvine-0.5.0.tar.gz", "has_sig": false, "md5_digest": "e76e84a7dc31b5b20525996a67511642", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 398152, "upload_time": "2013-04-11T14:30:46", "url": "https://files.pythonhosted.org/packages/14/4a/bcda963f67f3cb20b1d6227a98055309c6ad53ca08799f61653bdcbfade8/pyvine-0.5.0.tar.gz" } ] }