Advanced Workbench
Formula builder, backtesting, data blends, scheduling, webhooks, and the signal marketplace.
Formula Builder
The Formula Builder lets you create calculated fields using a spreadsheet-style expression language. Formulas operate on top of existing data warehouse columns and produce derived metrics that can be used in queries, dashboards, and alerts. Think of formulas as saved calculations that stay up to date as the underlying data changes.
Formula Syntax
Formulas use a familiar syntax with arithmetic operators, built-in functions, and column references. Column references use the format [table.column].
| Arithmetic | +, -, *, /, % (modulo), ^ (power). Standard operator precedence with parentheses for grouping. |
| Aggregation | SUM(), AVG(), MIN(), MAX(), COUNT(), STDDEV(), MEDIAN(). Apply over a column or filtered subset. |
| Window Functions | LAG(), LEAD(), RANK(), ROLLING_AVG(), ROLLING_SUM(). Operate over ordered partitions. |
| Conditional | IF(condition, then, else). Nest for multi-branch logic. |
| Math | ABS(), ROUND(), CEIL(), FLOOR(), LOG(), LN(), SQRT(), EXP(). |
| Date | NOW(), DATE_DIFF(), DATE_ADD(), DATE_TRUNC(). For time-based calculations. |
Example Formulas
Annualized funding rate:
[funding_rate_history.funding_rate] * 3 * 365OI-weighted funding rate across exchanges:
SUM([derivatives.funding_rate] * [derivatives.open_interest_usd])
/ SUM([derivatives.open_interest_usd])7-day rolling average of daily volume:
ROLLING_AVG([market_data.volume_24h], 7)Custom composite score combining funding and OI z-scores:
(0.6 * [asset_screener_latest.funding_rate_zscore]
+ 0.4 * [asset_screener_latest.oi_zscore])Formula versioning
Data Blends
Data blends let you join multiple data sources in a single query without writing complex SQL joins. The blend builder provides a visual interface where you select two or more tables, define the join keys (typically asset symbol and timestamp), and select which columns to include from each table. The result is a merged dataset that you can query, chart, and export.
Common blend use cases include joining derivatives data with on-chain flows to find funding/flow divergences, combining trade history with market data to calculate entry timing quality, and merging sentiment scores with price performance for correlation analysis.
Backtesting Engine
The backtesting engine lets you define a trading strategy and simulate its performance against historical market data. It supports both simple rule-based strategies (e.g., "buy when funding z-score drops below -2, sell when it returns to 0") and complex multi-factor strategies that combine price, derivatives, and on-chain conditions.
Defining a Strategy
Strategies are defined in Strategy cells using a structured format that specifies entry conditions, exit conditions, position sizing, and risk parameters.
| Entry Conditions | One or more conditions that must all be true to open a position. Supports price, funding, OI, volume, z-score, and divergence triggers. |
| Exit Conditions | Conditions for closing the position: take profit target, stop loss level, time-based exit, or indicator-based exit. |
| Position Sizing | Fixed size, percentage of portfolio, or volatility-adjusted sizing (e.g., risk 1% of capital per trade with ATR-based stop). |
| Direction | Long-only, short-only, or both. For long/short strategies, define separate entry conditions for each direction. |
| Asset Universe | Backtest on a single asset, a list of assets, or the entire tracked universe. |
| Lookback Period | Historical data range: 30 days, 90 days, 180 days, or 1 year. Longer periods cost more credits. |
Backtest Outputs
After a backtest completes, the engine produces a comprehensive results panel with the following components.
A line chart showing portfolio value over time, with drawdown periods highlighted in red.
Every simulated trade with entry/exit timestamps, prices, direction, P&L, and the conditions that triggered entry and exit.
Total return, CAGR, max drawdown, Sharpe ratio, Sortino ratio, win rate, average win/loss size, and profit factor.
Max drawdown depth and duration, recovery time, and a histogram of drawdown magnitudes.
A heatmap showing returns by month, revealing seasonality patterns and consistency.
Overlay the strategy equity curve against a buy-and-hold benchmark to quantify the strategy's alpha.
Backtest limitations
Query Scheduling
Any SQL query or notebook can be scheduled to run on a cron-style timer. Scheduled queries execute server-side, cache results, and optionally trigger notifications or webhook calls when they complete. This powers automated data pipelines, recurring reports, and monitoring workflows that run without manual intervention.
Schedule Configuration
Open the query or notebook you want to schedule
Navigate to the SQL cell or notebook in the Workbench. Click the cell menu and select Schedule.
Define the schedule
Choose a preset interval (every hour, every 4 hours, daily, weekly) or enter a custom cron expression for fine-grained control. Set the timezone for the schedule.
Configure actions on completion
Optionally enable result caching (pre-compute for faster dashboard loads), email notification (send results as a formatted email), or webhook delivery (POST results as JSON to an external URL).
Activate the schedule
Click Activate. The schedule appears in your Scheduled Queries list in the Workbench sidebar. You can pause, edit, or delete schedules at any time.
Webhook Automation
Scheduled queries can POST their results to external webhooks, enabling integration with Slack, Discord, Telegram bots, Zapier, or custom applications. The webhook payload includes the query results as JSON, the execution timestamp, and metadata about the query configuration.
Common automation patterns include posting a daily funding rate summary to a trading team's Slack channel, triggering a Zapier workflow when a query detects a specific condition (e.g., OI spike above 20%), and feeding Thrive data into a custom trading dashboard or spreadsheet.
API Access
Pro+ and Founder users can access the Thrive data warehouse programmatically via a REST API. API keys are managed from the Workbench settings panel. Each API call consumes the same credits as the equivalent Workbench action.
| POST /api/v1/query | Execute a SQL query against the data warehouse. Returns JSON results. Rate limited to 60 requests per minute. |
| GET /api/v1/assets | Returns current screener data for all tracked assets. No parameters required. |
| GET /api/v1/signals | Returns active AI signals with confidence scores and contributing sources. |
| GET /api/v1/divergences | Returns all active divergences with type, severity, and duration. |
| GET /api/v1/funding | Returns current funding rates across all exchanges for a given asset. |
| POST /api/v1/formulas/evaluate | Evaluates a formula expression and returns the computed result. |
API documentation
Signal Marketplace
The Signal Marketplace is a community-driven feature where Thrive users can publish and subscribe to custom signals, formulas, and notebooks. If you have built a formula or alert configuration that consistently produces valuable insights, you can share it with the community. Other users can subscribe to your signal and receive the same alerts and data updates.
How the Marketplace Works
Share a formula, alert configuration, or notebook with the community. Published items include a description, historical performance data, and the creator's track record.
Browse community-published signals and subscribe with one click. Subscribed signals appear alongside Thrive's native AI signals.
Every published signal's performance is tracked transparently. Subscribers can see accuracy, hit rate, and forward return statistics before committing.
Users rate published signals based on quality and usefulness. Top-rated signals are featured on the marketplace home page.
Marketplace is community-powered
Next Steps
AI Features
AI-powered insights, trade ideas, and analysis across the platform.
Calendar & Events
Track token unlocks, protocol upgrades, and macro events.
Notebooks & Cells
Master the notebook environment that powers all Workbench features.
Workbench Overview
Return to the Workbench overview for architecture and data warehouse details.