RustyQLib 0.0.2

RustyQLib is a lightweight yet robust quantitative finance library designed to price derivatives and perform risk analysis
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#[derive(Debug)]
pub struct Quote{
    pub value: f64,
    pub bid: f64,
    pub ask: f64,
    pub mid: f64,
}
impl Quote{
    pub fn new(value: f64) -> Self {
        Quote{value: value, bid: value, ask: value, mid: value }
    }
    pub fn value(&self) -> f64 { self.value }
    pub fn valid_value(&self) -> bool { self.value>0.0}
}