pub struct Strategy {
pub name: String,
pub choices: Vec<Order>,
pub indicator: Option<Vec<Vec<f64>>>,
}Expand description
Struct to hold vector of choices and indicators
There is no specific constructor
Need to be created via a user-defined function which return a Strategy
Fields§
§name: String§choices: Vec<Order>§indicator: Option<Vec<Vec<f64>>>Implementations§
Source§impl Strategy
impl Strategy
pub fn choices(&self) -> Vec<Order>
pub fn name(&self) -> &String
pub fn indicator(&self) -> Option<Vec<Vec<f64>>>
pub fn invert(&self) -> Self
pub fn long_only(&self) -> Self
pub fn short_only(&self) -> Self
pub fn to_csv(&self, filename: &str) -> Result<(), Box<dyn Error>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Strategy
impl RefUnwindSafe for Strategy
impl Send for Strategy
impl Sync for Strategy
impl Unpin for Strategy
impl UnwindSafe for Strategy
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
Mutably borrows from an owned value. Read more