← Back to documentation

Getting Started

Install floe and start calculating options analytics in minutes.

Installation

Install floe via npm:

npm install @fullstackcraftllc/floe

Quick Start

Import the functions you need and start calculating:

import { blackScholes, calculateGreeks } from "@fullstackcraftllc/floe";

// Calculate option price
const price = blackScholes({
  spot: 100,
  strike: 105,
  timeToExpiry: 0.25,
  riskFreeRate: 0.05,
  volatility: 0.20,
  optionType: "call"
});

console.log(`Option Price: $${price.toFixed(2)}`);

// Calculate all Greeks at once
const greeks = calculateGreeks({
  spot: 100,
  strike: 105,
  timeToExpiry: 0.25,
  riskFreeRate: 0.05,
  volatility: 0.20,
  optionType: "call"
});

console.log(`Delta: ${greeks.delta.toFixed(4)}`);
console.log(`Gamma: ${greeks.gamma.toFixed(6)}`);
console.log(`Theta: ${greeks.theta.toFixed(4)} per day`);
console.log(`Vega: ${greeks.vega.toFixed(4)} per 1% vol`);

Core Concepts

floe provides these main categories of functions:

  1. Pricing - Black-Scholes-Merton option pricing with dividend adjustments
  2. Greeks - Complete suite of first, second, and third-order Greeks via calculateGreeks()
  3. Implied Volatility - Calculate IV from market prices via calculateImpliedVolatility()
  4. IV Surfaces - Build smoothed volatility surfaces across strikes and expirations
  5. Dealer Exposures - Gamma, vanna, and charm exposure calculations
  6. Implied PDF - Risk-neutral probability density function from option prices
  7. Real-Time Data - Broker-agnostic streaming of normalized options data via FloeClient
  8. Vol Response - Expanding-window regression to classify whether IV is bid or offered relative to the price path via computeVolResponseZScore()

All functions use structured parameter objects for clarity and full TypeScript type safety.

Next Steps

  • Read the API Reference for complete function documentation
  • Check out Examples for real-world usage patterns