pub struct CompositeMarketMakerConfig {
pub base: StrategyConfig,
pub instrument_id: InstrumentId,
pub signal_instrument_id: InstrumentId,
pub trade_size: Option<Quantity>,
pub half_spread_bps: u32,
pub inventory_skew_factor: f64,
pub signal_skew_factor: f64,
pub signal_baseline: Option<f64>,
pub max_position: Quantity,
pub requote_threshold_bps: u32,
pub expire_time_secs: Option<u64>,
pub on_cancel_resubmit: bool,
}Expand description
Configuration for the composite market making strategy.
Fields§
§base: StrategyConfigBase strategy configuration.
instrument_id: InstrumentIdTarget instrument the strategy quotes on.
signal_instrument_id: InstrumentIdSignal instrument that drives the signal skew. Typically a
SyntheticInstrument, but any instrument that publishes quotes works.
trade_size: Option<Quantity>Trade size per quote. When None, resolved from the instrument’s
min_quantity during on_start.
half_spread_bps: u32Half of the desired quoted spread, in basis points of the anchor.
E.g. 5 = 5 bps, so the full quoted spread is 10 bps before skew.
inventory_skew_factor: f64Inventory skew gain in price units per unit of net position. Both sides
shift down by factor * net_position so a long position widens the bid
and tightens the ask.
signal_skew_factor: f64Signal skew gain in price units per unit of normalized signal residual.
Both sides shift up by factor * residual where
residual = (signal_mid - baseline) / baseline.
signal_baseline: Option<f64>Optional baseline price for the signal residual. When None, the first
observed signal mid is captured as the baseline. When Some(_), the
configured value is used so backtests are deterministic.
max_position: QuantityHard cap on net exposure (long or short).
requote_threshold_bps: u32Minimum movement in basis points of the anchor before re-quoting.
Applied to both anchor movement and the signal residual’s price impact
(signal_skew_factor * residual); whichever clears the threshold first
triggers a requote.
expire_time_secs: Option<u64>Optional order expiry in seconds. When set, orders use GTD time-in-force
with expire_time = now + expire_time_secs.
on_cancel_resubmit: boolWhen true, resubmit on the next quote tick after an external cancel.
Useful for venues that proactively cancel short-term orders.
Implementations§
Source§impl CompositeMarketMakerConfig
impl CompositeMarketMakerConfig
Sourcepub fn builder() -> CompositeMarketMakerConfigBuilder
pub fn builder() -> CompositeMarketMakerConfigBuilder
Create an instance of CompositeMarketMakerConfig using the builder syntax
Trait Implementations§
Source§impl Clone for CompositeMarketMakerConfig
impl Clone for CompositeMarketMakerConfig
Source§fn clone(&self) -> CompositeMarketMakerConfig
fn clone(&self) -> CompositeMarketMakerConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CompositeMarketMakerConfig
impl Debug for CompositeMarketMakerConfig
impl DerefToPyAny for CompositeMarketMakerConfig
Source§impl<'a, 'py> FromPyObject<'a, 'py> for CompositeMarketMakerConfigwhere
Self: Clone,
impl<'a, 'py> FromPyObject<'a, 'py> for CompositeMarketMakerConfigwhere
Self: Clone,
Source§impl<'py> IntoPyObject<'py> for CompositeMarketMakerConfig
impl<'py> IntoPyObject<'py> for CompositeMarketMakerConfig
Source§type Target = CompositeMarketMakerConfig
type Target = CompositeMarketMakerConfig
Source§type Output = Bound<'py, <CompositeMarketMakerConfig as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <CompositeMarketMakerConfig as IntoPyObject<'py>>::Target>
Source§fn into_pyobject(
self,
py: Python<'py>,
) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
fn into_pyobject( self, py: Python<'py>, ) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
Source§impl PyClass for CompositeMarketMakerConfig
impl PyClass for CompositeMarketMakerConfig
Source§impl PyClassImpl for CompositeMarketMakerConfig
impl PyClassImpl for CompositeMarketMakerConfig
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
Source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
Source§const IS_IMMUTABLE_TYPE: bool = false
const IS_IMMUTABLE_TYPE: bool = false
Source§const RAW_DOC: &'static CStr = /// Configuration for the composite market making strategy.
const RAW_DOC: &'static CStr = /// Configuration for the composite market making strategy.
Source§const DOC: &'static CStr
const DOC: &'static CStr
text_signature if a constructor is defined. Read moreSource§type Layout = <<CompositeMarketMakerConfig as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<CompositeMarketMakerConfig>
type Layout = <<CompositeMarketMakerConfig as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<CompositeMarketMakerConfig>
Source§type ThreadChecker = NoopThreadChecker
type ThreadChecker = NoopThreadChecker
type Inventory = Pyo3MethodsInventoryForCompositeMarketMakerConfig
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Source§type BaseNativeType = PyAny
type BaseNativeType = PyAny
PyAny by default, and when you declare
#[pyclass(extends=PyDict)], it’s PyDict.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
§fn dict_offset() -> Option<PyObjectOffset>
fn dict_offset() -> Option<PyObjectOffset>
§fn weaklist_offset() -> Option<PyObjectOffset>
fn weaklist_offset() -> Option<PyObjectOffset>
Source§impl PyClassNewTextSignature for CompositeMarketMakerConfig
impl PyClassNewTextSignature for CompositeMarketMakerConfig
const TEXT_SIGNATURE: &'static str = "(instrument_id, signal_instrument_id, max_position, strategy_id=None, order_id_tag=None, trade_size=None, half_spread_bps=5, inventory_skew_factor=0.0, signal_skew_factor=0.0, signal_baseline=None, requote_threshold_bps=5, expire_time_secs=None, on_cancel_resubmit=False)"
Source§impl PyStubType for CompositeMarketMakerConfig
impl PyStubType for CompositeMarketMakerConfig
Source§fn type_output() -> TypeInfo
fn type_output() -> TypeInfo
§fn type_input() -> TypeInfo
fn type_input() -> TypeInfo
Source§impl PyTypeInfo for CompositeMarketMakerConfig
impl PyTypeInfo for CompositeMarketMakerConfig
Source§const NAME: &str = <Self as ::pyo3::PyClass>::NAME
const NAME: &str = <Self as ::pyo3::PyClass>::NAME
prefer using ::type_object(py).name() to get the correct runtime value
Source§const MODULE: Option<&str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE
const MODULE: Option<&str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE
prefer using ::type_object(py).module() to get the correct runtime value
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
§fn is_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_type_of(object: &Bound<'_, PyAny>) -> bool
object is an instance of this type or a subclass of this type.§fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
object is an instance of this type.Auto Trait Implementations§
impl Freeze for CompositeMarketMakerConfig
impl RefUnwindSafe for CompositeMarketMakerConfig
impl Send for CompositeMarketMakerConfig
impl Sync for CompositeMarketMakerConfig
impl Unpin for CompositeMarketMakerConfig
impl UnsafeUnpin for CompositeMarketMakerConfig
impl UnwindSafe for CompositeMarketMakerConfig
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<'py, T> FromPyObjectOwned<'py> for Twhere
T: for<'a> FromPyObject<'a, 'py>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
self into an owned Python object, dropping type information.§fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
self into an owned Python object, dropping type information and unbinding it
from the 'py lifetime.§fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
self into a Python object. Read more§impl<'py, T> IntoPyObjectNautilusExt<'py> for Twhere
T: IntoPyObjectExt<'py>,
impl<'py, T> IntoPyObjectNautilusExt<'py> for Twhere
T: IntoPyObjectExt<'py>,
§fn into_py_any_unwrap(self, py: Python<'py>) -> Py<PyAny>
fn into_py_any_unwrap(self, py: Python<'py>) -> Py<PyAny>
§impl<T> PyErrArguments for T
impl<T> PyErrArguments for T
§impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
§fn type_check(object: &Bound<'_, PyAny>) -> bool
fn type_check(object: &Bound<'_, PyAny>) -> bool
§fn classinfo_object(py: Python<'_>) -> Bound<'_, PyAny>
fn classinfo_object(py: Python<'_>) -> Bound<'_, PyAny>
isinstance and issubclass function. Read more