StrataModel¶
StrataModel¶
High-level trainable model wrapping the full STRATA pipeline. No PyTorch required.
StrataModel.from_pretrained(ticker)¶
from strata import StrataModel
model = StrataModel.from_pretrained("AAPL") # AAPL | TSLA | SPY | NVDA | QQQ
print(model.summary())
StrataModel.load(path)¶
model.predict(candles) → dict¶
result = model.predict(candles_window)
# {
# "action": "LONG", # LONG | SHORT | HOLD
# "confidence": 0.71,
# "regime": "TRENDING", # TRENDING | RANGING | TRANSITIONING | CHOPPY
# "risk": "LOW", # LOW | MEDIUM | HIGH
# "approved": True, # False = GUARD blocked
# "guard_reason": "", # e.g. "TRAP_RISK_HIGH (0.67 > 0.60 [RANGING])"
# "state": {...}, # full internal state snapshot
# }
model.save(path)¶
model.reset()¶
Reset session state (call at start of new trading session).
model.record_outcome(was_loss)¶
Feed trade outcome to the circuit breaker (LOOP layer).