IDEAS home Printed from https://ideas.repec.org/p/arx/papers/2307.10694.html
   My bibliography  Save this paper

PySDTest: a Python/Stata Package for Stochastic Dominance Tests

Author

Listed:
  • Kyungho Lee
  • Yoon-Jae Whang

Abstract

We introduce PySDTest, a Python/Stata package for statistical tests of stochastic dominance. PySDTest implements various testing procedures such as Barrett and Donald (2003), Linton et al. (2005), Linton et al. (2010), and Donald and Hsu (2016), along with their extensions. Users can flexibly combine several resampling methods and test statistics, including the numerical delta method (D\"umbgen, 1993; Hong and Li, 2018; Fang and Santos, 2019). The package allows for testing advanced hypotheses on stochastic dominance relations, such as stochastic maximality among multiple prospects. We first provide an overview of the concepts of stochastic dominance and testing methods. Then, we offer practical guidance for using the package and the Stata command pysdtest. We apply PySDTest to investigate the portfolio choice problem between the daily returns of Bitcoin and the S&P 500 index as an empirical illustration. Our findings indicate that the S&P 500 index returns second-order stochastically dominate the Bitcoin returns.

Suggested Citation

  • Kyungho Lee & Yoon-Jae Whang, 2023. "PySDTest: a Python/Stata Package for Stochastic Dominance Tests," Papers 2307.10694, arXiv.org, revised Aug 2024.
  • Handle: RePEc:arx:papers:2307.10694
    as

    Download full text from publisher

    File URL: http://arxiv.org/pdf/2307.10694
    File Function: Latest version
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Lee, Kyungho & Linton, Oliver & Whang, Yoon-Jae, 2023. "Testing for time stochastic dominance," Journal of Econometrics, Elsevier, vol. 235(2), pages 352-371.
    2. Garry F. Barrett & Stephen G. Donald, 2003. "Consistent Tests for Stochastic Dominance," Econometrica, Econometric Society, vol. 71(1), pages 71-104, January.
    3. Anderson, Gordon, 1996. "Nonparametric Tests of Stochastic Dominance in Income Distributions," Econometrica, Econometric Society, vol. 64(5), pages 1183-1193, September.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Oliver Linton & Esfandiar Maasoumi & Yoon-Jae Wang, 2002. "Consistent testing for stochastic dominance: a subsampling approach," CeMMAP working papers 03/02, Institute for Fiscal Studies.
    2. Hooi Hooi Lean & Michael McAleer & Wing-Keung Wong, 2013. "Risk-averse and Risk-seeking Investor Preferences for Oil Spot and Futures," Documentos de Trabajo del ICAE 2013-31, Universidad Complutense de Madrid, Facultad de Ciencias Económicas y Empresariales, Instituto Complutense de Análisis Económico, revised Aug 2013.
    3. Maasoumi, Esfandiar & Almas Heshmati, 2003. "Evaluating Dominance Ranking of PSID Incomes by various Household Attributes," Departmental Working Papers 0509, Southern Methodist University, Department of Economics.
    4. Marcel Voia, 2008. "A Distributional Analysis Of Treatment Effects In Randomized Experiments," Economics Bulletin, AccessEcon, vol. 3(36), pages 1-9.
    5. M. Azhar Hussain & Nikolaj Siersbæk & Lars Peter Østerdal, 2020. "Multidimensional welfare comparisons of EU member states before, during, and after the financial crisis: a dominance approach," Social Choice and Welfare, Springer;The Society for Social Choice and Welfare, vol. 55(4), pages 645-686, December.
    6. Grönqvist, Charlotta, 2009. "Empirical studies on the private value of Finnish patents," Bank of Finland Scientific Monographs, Bank of Finland, volume 0, number sm2009_041, December.
    7. Wen-Hao Chen & Jean-Yves Duclos, 2011. "Testing for poverty dominance: an application to Canada," Canadian Journal of Economics, Canadian Economics Association, vol. 44(3), pages 781-803, August.
    8. Lee, Kyungho & Linton, Oliver & Whang, Yoon-Jae, 2023. "Testing for time stochastic dominance," Journal of Econometrics, Elsevier, vol. 235(2), pages 352-371.
    9. Ozkan Eren & Daniel L. Millimet, 2008. "Time to learn? The organizational structure of schools and student achievement," Studies in Empirical Economics, in: Christian Dustmann & Bernd Fitzenberger & Stephen Machin (ed.), The Economics of Education and Training, pages 47-78, Springer.
    10. Mehmet Pinar & Thanasis Stengos & M. Ege Yazgan, 2012. "Is there an Optimal Forecast Combination? A Stochastic Dominance Approach to Forecast Combination Puzzle," Working Paper series 17_12, Rimini Centre for Economic Analysis.
    11. Pinar, Mehmet & Stengos, Thanasis & Topaloglou, Nikolas, 2020. "On the construction of a feasible range of multidimensional poverty under benchmark weight uncertainty," European Journal of Operational Research, Elsevier, vol. 281(2), pages 415-427.
    12. Guo, Xu & Wong, Wing-Keung & Zhu, Lixing, 2013. "Make Almost Stochastic Dominance really Almost," MPRA Paper 49745, University Library of Munich, Germany.
    13. Ian Crawford, 2005. "A nonparametric test of stochastic dominance in multivariate distributions," School of Economics Discussion Papers 1205, School of Economics, University of Surrey.
    14. Gordon Anderson & Teng Wah Leo, 2014. "Ranking Alternative Non-Combinable Prospects: A Stochastic Dominance Based Route to the Second Best Solution," Working Papers tecipa-520, University of Toronto, Department of Economics.
    15. Frank A. Cowell & Emmanuel Flachaire, 2014. "Statistical Methods for Distributional Analysis," Working Papers halshs-01115996, HAL.
    16. Donald, Stephen G. & Hsu, Yu-Chin, 2014. "Estimation and inference for distribution functions and quantile functions in treatment effect models," Journal of Econometrics, Elsevier, vol. 178(P3), pages 383-397.
    17. Hooi Hooi Lean & Michael McAleer & Wing-Keung Wong, 2010. "Market Efficiency of Oil Spot and Futures: A Stochastic Dominance Approach," CIRJE F-Series CIRJE-F-705, CIRJE, Faculty of Economics, University of Tokyo.
    18. Lean, H.H. & McAleer, M.J. & Wong, W.-K., 2010. "Investor preferences for oil spot and futures based on mean-variance and stochastic dominance," Econometric Institute Research Papers EI 2010-37, Erasmus University Rotterdam, Erasmus School of Economics (ESE), Econometric Institute.
    19. Dominic Gasbarro & Wing-Keung Wong & J. Kenton Zumwalt, 2007. "Stochastic Dominance Analysis of iShares," The European Journal of Finance, Taylor & Francis Journals, vol. 13(1), pages 89-101.
    20. repec:stn:sotoec:1311 is not listed on IDEAS
    21. Evren Ors & Frédéric Palomino & Eloïc Peyrache, 2013. "Performance Gender Gap: Does Competition Matter?," Journal of Labor Economics, University of Chicago Press, vol. 31(3), pages 443-499.

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:arx:papers:2307.10694. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: arXiv administrators (email available below). General contact details of provider: http://arxiv.org/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.