optioncontracts 0.0.0

Option contract value at expiration calculations in pure Rust
Documentation
  • Coverage
  • 0%
    0 out of 29 items documented0 out of 15 items with examples
  • Size
  • Source code size: 4.99 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.2 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • drbh/optioncontracts
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • drbh

option contracts

crates.io

written in rust - because rust.

Build options with the Builder Pattern.

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

let current_price = 20.0;
let result = execute_option(&option_input, current_price);

println!("{:#?}", result);
// 9.0

Run Example

cargo run --example simple