OTP application callback module.
Boots the supervision tree that backs the risk engine:
Phoenix.PubSub(RiskEngine.PubSub) — the broadcast bus used byRiskEngine.RiskBroadcasterandRiskEngine.TradeIngestionto publish trades, risk snapshots, and alerts.Registry(RiskEngine.PortfolioRegistry) — maps a portfolio id to its runningRiskEngine.Portfolioprocess, so callers only ever need to know a portfolio's id, never its pid.RiskEngine.PortfolioSupervisor— aDynamicSupervisorthat starts aRiskEngine.Portfolioprocess on demand for each portfolio id seen.RiskEngine.Simulator— generates a steady stream of random trades so the system has data to react to without an external feed.
All children are supervised with a :one_for_one strategy: a crash in one
is isolated from the others.