Specification
The architecture behind autonomous trading.
Architecture
A hybrid edge-cloud design. Critical control runs locally. Intelligence lives where it makes sense.
Local
Edge Daemon
Rust binary on Raspberry Pi. All real-time control with zero cloud dependency.
- → Device adaptors (Modbus, CAN, REST)
- → Safety gate and constraint clamping
- → Hash-chained audit log
- → Optimizer runtime
Cloud · Optional
Master Service
Factor ingestion, synthesis engine, forecasting. Fully self-hostable.
- → Multi-factor synthesis (MFF)
- → 48-hour price forecasts
- → Fleet aggregation (VPP)
- → Web dashboard
Control Loop
100ms cycle time. Sensor read, safety check, forecast, optimize, verify, dispatch, log.
loop {
let snapshot = device.read_sensors()?;
let state = safety.validate(&snapshot)?;
let forecast = forecaster.predict(&state, 48h)?;
let plan = optimizer.solve(&state, &forecast)?;
let setpoint = safety_gate.verify(&plan.next)?;
device.dispatch(&setpoint)?;
audit.append(&state, &setpoint);
sleep(Duration::from_millis(100));
}Optimization
Stochastic dynamic programming with battery degradation awareness.
| Algorithm | Dynamic Programming |
| State bins | 501 SOC levels |
| Horizon | 48 hours rolling |
| Scenarios | P10/P50/P90 |
Degradation Model
- SOC: 5x stress at boundaries
- C-rate: 1 + 2*(P/Pmax)^3
- Thermal: Arrhenius (10x at 50C)
- Cycle: Rainflow counting
Multi-Factor Synthesis
Eleven expert models. Bayesian model averaging with heavy-tailed uncertainty.
Bayesian Model Averaging with Student-t kernel (v=3)
Data Flow
From raw market data to verified setpoint. Every step audited.
Read the Code
Every algorithm described here is implemented and documented.
MIT licensed. No secrets. No proprietary magic.