Skip to main content

Statistical validation for synthetic financial time series

Project description

financial-data-validation

PyPI Python Tests License: MIT

Statistical validation for synthetic financial time series.

Installation

pip install finanial-data-validation

Quick Start

from financial_data_validation import validate_paths
import numpy as np

# Your synthetic price paths (n_paths, n_timesteps)
paths = np.random.lognormal(0, 0.02, size=(1000, 252))

# Validate
report = validate_paths(paths)

print(f"Quality Score: {report.quality_score:.1f}/100")
print(f"Passed: {'✓' if report.passed else '✗'}")

What It Tests

Test Validates Pass Criteria
Ljung-Box No spurious autocorrelation in returns p > 0.05
ARCH Volatility clustering present p < 0.05
Jarque-Bera Returns approximately normal p > 0.01
Kolmogorov-Smirnov Distribution shape matches expectation D < 0.05

Quality Scores

  • 90-100: Excellent — indistinguishable from real markets
  • 80-89: Good — suitable for most applications
  • 70-79: Acceptable — passes minimum requirements
  • < 70: Poor — may produce unreliable results

Why This Exists

Synthetic market data is only useful if it's statistically realistic. This package validates whether generated price paths exhibit the properties of real financial markets: volatility clustering, fat tails, and proper correlation structure.

Built by QPaths — we use this to validate every dataset we generate.

Example Output

ValidationReport(
    ljung_box_score=0.87,
    arch_score=0.92,
    jarque_bera_score=0.81,
    ks_score=0.85,
    quality_score=86.4,
    passed=True
)

Use Cases

  • Validate synthetic data before backtesting trading strategies
  • Quality-check Monte Carlo simulations
  • Verify stochastic model implementations
  • Test financial data generation pipelines

Documentation

Full documentation: github.com/qpaths/financial-data-validation

License

MIT


Part of the QPaths ecosystem — Generate validated synthetic market data at qpaths.io

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

financial_data_validation-0.1.1.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

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

financial_data_validation-0.1.1-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file financial_data_validation-0.1.1.tar.gz.

File metadata

  • Download URL: financial_data_validation-0.1.1.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for financial_data_validation-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5cbc06f39b382bb7415d19d5d6c78b7cb2402c9262196141bc664a7008d3c672
MD5 542ca81f5279d981ae5f0c78e96faeab
BLAKE2b-256 9c866307d7b216dbd4edf595ab46fdd83cafa09861e46fd3f31ddfe3550d69d1

See more details on using hashes here.

File details

Details for the file financial_data_validation-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: financial_data_validation-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for financial_data_validation-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2ed0c48ad1a60ab3897e4cf29702f1b05394f356d94d3d672f13a204b21e1f42
MD5 c4111785adc2d6dd304caf6ebdb067cc
BLAKE2b-256 f47052c49be62c8ec72d6ed4f7a558a07d26eb36fad7c0f30a04bd04d56c7706

See more details on using hashes here.

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