Open Net Worth
Open Net Worth is an open-source personal AI wealth assistant you run yourself: one ledger for your whole financial life, worked by an AI agent you control.
翻訳待ち
Loading the full README. The saved excerpt is shown below.
A Polars-native toolkit for reading, validating, and aggregating OHLC
(Open, High, Low, Close) market data.
Each stage is a separate, composable step: fetch a published dataset,
read and validate it, aggregate windows over it, add returns, apply a
quality policy. Nothing sorts, fills, interpolates, or de-duplicates your
data on the way past. When the data is not what you expected, you get a
value describing that — or an exception — rather than a tidied frame and
a log line.Read the full README ↗A Polars-native toolkit for reading, validating, and aggregating OHLC (Open, High, Low, Close) market data.
Each stage is a separate, composable step: fetch a published dataset, read and validate it, aggregate windows over it, add returns, apply a quality policy. Nothing sorts, fills, interpolates, or de-duplicates your data on the way past. When the data is not what you expected, you get a value describing that — or an exception — rather than a tidied frame and a log line.
pip install ohlc-toolkit
Python 3.11 or newer. Seven declared runtime dependencies: polars,
requests, loguru and orjson, which this package imports, plus
urllib3, idna and certifi, which it does not. Those three are
declared because requests carries them into every install and its own
ranges admit versions with published advisories against them; a floor
here is the only place a consumer's resolve can be closed.
1.0 is a rewrite, not an upgrade. Every name 0.4 exported is gone:
| 0.4 | 1.0 |
|---|---|
read_ohlc_csv | source.read_source_csv |
transform_ohlc | windows.compute_windows |
DatasetDownloader | snapshot.fetch_snapshot |
parse_timeframe, format_timeframe | temporal.Duration |
validate_timeframe, validate_timeframe_format | temporal.validate_window_duration, temporal.validate_cadence |
calculate_percentage_return | returns.add_forward_returns |
There are no aliases, no deprecation warnings, and no migration path. The replacements are not renames — they take different arguments, return different types, and mean different things. A shim would have had to guess which of those differences you wanted, and guessing about a price series is how a wrong number reaches a model.
pandas is no longer a dependency of any kind.
0.4.x stays on PyPI and keeps working. If you depend on it, pin it:
pip install "ohlc-toolkit<1"
Against the real published BTC/USD minute history (ff137/bitstamp-btcusd-minute-data). The release is about 260 MB across three assets; it is fetched once and re-used on later runs. The toolkit logs each fetch and verification step as it runs; those log lines are omitted from the pasted output below.
from ohlc_toolkit.returns import (
ReturnMethod,
add_backward_returns,
add_forward_returns,
)
from ohlc_toolkit.snapshot import (
BITSTAMP_BTCUSD_1M_REPOSITORY,
SnapshotRelease,
fetch_snapshot,
read_snapshot_frame,
verify_snapshot_continuity,
)
from ohlc_toolkit.source import BITSTAMP_BTCUSD_1M
from ohlc_toolkit.windows import compute_windows
# Fetch the published minute history. Nothing lands until its SHA-256 and
# size match what the release's own manifest declared.
release = SnapshotRelease(
repository=BITSTAMP_BTCUSD_1M_REPOSITORY,
tag="bitstamp-btcusd-1m-2026-08",
)
result = fetch_snapshot(release, "data/bitstamp")
print("snapshot identity:", result.manifest_sha256)
# Read it under strict validation, then check the frame against what the
# manifest said it would be.
frame = read_snapshot_frame(result)
report = verify_snapshot_continuity(frame, result.manifest)
print("rows:", report.rows_checked, "| seam mismatches:", report.seam_mismatches)
# One-hour windows, emitted every fifteen minutes.
hourly = compute_windows(
frame,
BITSTAMP_BTCUSD_1M,
window="1h",
emit_every="15m",
materialization="skip_warmup",
)
print(hourly.tail(3))
# The causal four-hour log return, and the non-causal one beside the
# instant it becomes readable.
labelled = add_forward_returns(
add_backward_returns(
hourly, horizon="4h", cadence="15m", method=ReturnMethod.LOG
),
horizon="4h",
cadence="15m",
method=ReturnMethod.LOG,
)
print(
labelled.select(
"close_time",
"backward_return_log_4h",
"forward_return_log_4h",
"forward_return_log_4h_available_at",
).tail(3)
)
This is the beginning of the README. Read the rest at the original. Read the full README ↗