Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.generalmarket.io/llms.txt

Use this file to discover all available pages before exploring further.

Backtesting shows what would have happened. It says nothing about what will happen. This is its only honest feature. The engine simulates portfolio performance from 2020 to today. Test a thesis, compare configurations via sweep mode, and deploy the result as a live Dex Traded Fund (DTF) — from the UI or API.
Past performance does not guarantee future results. The past is a story you tell yourself to justify a decision you have already made. Backtesting cannot account for future market conditions, liquidity changes, or black swan events. See Risks before committing capital.

Backtesting via the UI

Navigate to the Backtest section. The interface is simple. The questions it raises are not.
1

Select a Category

Choose an asset category to define the token universe. Layer 1s, DeFi Blue Chips, AI Tokens, Memecoins, Made in China, and 50+ more from CoinGecko and DefiLlama.Only coins listed on Bitget at some point are eligible. A backtest on untradeable assets is fiction, not simulation.
2

Configure Parameters

ParameterDescriptionExample
Top NNumber of assets by market cap10
WeightingAllocation scheme (see below)mcap
RebalanceDays between rebalances30
FeeSimulated trading fee per rebalance0.1%
SpreadSlippage multiplier1.0
3

Run & Review

Click Run Backtest. Results include total return, Sharpe ratio, max drawdown, annualized return, a NAV chart, and final holdings. The numbers look definitive. They describe the past with perfect hindsight.

Backtesting via the API

All simulation endpoints are GET requests with query parameters. No authentication required. The data is public. The conclusions you draw from it are yours alone. Base URL: https://generalmarket.io/api

Run a Single Backtest

curl "https://generalmarket.io/api/sim/run?\
category_id=layer-1&\
top_n=10&\
weighting=mcap&\
rebalance_days=30&\
base_fee_pct=0.1&\
spread_multiplier=1.0"

Query Parameters

ParameterTypeRequiredDefaultDescription
category_idstringYesCategory slug (from /sim/categories)
top_nintYesNumber of top assets by market cap
weightingstringYesWeighting scheme (see table below)
rebalance_daysintYesDays between rebalances
base_fee_pctfloatNo0.1Fee % per rebalance
spread_multiplierfloatNo1.0Slippage multiplier
start_datestringNo2020-01-01ISO date (YYYY-MM-DD)
forceboolNofalseSkip cache, force recompute
threshold_pctfloatNoDrift-based rebalance threshold (%)
fng_modestringNoFear & Greed regime: fear, greed, or both
fng_fear_thresholdintNo25FNG index below this = fear
fng_greed_thresholdintNo75FNG index above this = greed
fng_cash_pctfloatNo0.4% to move to stables during greed
dom_modestringNoDominance regime: btc, eth, or inverse
dom_lookbackintNo30Lookback days for dominance trend
vc_modestringNoVC filter mode
vc_investorsstringNoComma-separated investor names
vc_min_amount_mfloatNoMin funding round in $M
vc_round_typesstringNoComma-separated round types

Weighting Strategies

WeightingQuery ValueDescription
Equalequal1/N allocation across all assets
Market CapmcapProportional to market cap
Capped Market Capcapped_mcap_10Market cap with 10% single-asset cap
Square Root Market Capsqrt_mcapDampened market cap weighting
Momentummomentum_90Top by 90-day momentum score
Inverse Volatilityinvvol_60Lower volatility = higher weight
Dual Momentumdual_mom_180Combined momentum/volatility signal
Risk Parityrisk_parity_60Equal risk contribution per asset
Min Variancemin_var_60Minimize portfolio variance
Multi-Factormulti_factor_90Composite momentum + vol + mcap
Low Volatilitylow_vol_60Over-weight low-vol assets
DeFi-only strategies (for dl-* categories):
WeightingQuery ValueDescription
TVL WeighttvlProportional to Total Value Locked
TVL Cappedtvl_capped_10TVL with 10% cap
TVL Sqrttvl_sqrtDampened TVL
Fees WeightfeesWeight by protocol fee revenue
Revenue WeightrevenueWeight by protocol revenue
Volume WeightvolumeWeight by trading volume
TVL Momentumtvl_momentum_90TVL trend-following
Fee Efficiencyfee_efficiencyFees-to-TVL ratio
Yield WeightyieldWeight by yield

Sweep Mode

Sweep mode tests many configurations at once. It varies one parameter and streams results for each variant. It is the fastest way to discover that most configurations perform similarly — and that the few that don’t are probably overfitting. Sweep dimensions: top_n, weighting, rebalance, category, threshold
curl -N "https://generalmarket.io/api/sim/sweep-stream?\
sweep=top_n&\
category_id=layer-1&\
weighting=mcap&\
rebalance_days=30"
SweepWhat It VariesValues
top_nNumber of holdings5, 10, 20, 30, 50, 100, 200
weightingAll weighting schemesequal, mcap, momentum, invvol, etc.
rebalanceRebalance frequency14d, 30d, 60d, 90d, 180d + drift bands (3%, 5%, 10%, 15%)
categoryMultiple categoriesPass categories=layer-1,defi,ai
thresholdDrift rebalance bands3%, 5%, 10%, 15%, 20%
One call tests all variants. Results stream back as they complete. The temptation is to pick the best-performing result. The discipline is to ask why it performed best and whether that reason will persist.

Fetch Holdings from a Backtest

After running a backtest, fetch the portfolio composition. These are the holdings that survived:
curl "https://generalmarket.io/api/sim/holdings?run_id=4821"
Pass an optional date parameter (YYYY-MM-DD) to get holdings at a specific rebalance date.

Compare Benchmarks

Fetch BTC and ETH price series normalized to 1.0 at the start date. Every strategy must answer one question: did it beat holding BTC? Most do not.
curl "https://generalmarket.io/api/sim/benchmarks?start_date=2020-01-01"

Market Signal Integrations

Layer additional signals into any backtest. More signals do not mean more clarity. But they do mean more data:

Fear & Greed Index

Shift allocation between crypto and stablecoins based on market sentiment. Fear and greed are the only two emotions the market has. The index measures the ratio.
curl "https://generalmarket.io/api/sim/run?\
category_id=layer-1&top_n=10&weighting=mcap&rebalance_days=30&\
fng_mode=both&fng_fear_threshold=25&fng_greed_threshold=75&fng_cash_pct=0.4"
When FNG > 75 (greed), 40% of the portfolio moves to stables. When FNG < 25 (fear), fully deployed in crypto. The algorithm does what you cannot: sell into euphoria.

BTC/ETH Dominance

Adjust crypto allocation based on Bitcoin or Ethereum dominance trends.
curl "https://generalmarket.io/api/sim/run?\
category_id=layer-1&top_n=10&weighting=mcap&rebalance_days=30&\
dom_mode=btc&dom_lookback=30"

VC Funding Filter

Filter assets by venture capital backing. Smart money is not always smart. But it is always funded:
curl "https://generalmarket.io/api/sim/run?\
category_id=layer-1&top_n=10&weighting=mcap&rebalance_days=30&\
vc_mode=include&vc_investors=a16z,paradigm&vc_min_amount_m=10"

Understanding Results

Numbers do not lie. But they omit. The metrics below tell you what happened. They do not tell you what it felt like to live through it.

Key Metrics

MetricWhat It Tells You
Total Return %Cumulative gain/loss over the full period
Annualized ReturnReturn normalized to a yearly rate
Max Drawdown %Largest peak-to-trough decline — worst-case pain
Sharpe RatioRisk-adjusted return. >1.0 is decent, >2.0 is strong
Total Fees %Cumulative fees paid across all rebalances
Total TradesNumber of individual asset trades executed
Total DelistingsAssets removed mid-backtest (delisted from exchange)

What the NAV Series Represents

The nav_series starts at 1.0 and tracks portfolio value over time. A NAV of 3.12 means 212% return from the start date. A straight line on the chart. In reality, each day between 1.0 and 3.12 was a decision not to sell.

Deploy as DTF

A backtest that looks good enough becomes a live DTF with one click. The transition from simulation to reality is instant. The consequences are not.
1

Review Final Holdings

Check the holdings table. Confirm the weights match your thesis. The thesis looked good in simulation. It has not yet met the market.
2

Click Deploy Index

The button pre-fills the DTF creation form with the backtested assets and weights. One click from history to the present.
3

Confirm On-Chain

Add a name. Confirm the transaction. The strategy is now live. It belongs to reality now, not to the past.
The deployed DTF uses the weights from the final rebalance. It does not auto-rebalance. The backtest rebalanced for you. Reality will not.

Checklist: Running an Honest Backtest

1

Pick a Category That Matches Your Thesis

Do not backtest “all crypto” if you want a DeFi strategy. Narrower categories give cleaner signal. Broader categories give cleaner conscience.
2

Start with Equal Weight

Equal weight is the fairest baseline. If mcap-weighted cannot beat equal-weighted, concentration is hurting you. Equal weight is the null hypothesis. Beat it before you complicate things.
3

Use Realistic Fees

Default fee is 0.1%. If you are trading illiquid altcoins, bump spread_multiplier to 2.0+. Underestimating fees is the most common backtesting lie. It is also the most flattering.
4

Run a Sweep Before Committing

Use sweep=top_n and sweep=weighting to find optimal params. Do not cherry-pick the one configuration that looks best. That is not analysis. It is self-deception with a chart.
5

Check Drawdown, Not Just Return

A 500% return with -90% max drawdown means you would have watched 90% of your money disappear at some point. The return is theoretical. The drawdown was lived.
6

Look at Delistings

High total_delistings means the category contains flaky assets. The backtest handles this gracefully. Live trading does not.
7

Compare Against BTC

If your strategy cannot beat holding BTC on a risk-adjusted basis (Sharpe), the complexity adds nothing. BTC is the benchmark. Everything else is a bet against simplicity.