build(agent): new-agents-4#58ba63 iteration
This commit is contained in:
parent
68c5a8454d
commit
bd54a28a2f
26
README.md
26
README.md
|
|
@ -1,20 +1,12 @@
|
|||
# DeltaForge Skeleton MVP
|
||||
# DeltaForge Skeleton
|
||||
|
||||
A minimal, self-contained Python package that demonstrates the core primitives
|
||||
and a deterministic flow for cross-venue hedging concepts. This skeleton is
|
||||
designed to be extended with real adapters and a full ADMM-like coordination layer
|
||||
while providing a concrete starting point for testing, packaging, and integration.
|
||||
A production-friendly Python package skeleton for DeltaForge MVP, enabling a canonical DSL surface,
|
||||
two-venue adapters, a lightweight ADMM-like coordinator, and deterministic replay-backed backtests.
|
||||
|
||||
What this adds
|
||||
- Core DSL primitives: Asset, MarketSignal, StrategyDelta, PlanDelta (in deltaforge_skeleton.core)
|
||||
- Two starter adapters (equity_feed and options_feed) that generate MarketSignal instances
|
||||
- Simple Curator that synthesizes a PlanDelta from signals
|
||||
- Lightweight ExecutionEngine to route plan steps across venues
|
||||
- Toy Backtester to deterministically replay a plan
|
||||
- Packaging metadata via pyproject.toml and a README for distribution
|
||||
- Core DSL: Asset, MarketSignal, StrategyDelta, PlanDelta
|
||||
- Adapters: EquityFeed, OptionsFeed (two starter adapters)
|
||||
- Curator: simple cross-venue planning
|
||||
- ExecutionEngine and Backtester: deterministic routing and replay
|
||||
- GoC registry scaffolding for future interoperability
|
||||
|
||||
Usage notes
|
||||
- Import deltaforge_skeleton and instantiate the flow using the included components
|
||||
- Run the test harness in test.sh to verify the wiring and deterministic behavior
|
||||
|
||||
This is a skeleton intended for extension; it is not a production-ready trading engine.
|
||||
This repository is designed to be extended toward a production MVP with robust contracts and governance.
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ from .core import Asset, MarketSignal, StrategyDelta, PlanDelta
|
|||
from .adapters.equity_feed import EquityFeedAdapter
|
||||
from .adapters.options_feed import OptionsFeedAdapter
|
||||
from .curator import Curator
|
||||
from .goc_registry import GoCRegistry
|
||||
from .execution import ExecutionEngine
|
||||
from .backtester import Backtester
|
||||
|
||||
|
|
@ -22,4 +23,5 @@ __all__ = [
|
|||
"Curator",
|
||||
"ExecutionEngine",
|
||||
"Backtester",
|
||||
"GoCRegistry",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@ class PlanDelta:
|
|||
steps: List[str] = field(default_factory=list)
|
||||
timestamp: float = 0.0
|
||||
provenance: Optional[str] = None
|
||||
# Optional contract/version metadata for GoC interoperability
|
||||
contract_version: Optional[str] = None
|
||||
|
||||
|
||||
# Lightweight placeholders for governance primitives
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Dict, Optional
|
||||
|
||||
|
||||
@dataclass
|
||||
class GoCContract:
|
||||
name: str
|
||||
version: str
|
||||
schema: dict = field(default_factory=dict)
|
||||
|
||||
|
||||
@dataclass
|
||||
class GoCRegistry:
|
||||
"""Lightweight Graph-of-Contracts registry for GoC interoperability.
|
||||
|
||||
This is intentionally minimal: it stores versioned contract schemas for adapters
|
||||
and primitives. Producers can register contracts, and consumers can fetch them
|
||||
by (name, version).
|
||||
"""
|
||||
|
||||
contracts: Dict[str, GoCContract] = field(default_factory=dict)
|
||||
|
||||
def register(self, name: str, version: str, schema: Optional[dict] = None) -> str:
|
||||
key = f"{name}:{version}"
|
||||
self.contracts[key] = GoCContract(name=name, version=version, schema=(schema or {}))
|
||||
return key
|
||||
|
||||
def get_contract(self, name: str, version: str) -> Optional[GoCContract]:
|
||||
key = f"{name}:{version}"
|
||||
return self.contracts.get(key)
|
||||
|
|
@ -1,19 +1,16 @@
|
|||
[build-system]
|
||||
requires = ["setuptools>=61.0"]
|
||||
requires = ["setuptools>=61", "wheel"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "deltaforge-skeleton"
|
||||
version = "0.0.1"
|
||||
description = "DeltaForge MVP skeleton: core DSL, adapters, curator, execution, and backtester"
|
||||
authors = [{name = "OpenCode"}]
|
||||
requires-python = ">=3.8"
|
||||
version = "0.1.0"
|
||||
description = "DeltaForge MVP skeleton: cross-venue synthesis engine with two assets and two venues."
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.8"
|
||||
license = {text = "MIT"}
|
||||
authors = [ { name = "OpenCode DeltaForge", email = "dev@example.com" } ]
|
||||
dependencies = []
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
where = ["."]
|
||||
# Include all deltaforge_skeleton packages that live at the project root or subpackages.
|
||||
include = ["deltaforge_skeleton*"]
|
||||
|
||||
# Optionally enable data files to be included in the package build
|
||||
# Note: Avoid top-level [tool.setuptools] configuration that sets include_package_data here.
|
||||
where = ["deltaforge_skeleton"]
|
||||
|
|
|
|||
Loading…
Reference in New Issue