Skip to main content

Advanced Workflows

Chain multiple API calls for complex financial calculations.

Workflow 1: Option Portfolio Greeks

# Step 1: Build yield curve (2 credits)
curve = build_yield_curve(...)

# Step 2: Price multiple options (2 credits each)
greeks_portfolio = []
for option in options:
    result = price_option(option, curve)
    greeks_portfolio.append(result['greeks'])

# Step 3: Aggregate portfolio Greeks
total_delta = sum(g['delta'] for g in greeks_portfolio)
Total Cost: 2 + (2 × n_options) credits

Workflow 2: Risk Parity Portfolio

# Step 1: Get covariance (1 credit)
cov = calculate_covariance(returns)

# Step 2: Optimize for risk parity (5 credits)  
weights = optimize_risk_parity(cov)

# Step 3: Calculate portfolio VaR (5 credits)
var = calculate_var(weights, returns)
Total Cost: 11 credits See more →