use std::fmt::Debug;
#[derive(Debug, Clone)]
pub struct MarketQuote {
pub symbol: String,
pub price: f64,
pub bid: f64,
pub ask: f64,
pub volume: f64,
pub timestamp: std::time::SystemTime,
}
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum OptionType {
Call,
Put,
}
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum OptionStyle {
European,
American,
Asian,
Barrier {
barrier: f64,
is_up: bool,
is_knock_in: bool,
},
}
#[derive(Debug, Clone)]
pub struct FinancialOption {
pub option_type: OptionType,
pub option_style: OptionStyle,
pub strike: f64,
pub maturity: f64,
pub spot: f64,
pub risk_free_rate: f64,
pub dividend_yield: f64,
}
#[derive(Debug, Clone, Copy)]
pub enum FinanceMethod {
FiniteDifference,
MonteCarlo { n_paths: usize, antithetic: bool },
FourierTransform,
Tree { n_steps: usize },
}