Skip to content

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 = StrataModel.load("msft_model.json")

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.save("msft_model.json")   # portable JSON — share with anyone

model.reset()

Reset session state (call at start of new trading session).

model.reset()

model.record_outcome(was_loss)

Feed trade outcome to the circuit breaker (LOOP layer).

model.record_outcome(was_loss=True)   # was this trade a loss?

model.summary() → str

print(model.summary())
# StrataModel v2.6.0
#   asset   : AAPL
#   trained : True