Skip to main content

Probabilistic Sharpe ratio and related statistics.

Project description

📦 jsharpe

PyPI version License: MIT CI Created with qCradle

🚀 Getting Started

🔧 Set Up Environment

make install

This installs/updates uv, creates your virtual environment and installs dependencies.

📚 Usage

Run this minimal, deterministic example to compute the Probabilistic Sharpe Ratio (PSR) from the package functions.

from jsharpe import probabilistic_sharpe_ratio

sr = 0.036 / 0.079
psr = probabilistic_sharpe_ratio(SR=sr, SR0=0, T=24, gamma3=-2.448, gamma4=10.164)
print(f"{psr:.3f}")
0.987

✅ Configure Pre-commit Hooks

make fmt

Installs hooks to maintain code quality and formatting.

🛠️ Development Commands

make tests   # Run test suite
make marimo  # Start Marimo notebooks

👥 Contributing

  • 🍴 Fork the repository
  • 🌿 Create your feature branch (git checkout -b feature/amazing-feature)
  • 💾 Commit your changes (git commit -m 'Add some amazing feature')
  • 🚢 Push to the branch (git push origin feature/amazing-feature)
  • 🔍 Open a Pull Request

🏗️ Project Structure & Configuration Templates

This project uses standardized configuration files from jebel-quant/rhiza, which provides a consistent development environment across multiple projects.

Synchronized Files

The following files are automatically synchronized from the template repository:

Template Synchronization

The .github/template.yml file controls which files are synchronized from the template repository. To sync with the latest template updates:

make sync

This ensures the project benefits from improvements to the shared configuration without manual updates.

Customization

While most boilerplate files come from the template, the following are project-specific:

  • README.md (this file)
  • pyproject.toml (project dependencies and metadata)
  • ruff.toml (extended but based on template)
  • Source code in src/
  • Project-specific tests (e.g., tests/test_sharpe.py)

Note: The tests/test_rhiza directory contains template-provided tests for validating the boilerplate configuration itself.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jsharpe-0.3.0.tar.gz (134.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jsharpe-0.3.0-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file jsharpe-0.3.0.tar.gz.

File metadata

  • Download URL: jsharpe-0.3.0.tar.gz
  • Upload date:
  • Size: 134.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for jsharpe-0.3.0.tar.gz
Algorithm Hash digest
SHA256 08650b3dc441d67ff57df984860a448ba3b5117de5d83755d978f4eb43bde74c
MD5 61f1bf9f8c41ca32ebce76502a97a36d
BLAKE2b-256 712212da03058abd7707432268da005408bfbb3d4eddc0ece610bcac73ff15f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for jsharpe-0.3.0.tar.gz:

Publisher: release.yml on tschm/jsharpe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jsharpe-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: jsharpe-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 14.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for jsharpe-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6a4a1ebb202ff9dd86d04bca73630422c964cdf3b1e1427b043df0645719fe22
MD5 8883fc5c4940763e888411df52902ea8
BLAKE2b-256 bc31dfc2ab0a1d19a06a91b205e3cebd653bd8130507bbcd6e5ca737979f4181

See more details on using hashes here.

Provenance

The following attestation bundles were made for jsharpe-0.3.0-py3-none-any.whl:

Publisher: release.yml on tschm/jsharpe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page