Testing Stochastic Dominance with PySDTest for Python and Stata
Summary
This document introduces PySDTest, a Python and Stata package for statistically testing stochastic dominance relationships. It outlines procedures from several published methods and extensions, and describes options for combining test statistics with resampling approaches, including a numerical delta method. The package also supports more complex questions, such as identifying a stochastically maximal choice among several prospects.
An empirical illustration compares daily Bitcoin and S&P 500 index returns in a portfolio choice setting. The reported result is that S&P 500 returns second-order stochastically dominate Bitcoin returns, a finding that favors the index under the stated dominance criterion. This is an example of applying the tests, not evidence that the index will outperform in future periods or suit every investor. The document does not provide sample dates, implementation details, or sensitivity results, so readers would need the full study to assess the empirical comparison and the tests’ practical assumptions.
Key ideas
- Stochastic dominance tests compare return distributions under formal preference criteria.
- PySDTest implements multiple published testing procedures and extensions in Python and Stata.
- Users can combine test statistics with resampling methods, including a numerical delta method.
- The package can test maximality across multiple investment prospects.
- In the example, S&P 500 returns second-order stochastically dominate Bitcoin returns.
Tags
Full text
# PySDTest: a Python/Stata Package for Stochastic Dominance Tests # PySDTest: a Python/Stata Package for Stochastic Dominance Tests 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ümbgen, 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.
Shown in full with attribution under the source's licence. Licence: abstract CC0
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.