Getting Started
Install floe and start running options analytics in Go.
Installation
Install the module:
go get github.com/FullStackCraft/floe-go
Quick Start
package main
import (
"fmt"
floe "github.com/FullStackCraft/floe-go"
"github.com/FullStackCraft/floe-go/blackscholes"
)
func main() {
params := floe.BlackScholesParams{
Spot: 100,
Strike: 105,
TimeToExpiry: 0.25,
RiskFreeRate: 0.05,
Volatility: 0.20,
DividendYield: 0.01,
OptionType: floe.Call,
}
price := blackscholes.BlackScholes(params)
greeks := blackscholes.CalculateGreeks(params)
fmt.Printf("Price: %.2f\\n", price)
fmt.Printf("Delta: %.5f\\n", greeks.Delta)
fmt.Printf("Gamma: %.5f\\n", greeks.Gamma)
fmt.Printf("Theta/day: %.5f\\n", greeks.Theta)
}
Package Layout
floe is organized by focused Go packages:
blackscholesfor pricing, Greeks, implied volatility, and time-to-expiry helpers.volatilityfor IV surfaces and smile smoothing.exposurefor canonical/state-weighted/flow-delta dealer exposures.hedgeflowfor impulse curve, charm integral, and pressure cloud analysis.impliedpdffor risk-neutral distribution estimation.ivandrvfor model-free IV vs realized volatility workflows.volresponsefor IV response z-score classification.
Notes
- Time-sensitive APIs take explicit timestamps in milliseconds (
time.Now().UnixMilli()). blackscholes.CalculateImpliedVolatilityreturns percent IV (for example20means20%).- Most chain-based functions consume
floe.OptionChainandfloe.NormalizedOption.
Next Steps
- Read the API Reference
- Explore Recipes
- Run end-to-end patterns in Examples