The Heartbeat Engine
The heartbeat is what makes SimpleFunctions an agent rather than just an analytics tool. It's the scheduled process that runs continuously, monitoring the world and acting on your behalf.
What the Heartbeat Does
On each heartbeat tick:
- Checks for new signals: Searches news sources, monitors price changes, checks webhooks
- Filters noise: Maps signals to causal tree nodes, discarding irrelevant information
- Runs evaluation: Updates probabilities, recalculates edge
- Checks strategies: Evaluates entry/exit/stop conditions
- Sends notifications: Alerts you to significant changes
Heartbeat Frequency
The default heartbeat runs every 30 minutes during active market hours. But frequency can be adjusted:
- High-frequency: Every 5-10 minutes during volatile events (FOMC day, CPI release)
- Low-frequency: Every 2-4 hours for long-dated theses with slow-moving fundamentals
- Burst mode: Continuous scanning when a trigger event occurs
Why the Heartbeat Matters
Markets move while you sleep. A news event at 3 AM could create a 20-point edge that evaporates by market open. The heartbeat catches these opportunities and can execute strategies automatically.
Heartbeat Monitoring
You can check heartbeat status with sf heartbeat status to see:
- When the last heartbeat ran
- How many signals were processed
- Whether any strategies were triggered
- Current thesis state summary