written in rust - because rust.
Build options with the Builder Pattern.
rust
let option_input = OptionBuilder::new()
.kind(Type::Call)
.direction(Direction::Long)
.strike(10.0)
.price(1.0)
.finish();
Execute the option based on a current market price
```rust let currentprice = 20.0; let result = executeoption(&optioninput, currentprice);
println!("{:#?}", result); // 9.0 ```
bash
cargo run --example simple