japan-finance-factors
Quantitative factor calculation for Japanese equities with point-in-time (PIT) safety.
Features
- 10 quantitative factors across 4 categories (value, momentum, quality, risk)
- PIT-safe: All calculations respect point-in-time constraints to prevent lookahead bias
- Lightweight: Only depends on pydantic; data source integrations are optional
- Optional integrations: Convenience wrappers for edinet-mcp and stockprice-mcp
Installation
pip install japan-finance-factors
# With optional data source integrations
pip install japan-finance-factors[all]
Quick Start
from datetime import datetime
from japan_finance_factors import compute_factors, FinancialData, PriceData
# Prepare financial data (JPY units)
fd = FinancialData(
ticker="7203",
revenue=45_000_000_000_000,
net_income=2_800_000_000_000,
operating_income=3_500_000_000_000,
total_assets=90_000_000_000_000,
total_equity=35_000_000_000_000,
operating_cf=4_500_000_000_000,
capex=-1_800_000_000_000,
market_cap=50_000_000_000_000,
published_at=datetime(2025, 6, 25),
)
# Compute all factors
result = compute_factors(
financial_data=fd,
as_of=datetime(2025, 7, 1),
)
print(result.to_dict())
# {'ev_ebitda': 12.77, 'fcf_yield': 0.054, 'earnings_yield': 0.056, ...}
Factors
| Category | Factor | Description |
|---|---|---|
| Value | ev_ebitda |
Enterprise Value / EBITDA |
| Value | fcf_yield |
Free Cash Flow / Market Cap |
| Value | earnings_yield |
Net Income / Market Cap |
| Value | book_to_market |
Book Value / Market Cap |
| Momentum | mom_3m |
3-month price return |
| Momentum | mom_12m |
12-month price return (12-1 convention) |
| Quality | piotroski_f_score |
Piotroski F-Score (0-9) |
| Quality | accruals_ratio |
(Net Income - Operating CF) / Total Assets |
| Risk | realized_vol_60d |
60-day annualized volatility |
| Risk | max_drawdown_252d |
Maximum drawdown over 252 trading days |
License
Apache-2.0
Metadata
Release files for japan-finance-factors 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| japan_finance_factors-0.2.1.tar.gz | 151.8 kB | Without provenance | Details for japan_finance_factors-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| japan_finance_factors-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for japan_finance_factors-0.2.1-py3-none-any.whl |
Total release size: 167.4 kB
Release files / japan_finance_factors-0.2.1.tar.gz
| Download URL | japan_finance_factors-0.2.1.tar.gz |
|---|---|
| Size | 151.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b16b9dd7dd2382d3ece25cf0b440cf8bcf4ea2d465c6a987f6e0c54a956f0720
|
|
BLAKE2b-256 checksum How to use checksums |
6c87edc101ea992f2b2937ea684db97d122582b746263b008112ad6f3bfc9251
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / japan_finance_factors-0.2.1-py3-none-any.whl
| Download URL | japan_finance_factors-0.2.1-py3-none-any.whl |
|---|---|
| Size | 15.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e8d468ff6d1bf4c4fa44a9d8020b4a5d3729ddbc9839027334d94207f14ba5ad
|
|
BLAKE2b-256 checksum How to use checksums |
999eca358786d49f7bf899e3251cb1cc8610c9d9a76469f470f88896632e2d1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for japan-finance-factors 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.