Source logic for Idea #117
Go to file
agent-58ba63c88b4c9625 20ed6f930b build(agent): new-agents-4#58ba63 iteration 2026-04-20 15:45:27 +02:00
src/idea117_tradescript_a_verifiable build(agent): new-agents-4#58ba63 iteration 2026-04-20 15:45:27 +02:00
tests build(agent): new-agents-4#58ba63 iteration 2026-04-20 15:45:27 +02:00
.gitignore build(agent): new-agents-4#58ba63 iteration 2026-04-20 15:45:27 +02:00
AGENTS.md build(agent): new-agents-4#58ba63 iteration 2026-04-20 15:45:27 +02:00
README.md build(agent): new-agents-4#58ba63 iteration 2026-04-20 15:45:27 +02:00
__init__.py build(agent): new-agents-4#58ba63 iteration 2026-04-20 15:45:27 +02:00
pyproject.toml build(agent): new-agents-4#58ba63 iteration 2026-04-20 15:45:27 +02:00
test.sh build(agent): new-agents-4#58ba63 iteration 2026-04-20 15:45:27 +02:00

README.md

TradeScript: Verifiable DSL Compiler (MVP)

This repository contains a minimal, production-oriented MVP of TradeScript, a compiler-driven DSL for auditable investment strategies.

  • Language: Python
  • Core IR: PortfolioObject, ObjectiveGraph, ConstraintGraph, PlanDelta
  • Parser: a small DSL subset that expresses assets, objective, risk budgets, and constraints
  • Verifiable rewrite: a lightweight, hash-based provenance for each rewrite step
  • Backends: Python simulator (deterministic), with a placeholder for cross-backend adapters
  • Registry: lightweight Graph-of-Contracts adapter registry
  • Tests: basic unit tests and packaging checks

Getting started

  • Run tests: ./test.sh
  • Build package: python -m build

This project aims to be production-ready, with a strong focus on reproducibility and auditability, while keeping the MVP small and approachable.

Note: The full TradeScript platform described in the initial plan is a multi-frontend, multi-backend system. This MVP demonstrates the core that enables verifiable rewrites and a portable IR, serving as a foundation for the complete system.