pub struct TradingTrajectoryObjectiveConfig {
pub expected_returns: Vec<f64>,
pub risk_aversion: f64,
pub impact_coefficients: Vec<f64>,
pub fixed_ticket_cost: f64,
pub terminal_inventory_target: i64,
pub terminal_inventory_penalty: f64,
}Expand description
Coefficients of the built-in objective evaluate_trading_path.
Per-step vectors are indexed by step and must have one entry per trade.
Fields§
§expected_returns: Vec<f64>Expected return per unit of inventory at each step, earned on the inventory held after that step’s trade.
risk_aversion: f64Penalty on held inventory each step (path-dependent risk proxy).
Charged as risk_aversion * q_t^2 on the post-trade inventory q_t; must be finite
and >= 0.
impact_coefficients: Vec<f64>Per-step linear impact coefficient applied to |trade|.
Not checked for sign or finiteness (a non-finite result is caught at the end).
fixed_ticket_cost: f64Fixed per-step ticket cost whenever trade != 0 (non-convex).
Must be finite and >= 0.
terminal_inventory_target: i64Final inventory the terminal penalty pulls towards.
terminal_inventory_penalty: f64Coefficient of the quadratic penalty on final inventory - terminal_inventory_target;
must be finite and >= 0. A soft counterpart of
TradingTrajectorySchema::terminal_inventory, which is a hard constraint.
Trait Implementations§
Source§impl Clone for TradingTrajectoryObjectiveConfig
impl Clone for TradingTrajectoryObjectiveConfig
Source§fn clone(&self) -> TradingTrajectoryObjectiveConfig
fn clone(&self) -> TradingTrajectoryObjectiveConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl PartialEq for TradingTrajectoryObjectiveConfig
impl PartialEq for TradingTrajectoryObjectiveConfig
Source§fn eq(&self, other: &TradingTrajectoryObjectiveConfig) -> bool
fn eq(&self, other: &TradingTrajectoryObjectiveConfig) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TradingTrajectoryObjectiveConfig
Auto Trait Implementations§
impl Freeze for TradingTrajectoryObjectiveConfig
impl RefUnwindSafe for TradingTrajectoryObjectiveConfig
impl Send for TradingTrajectoryObjectiveConfig
impl Sync for TradingTrajectoryObjectiveConfig
impl Unpin for TradingTrajectoryObjectiveConfig
impl UnsafeUnpin for TradingTrajectoryObjectiveConfig
impl UnwindSafe for TradingTrajectoryObjectiveConfig
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Key for Twhere
T: Clone,
impl<T> Key for Twhere
T: Clone,
§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Scalar for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.