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:
- Pricing - Black-Scholes-Merton option pricing with dividend adjustments
- Greeks - Complete suite of first, second, and third-order Greeks via
calculateGreeks() - Implied Volatility - Calculate IV from market prices via
calculateImpliedVolatility() - IV Surfaces - Build smoothed volatility surfaces across strikes and expirations
- Dealer Exposures - Gamma, vanna, and charm exposure calculations
- Implied PDF - Risk-neutral probability density function from option prices
- Real-Time Data - Broker-agnostic streaming of normalized options data via
FloeClient
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