Probabilistic Sharpe ratio and related statistics.
Project description
📦 jsharpe
🚀 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:
- Development Tools: .editorconfig, .pre-commit-config.yaml, Makefile, ruff.toml, pytest.ini
- GitHub Workflows: CI/CD pipelines in .github/workflows
- Documentation: CODE_OF_CONDUCT.md, CONTRIBUTING.md, LICENSE
- Configuration: .gitignore and other project setup files
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08650b3dc441d67ff57df984860a448ba3b5117de5d83755d978f4eb43bde74c
|
|
| MD5 |
61f1bf9f8c41ca32ebce76502a97a36d
|
|
| BLAKE2b-256 |
712212da03058abd7707432268da005408bfbb3d4eddc0ece610bcac73ff15f4
|
Provenance
The following attestation bundles were made for jsharpe-0.3.0.tar.gz:
Publisher:
release.yml on tschm/jsharpe
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jsharpe-0.3.0.tar.gz -
Subject digest:
08650b3dc441d67ff57df984860a448ba3b5117de5d83755d978f4eb43bde74c - Sigstore transparency entry: 764405500
- Sigstore integration time:
-
Permalink:
tschm/jsharpe@5316efc7f3b5688b0730ee6a32cc1a7cf4093232 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/tschm
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5316efc7f3b5688b0730ee6a32cc1a7cf4093232 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a4a1ebb202ff9dd86d04bca73630422c964cdf3b1e1427b043df0645719fe22
|
|
| MD5 |
8883fc5c4940763e888411df52902ea8
|
|
| BLAKE2b-256 |
bc31dfc2ab0a1d19a06a91b205e3cebd653bd8130507bbcd6e5ca737979f4181
|
Provenance
The following attestation bundles were made for jsharpe-0.3.0-py3-none-any.whl:
Publisher:
release.yml on tschm/jsharpe
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jsharpe-0.3.0-py3-none-any.whl -
Subject digest:
6a4a1ebb202ff9dd86d04bca73630422c964cdf3b1e1427b043df0645719fe22 - Sigstore transparency entry: 764405502
- Sigstore integration time:
-
Permalink:
tschm/jsharpe@5316efc7f3b5688b0730ee6a32cc1a7cf4093232 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/tschm
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5316efc7f3b5688b0730ee6a32cc1a7cf4093232 -
Trigger Event:
push
-
Statement type: