Skip to main content

Modified Jones-Faddy Skew t-Distributions for Financial Modeling

Project description

mjf-finance

Python NumPy Pytest PyPI License Version Maintained zread

Broken Symmetry of Stock Returns - Modified Jones-Faddy Skew t-Distributions

mjf-finance is a Python library that implements the Modified Jones-Faddy (mJF) Skew t-Distribution, a statistical model designed to capture the "broken symmetry" of stock market returns. Unlike traditional models that assume symmetry, mJF accounts for the fact that market crashes are more frequent and violent than rallies (negative skew) and that the market generally trends upwards over time.

Features

  • mJF1 Distribution: Implements Eq. 20 from the paper, allowing for asymmetric power-law tails for gains and losses.
  • Gain/Loss Decoupling: Analyze the "volatility of gains" and "volatility of losses" separately.
  • Physics-Inspired: Parameters are derived from multiplicative stochastic volatility models, offering interpretability.
  • Risk Metrics: Designed for better estimation of Value at Risk (VaR) and tail risk (Black Swans).

Installation

You can install the package using pip:

pip install mjf-finance

Or install from source:

git clone https://github.com/username/mjf-finance.git
cd mjf-finance
pip install .

Usage

Analyzing Returns

import numpy as np
from mjf_finance.distributions import pdf_mjf1

# Example parameters based on S&P 500 (illustrative)
mu = 0.0005        # Location parameter (drift)
alpha_g = 3.5      # Shape parameter for gains
alpha_l = 2.8      # Shape parameter for losses (heavier tail)
theta = 0.00015    # Mean variance
tau = 1.0          # Time increment (e.g., 1 day)

# Evaluate PDF at specific return
ret = -0.05 # 5% loss
density = pdf_mjf1(ret, mu, alpha_g, alpha_l, theta, tau)
print(f"Probability density at -5%: {density}")

Calculating Statistics

from mjf_finance.statistics import statistical_mean, statistical_variance

mean_val = statistical_mean(mu, alpha_g, alpha_l, theta, tau)
variance_val = statistical_variance(alpha_g, alpha_l, theta, tau)

print(f"Expected Return: {mean_val}")
print(f"Variance: {variance_val}")

References

This project incorporates research from the following paper:

  • Broken Symmetry of Stock Returns -- a Modified Jones-Faddy Skew t-Distribution Siqi Shao, Arshia Ghasemi, Hamed Farahani, R. A. Serota arXiv:2512.23640

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

mjf_finance-0.1.0.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

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

mjf_finance-0.1.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file mjf_finance-0.1.0.tar.gz.

File metadata

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

File hashes

Hashes for mjf_finance-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5afee98c4f9228650b37177ad64eda30fac606389fb2f10f3b1def95ec4c57de
MD5 f860a3bfa2b8f61b5ed7185d75ba2e7a
BLAKE2b-256 f26f37ca01819263df7e5e54616401cfc14d88580ae0447e12ce645549d345de

See more details on using hashes here.

Provenance

The following attestation bundles were made for mjf_finance-0.1.0.tar.gz:

Publisher: publish.yml on kuslavicek/mjf-finance

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

File details

Details for the file mjf_finance-0.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for mjf_finance-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 65946cfd95d8cb256be353706553febf648aa3e6a56ddb91f5f8140e5ab5da73
MD5 6b0422a94b4e50c35f2fdece7d400f6d
BLAKE2b-256 7eb0cbfd69ba526f7dc8541b9ea3a9232749d73c9a984c69bcc980769cf7843f

See more details on using hashes here.

Provenance

The following attestation bundles were made for mjf_finance-0.1.0-py3-none-any.whl:

Publisher: publish.yml on kuslavicek/mjf-finance

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