What Is an Edge?
An edge is the difference between what you think a contract is worth and what the market is pricing it at.
If you believe "US recession by 2026" has a 70% probability, and Kalshi prices it at 35¢ (35%), you have a +35¢ edge on YES. If your model is right, buying at 35¢ for something worth 70¢ is a good trade.
The hard part isn't the math — it's systematically building a model, scanning markets, and accounting for execution costs.
Step 1: Build Your Model
You need a probability model for the events you're trading. SimpleFunctions does this with causal trees:
sf create "Fed cuts rates below 4% by December 2026"
The engine creates a tree of sub-claims (inflation trajectory, employment data, financial stress signals) and assigns probabilities. These propagate up to a thesis confidence that implies prices for related contracts.
Step 2: Scan for Divergences
sf edges
Output:
Ticker Mkt Thesis Edge Spread Liq Signal
Gas .90 Dec 5¢ 60¢ +55¢ 6¢ low WATCH
Fed cut Apr 5¢ 50¢ +46¢ - - CONSIDER
WTI T180 Dec 20¢ 58¢ +38¢ 1¢ high CONSIDER
KXRECSSNBER-26 35¢ 72¢ +37¢ 1¢ high CONSIDER
CPI May >0.4% 30¢ 60¢ +30¢ 3¢ med CONSIDER
Theoretical edge = thesis price - market price. But you can't trade theoretical edge.
Step 3: Calculate Executable Edge
Executable edge accounts for the bid-ask spread. If the edge is +38¢ but the spread is 10¢, your real edge is +28¢ after crossing the spread.
sf liquidity --topic oil
This shows you:
- Bid/Ask: where you can actually buy and sell
- Spread: your execution cost
- Depth: how many contracts you can trade at these prices
- Slippage: what happens when you try to fill 100+ contracts
A 55¢ edge on a market with 6¢ spread and low depth might be worse than a 30¢ edge on a market with 1¢ spread and high depth.
Step 4: Monitor and Update
Edges aren't static. The heartbeat engine checks every 15 minutes:
- Price changes: did the market move toward or away from your thesis?
- News: did something happen that changes a causal node probability?
- Milestones: is there an upcoming data release (CPI, unemployment, FOMC) that could resolve uncertainty?
# What changed since yesterday?
sf feed --hours 24
# Performance over time
sf performance
Common Mistakes
1. Ignoring liquidity. A huge edge on a market with no depth is worthless. Always check sf liquidity before entering.
2. Overconcentrating. Five oil contracts is one oil bet. Check sf dashboard for risk concentration.
3. Not stress-testing. Run sf whatif before sizing up. How much do you lose if your thesis is wrong?
4. Confirmation bias. The heartbeat engine evaluates all evidence, not just confirming evidence. But you should still actively seek disconfirming information.
Getting Started
npm install -g @spfunctions/cli
sf setup
sf create "your thesis"
sf edges # find edges
sf liquidity # check execution quality
sf whatif # stress test
Full documentation: simplefunctions.dev/docs




