Skip to content

Dimensionless Developments presents a Rust-powered options strategy visualizer. This project delivers a fast, responsive, browser-based iron condor calculator with a real-time payoff chart, key risk metrics, and simplified Greeks, all running in WebAssembly.

License

Notifications You must be signed in to change notification settings

DimensionlessDevelopments/Dimensionless-Options-Visual-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dimensionless Options Visual Calculator

Dimensionless Developments presents a Rust-powered options strategy visualizer. This project delivers a fast, responsive, browser-based iron condor calculator with a real-time payoff chart, key risk metrics, and simplified Greeks, all running in WebAssembly.

🚀 Quick Start for Beginners

Step 1: Install Prerequisites

Windows:

# Install Rust (includes Cargo)
# Visit https://rustup.rs/ and run the installer, OR:
winget install rustup

# Install trunk
cargo install trunk


# Verify installations
rustc --version
trunk --version

macOS:

# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Install Trunk
brew install trunk

# Verify
rustc --version
trunk --version

Linux (Ubuntu/Debian):

# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Install Trunk
curl -LO https://trunk.io/releases/trunk
chmod +x trunk
git commit ./trunk -m "Commit Trunk to our repo"

# Verify
rustc --version
trunk --version

Step 2: Running the app

# Open a terminal & start running the command
npm install

# Wait for the first command of npm to finsih then, 
npm run tailwind:watch

# Lastly use the command below 
trunk serve
# Should show: Starting trunk 0.21.14
 INFO 📦 starting build  ...

Run the App

Open http://127.0.0.1:8080/ in your browser.

First time tip: Make sure you run "rustup target add wasm32-unknown-unknown" to make sure it's installed.

What This Program Does

The app models a four-leg iron condor strategy. Users enter strikes, premiums, contracts, and market assumptions (IV, rate, time), and the app computes:

  • Net credit
  • Max profit and max loss
  • Return on risk
  • Simplified Greeks (delta, gamma, theta, vega)
  • A payoff diagram at expiration

It also supports delayed quotes via Stooq to quickly set the underlying price.

Why It Is Helpful and Needed

Options traders need fast, accurate insight into risk and reward before committing capital. This tool:

  • Visualizes payoff geometry instead of forcing manual spreadsheets
  • Quantifies exposure with simplified Greeks for quick sensitivity checks
  • Enables rapid what-if iteration on strikes and premiums
  • Helps learners understand how iron condors behave as price moves

Tech Stack

Core

Technology Purpose
Rust Application logic and calculations
Leptos Reactive UI (client-side rendering)
WASM Run Rust in the browser
Trunk Build pipeline and dev server

Styling

Technology Purpose
Tailwind CSS Utility-first styling

Crates Used

Crate Purpose
leptos Components, signals, UI rendering
libm Math helpers for Greeks
gloo-net HTTP requests in WASM
wasm-bindgen-futures Async tasks in the browser

Rust Concepts Used

  • struct and enum for modeling option legs and strategies
  • Pure functions for payoff and Greeks calculations
  • Ownership and borrowing for safe data flow
  • Closures for reactive UI handlers
  • Pattern matching for call/put branching
  • Iterators and folds for aggregation

Key Features

  • Iron condor input panel (strikes, premiums, contracts)
  • Net credit, max profit, max loss, return on risk
  • Simplified Black-Scholes Greeks
  • Payoff diagram at expiration
  • Delayed quote fetch via Stooq (manual inputs still supported)

Project Structure

finance/
├── Cargo.toml
├── index.html
├── src/
│   └── main.rs
├── styles/
│   └── input.css
├── tailwind.config.cjs
└── README.md

Notes

  • Stooq provides delayed data and may be blocked by browser CORS. If needed, use a small proxy.

Contact

Made by Dimensionless Developments Head to our website https://www.dimensionlessdevelopments.com. email: contact@dimensionlessdevelopments.com

About

Dimensionless Developments presents a Rust-powered options strategy visualizer. This project delivers a fast, responsive, browser-based iron condor calculator with a real-time payoff chart, key risk metrics, and simplified Greeks, all running in WebAssembly.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published