Skip to content

Option contract value at expiration calculations in pure Rust

Notifications You must be signed in to change notification settings

drbh/optioncontracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Option contract value at expiration calculations in pure Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages