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.
翻訳待ち
Typed Python SDK for NexusTrade portfolio authoring, backtesting, and optimization
翻訳待ち
Loading the full README. The saved excerpt is shown below.
Author trading strategies in typed Python. Backtest them on the engine that runs them live.
The base install is stdlib-only — no third-party dependencies, importable anywhere.
The public distribution is also the package installed in NexusTrade compute
sandboxes. Agent-facing helpers such as nexustrade.host,
nexustrade.scanned_table, nexustrade.signal, nexustrade.report, and
nexustrade.tigris therefore have one canonical implementation. Host-backed
operations still require the short-lived environment supplied by a compute run.Read the full README ↗Author trading strategies in typed Python. Backtest them on the engine that runs them live.
Quickstart · Authoring · Polling · Agents · Screener · Auth · Errors
pip install nexustrade
The base install is stdlib-only — no third-party dependencies, importable anywhere.
pip install 'nexustrade[stats]' # spec curves, Newey-West, bootstrap
pip install 'nexustrade[documents]' # PDF inspection, OCR, structured extraction
pip install 'nexustrade[compute]' # exact union used by NexusTrade compute
Compute helpers such as nexustrade.host, nexustrade.scanned_table,
nexustrade.signal, and nexustrade.report ship in this package. Host-backed
operations require the short-lived environment supplied by a NexusTrade compute
run.
Use nt.prepare_web_pages(pages, max_chars_per_document=1_000_000) for
deterministic HTML inspection without a model call. pages maps source IDs to
HTML strings/bytes, {"html": ..., "url": ...} objects, or successful
host.fetch result rows. Each result has document and error; successful
documents contain complete visible_text plus separate title, description and
publication hints. The helper removes hidden content and page chrome and decodes
HTML entities using the same parser as extract_web_pages and host evidence
verification. Select contiguous report quotes from document["visible_text"];
do not concatenate metadata or separate passages. Over-budget text returns an
explicit error, so a partial source is never presented as complete.
For source tables, nt.read_source_tables(original_html, source_id=...) preserves
cells, spans, equal adjacent values and inline fact attributes. Inspect its grid;
nt.select_source_table_cell(document, table=..., row=..., column=..., row_headers=[{row, column, text}], column_headers=[{row, column, text}], role=..., rationale=..., fact_attributes=...) asserts the exact source context.
It raises on a failed selector rather than silently omitting a historical period.
It does not choose accounting roles or establish absence. Prefer structured SEC
role candidates/resolved facts when available; preserve selected records intact.
Both web helpers also accept successful fetch receipts typed text/markdown,
including rendered fallback responses. These preserve the returned Markdown
verbatim in visible_text and retain content_type; publisher metadata remains
unset. Rendered text is evidence from that fetch response, not original HTML.
extract_web_pages supplies the complete prepared visible body, including notes
outside main/article, within explicit character limits (default 200,000 per
document and request). It never splices a page's beginning and end. Oversized
sources return an error before a model call: inspect the retained source with
prepare_web_pages, then explicitly raise affordable limits or select exact
contiguous passages for narrower extraction. Successful results include
host-owned coverage alongside document/error. This describes supplied text,
not proof that the model correctly extracted every fact. Scripts, hidden text and
page chrome are excluded by the visible-text projection; original fetched bytes
remain the authority for inspecting those elements. A size error or a partial
passage cannot support a claim that a disclosure is absent from the whole source.
For document-derived computation, keep extraction and interpretation separate.
extract_rows/extract_pdfs preserve source observations. A corpus can recover
document-level facts and logical rows in one schema-bound pass:
extracted = nt.extract_pdfs(
documents, # PDF bytes or successful host.fetch result objects
document_schema={"report_date": "string", "filing_type": "string"},
rows_schema={"asset": "string", "transaction_date": "string"},
instructions="Return the rows requested by the task, preserving repeated rows.",
)
for source_id, result in extracted.items():
document = result["document"] # includes source_id
rows = result["rows"] # each includes source_id + _source_row_index
This is the beginning of the README. Read the rest at the original. Read the full README ↗