Trading_engine.StrategyPure strategy callback contract.
type marked_position = private {instrument_id : Id.Instrument.t;quantity : Scalar.Quantity.t;settled_quantity : Scalar.Quantity.t;unsettled_quantity : Scalar.Quantity.t;mark : Scalar.Price.t;base_market_value : Scalar.Money.t;weight : Scalar.Weight.t option;}type portfolio = private {base_currency : string;cash : Scalar.Money.t;net_market_value : Scalar.Money.t;long_market_value : Scalar.Money.t;short_market_value : Scalar.Money.t;gross_exposure : Scalar.Money.t;equity : Scalar.Money.t;cash_weight : Scalar.Weight.t option;cash_balances : Account.cash_attribution list;positions : marked_position list;group_exposures : Risk.group_exposure list;}type event = | Market_slice_closed of Market_slice.t| Fill_received of Fill.t| Order_updated of Order.t| Intent_rejected of stringtype intent = | Target_weights of weight_target list| Target_quantities of quantity_target list| Submit_order of Order.request| Cancel_order of Id.Order.t| Emit_metric of Metric.tval context :
now:Ptime.t ->
valuation:Account.valuation ->
group_exposures:Risk.group_exposure list ->
working_orders:Order.t list ->
latest_bars:Bar.t list ->
(context, string) Stdlib.resultval now : context -> Ptime.tval cash : context -> Scalar.Money.tval cash_balances : context -> (string * Scalar.Money.t) listval position : context -> Id.Instrument.t -> Scalar.Quantity.tval latest_bar : context -> Id.Instrument.t -> Bar.t optionval group_exposures : context -> Risk.group_exposure listmodule type S = sig ... end