A Rust implementation for pricing European-style digital call options using Monte Carlo simulation and Finite Element Method (FEM).
This software provides two pricing methods for digital call options:
- Monte Carlo simulation
- Finite Element Method (FEM)
Represents a digital call option with the following properties:
underlying_price: Current price of the underlying assetstrike_price: Option's strike pricebarrier_price: Option's barrier priceimplied_volatility: Implied volatility of the underlying assettime_to_maturity: Time to option maturity
new() -> DigitalCallOption: Creates a new instance with default valuesget_inputs(&mut self): Prompts user for input valuesprice(&self, method: &str) -> f64: Calculates option price using specified method
monte_carlo_price(&self, num_simulations: usize) -> f64