StochasticDominance.jl

StochasticDominance.jl: A Julia Package for Higher Order Stochastic Dominance - Published in JOSS (2025)

https://github.com/rajmadan96/stochasticdominance.jl

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org, joss.theoj.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.8%) to scientific vocabulary

Scientific Fields

Medicine Life Sciences - 40% confidence
Last synced: 4 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: rajmadan96
  • License: cc-by-4.0
  • Language: Julia
  • Default Branch: main
  • Size: 1.95 MB
Statistics
  • Stars: 3
  • Watchers: 2
  • Forks: 2
  • Open Issues: 1
  • Releases: 0
Created 11 months ago · Last pushed 4 months ago
Metadata Files
Readme License

README.md

Stable Dev Aqua QA CI status

StochasticDominance.jl

StochasticDominance.jl is a Julia package that offers tools for analyzing higher-order stochastic dominance, a technique used to define a partial order between random variables.

Brief overview of stochastic dominance

Stochastic dominance is a concept used to compare decision alternatives based on their cumulative risk profiles, ensuring that one alternative is preferred over another without any trade-offs across values. In the context of portfolio optimization, given a benchmark asset and a portfolio of assets, we seek an optimal allocation that maximizes a chosen objective (e.g., maximizing returns) while satisfying (higher-order) stochastic dominance constraints.

Main features of the package

The StochasticDominance.jl package provides tools to:

  1. Verify higher-order stochastic dominance – Check whether a given portfolio satisfies higher-order dominance criteria relative to a benchmark asset.
  2. Determine the optimal allocation – Find the asset allocation that maximizes a chosen objective (e.g., maximizing returns) while adhering to stochastic dominance constraints. It supports two key objective functions: maximizing expected returns and minimizing higher-order risk measures.

Installation

You can install StochasticDominance.jl in Julia using either Pkg.add or by cloning the repository.

Option 1: Install from the Julia General Registry

This is the easiest way to install the package: julia-repl julia> using Pkg julia> Pkg.add("StochasticDominance") julia> using StochasticDominance

Documentation

The stable documentation for StochasticDominance.jl can be found here. It provides detailed descriptions of the package's functions along with examples showcasing its various features.

Option 2: Clone from GitHub

If you want to use the latest development version, clone the repository and build manually: sh git clone https://github.com/rajmadan96/StochasticDominance.jl.git cd StochasticDominance.jl julia --project=. Then, inside the Julia REPL: julia-repl julia> using Pkg julia> Pkg.instantiate() # Install dependencies julia> using StochasticDominance

Once you have installed StochasticDominance.jl, we recommend going through the tutorials from beginning to end to understand how to use the package to verify stochastic dominance and determine the optimal allocation between a benchmark asset and a portfolio.

Important functions in the package

The StochasticDominance.jl package provides several important functions, which are explained in detail in the tutorials section. Here, we provide a brief overview of the functions. 1. verify_dominance: This function checks whether the given benchmark asset, represented as the random variable $X$, and the weighted portfolio asset, represented as the random variable $Y$, exhibit a dominance relationship for the specified stochastic order. This means that $Y$ consistently yields preferable outcomes over $X$ in the specified stochastic order.

  1. optimize_max_return_SD: This function determines the optimal asset allocation that maximizes expected returns for a given stochastic order (SDorder). Additionally, using optimize_max_return_SD(; plots=true), users can generate a pie chart displaying the optimal allocation in percentages, along with the maximized expected returns and benchmark returns. The function also includes the option optimize_max_return_SD(; verbose=true), which allows users to imprint the convergence (or dominance) of the numerical method.

  2. optimize_min_riskreturn_SD: This function determines the optimal asset allocation by minimizing higher-order risk measures for a given stochastic order (SDorder) while also indicating whether dominance is achieved. Additionally, using optimize_min_riskreturn_SD(; plots=true), users can generate a pie chart that visualizes the optimal allocation in percentages, along with the minimizing higher-order risk measure returns. The function also provides the option optimize_min_riskreturn_SD(; verbose=true), allowing users to assess the convergence (or dominance) of the numerical algorithm.

Citing StochasticDominance.jl

We ask that you please cite the following paper if you use StochasticDominance.jl: @misc{LakshmananPichler2025, author={Rajmadan Lakshmanan and Alois Pichler}, title={StochasticDominance.jl: A Julia Package for Higher Order Stochastic Dominance}, year = {2025}, url={https://arxiv.org/abs/2502.17043} }

Contribute: Submit pull requests to improve features or fix bugs.

Report Issues: Use the Issues tab to flag bugs, errors, or unexpected behavior.

Support: For questions or help, open a discussion or create an issue.

Owner

  • Name: Rajmadan
  • Login: rajmadan96
  • Kind: user
  • Location: Chemnitz,Germany
  • Company: TU Chemnitz

GitHub Events

Total
  • Create event: 4
  • Commit comment event: 8
  • Issues event: 6
  • Watch event: 6
  • Delete event: 3
  • Issue comment event: 22
  • Push event: 233
  • Pull request event: 8
  • Fork event: 2
Last Year
  • Create event: 4
  • Commit comment event: 8
  • Issues event: 6
  • Watch event: 6
  • Delete event: 3
  • Issue comment event: 22
  • Push event: 233
  • Pull request event: 8
  • Fork event: 2

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 3
  • Total pull requests: 4
  • Average time to close issues: about 15 hours
  • Average time to close pull requests: about 1 month
  • Total issue authors: 3
  • Total pull request authors: 1
  • Average comments per issue: 1.67
  • Average comments per pull request: 0.25
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 4
Past Year
  • Issues: 3
  • Pull requests: 4
  • Average time to close issues: about 15 hours
  • Average time to close pull requests: about 1 month
  • Issue authors: 3
  • Pull request authors: 1
  • Average comments per issue: 1.67
  • Average comments per pull request: 0.25
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 4
Top Authors
Issue Authors
  • odow (1)
  • lrnv (1)
  • JuliaTagBot (1)
Pull Request Authors
  • dependabot[bot] (4)
Top Labels
Issue Labels
Pull Request Labels
dependencies (4) github_actions (1)

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 4
juliahub.com: StochasticDominance
  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 8.5%
Dependent packages count: 36.8%
Average: 41.1%
Forks count: 53.3%
Stargazers count: 65.8%
Last synced: 4 months ago

Dependencies

.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite
.github/workflows/ci.yml actions
  • actions/checkout v3 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/docs.yml actions
  • actions/checkout v3 composite
  • julia-actions/setup-julia latest composite