# Historical Simulation

*Data current as of 2026-05-15. Daily resolution on real Drift on-venue funding.*

> **Illustrative estimates only.** ksUSD was not deployed during the periods modeled below. Results come from the repo simulation applying the live program mechanics (normal basis + idle) to historical funding data. Real execution adds liquidity-dependent slippage, oracle latency, and keeper variability beyond what the model captures.

***

## Public claim

|                    |                                                                                                              |
| ------------------ | ------------------------------------------------------------------------------------------------------------ |
| **Target net APY** | **\~11%** after fees, jitoSOL's \~80% Drift collateral weight, and rebalance slippage                        |
| **Window**         | Feb 2022 → Apr 2026 (51 months)                                                                              |
| **Resolution**     | Daily                                                                                                        |
| **Funding data**   | Real Drift SOL-PERP for 793 of 1550 days (Nov 2022 – Jan 2025); Binance × empirical-ratio fallback elsewhere |

* **Model headline:** +15.57% net APY (19.82% gross minus the 20% performance fee)
* **Public claim:** \~11% net APY — after frictions the model doesn't simulate:
  * jitoSOL's collateral weight on Drift (\~80%)
  * perp-leg price impact during rebalances
* Marketing leads with the haircut number, not the model number.

***

## Methodology

| Input                 | Value                                                                                                          |
| --------------------- | -------------------------------------------------------------------------------------------------------------- |
| Funding source        | Drift SOL-PERP on-venue, daily (Nov 2022 – Jan 2025); Binance × empirical ratio for months outside that window |
| Resolution            | Daily                                                                                                          |
| Drift / Binance ratio | Calibrated from 22 overlap months: positive funding **2.37×**, negative funding **0.10×**                      |
| Mode classification   | 7-day rolling mean of daily funding (avoids whipsaw)                                                           |
| Idle behavior         | USDC at 4% lending APR — matches `programs/keystone-finance/src/lib.rs`                                        |
| Costs                 | 5 bps perp fee + 10 bps slippage per side; tiered 20–40 bps mode-switch cost                                   |
| Fees                  | 0% management, 20% performance above HWM                                                                       |

Data sources committed alongside code:

* `scripts/simulations/data/drift_funding_daily.csv` — 793 days of real Drift SOL-PERP funding
* `scripts/simulations/data/funding_monthly_apr.csv` — Binance fallback (used outside the Drift window)
* `scripts/simulations/data/sol_monthly.csv` — SOL spot

***

## Reproducible scripts

| Script                                     | What it does                                                          |
| ------------------------------------------ | --------------------------------------------------------------------- |
| `npm run fund:fetch-drift`                 | Refresh `drift_funding_daily.csv` from Drift's public S3 archive      |
| `npm run fund:simulate:v2`                 | Daily backtest — full 4.25-yr hybrid window, with and without reverse |
| `npm run fund:simulate:v2 -- --pure-drift` | Only the 2.17-yr real-Drift sub-window (no synth)                     |
| `npm run fund:simulate:v2 -- --no-reverse` | Normal basis + idle only (matches the live program in MVP)            |
| `npm run fund:snapshot`                    | Live-data addendum (current SOL spot + MTD funding)                   |

***

## Headline numbers

### Hybrid window (Feb 2022 → Apr 2026)

| Variant                            | Gross APY   | Net APY     | $100 →  | Max DD (funding-only) | Worst day          |
| ---------------------------------- | ----------- | ----------- | ------- | --------------------- | ------------------ |
| Normal basis + idle                | **+19.82%** | **+15.57%** | $184.88 | −0.57%                | 2023-05-14: −0.20% |
| Bidirectional (adds reverse basis) | +20.04%     | +15.73%     | $185.98 | −0.96%                | 2022-11-17: −0.36% |
| USDC lending benchmark (4% APY)    | +4.00%      | +4.00%      | $118.50 | 0%                    | —                  |

Reverse basis is in MVP (`open_reverse` / `close_reverse`) but adds only \~16 bps in backtest:

* Drift's long-biased book triggers reverse on just 2–4% of days
* Value is **regime coverage**, not headline alpha

### Real-Drift-only sub-window (Nov 2022 → Jan 2025, 793 days)

Pure on-venue data, no synthesis:

| Variant             | Gross APY   | Net APY     |
| ------------------- | ----------- | ----------- |
| Normal basis + idle | **+30.84%** | **+23.97%** |
| Bidirectional       | +31.26%     | +24.29%     |

*This 26-month period spans the 2023–2024 SOL bull cycle when funding ran structurally hot. Not representative of all market conditions — the 4.25-yr hybrid number is the more defensible all-environment estimate.*

***

## What the model leaves out

The backtest is more conservative than the old monthly Binance proxy on costs but still has modeling gaps that **understate worst-case drawdown**:

* **Perp leg price impact during rebalances** is not simulated. Realistic worst month under stressed slippage is **−2% to −5%**, not the model's −0.6%.
* **jitoSOL collateral haircut on Drift** (\~75–80% asset weight) is not applied — the model assumes 100% capital efficiency on the short notional. Real income is \~80% of modeled.
* **Hourly Drift settlement** is averaged to daily. Intraday funding flips that the keeper would catch are smoothed.
* **Reserve fund drag** (4% USDC lending on the buffer + reserve) is not subtracted from the headline.

The spread between model and claim:

|                                                        | Net APY   |
| ------------------------------------------------------ | --------- |
| Model headline (after fees only)                       | +15.57%   |
| **Public claim** (after collateral haircut + slippage) | **\~11%** |
| Real-Drift-only window (bull-biased ceiling)           | +23.97%   |

We lead with the claim, not the headline.

***

## Honest caveats

* The 26-month real-Drift window happens to capture a SOL bull cycle. Funding in extended bear regimes (e.g., May 2022 – Oct 2022 on Binance) would compress the headline materially. The 4.25-yr hybrid number absorbs this via Binance × empirical-ratio fallback.
* The empirical 2.37× ratio was calibrated on 22 months and is statistically meaningful but not stationary — Drift's book composition can shift if institutional flow grows or hedgers concentrate.
* Modeled max drawdown excludes basis P\&L from imperfect hedge maintenance during fast SOL moves. Treat −0.6% as the funding-side floor on DD, not a full-strategy DD.
* jitoSOL staking taken as 5.8% APR in the model — current network rate is closer to 6.8–7.2%, so this is mildly conservative (≈ +1pp of unmodeled upside).

***

## Related

* [Whitepaper — Simulated performance](/reference/whitepaper.md#simulated-performance--daily-backtest-feb-2022--apr-2026-51-months)
* [Backtest data CSVs](https://github.com/kamwithak/keystone-contracts/tree/main/scripts/simulations/data) — committed alongside the code
* Drift's public funding archive: `s3://drift-historical-data-v2/program/dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH/market/SOL-PERP/fundingRateRecords/`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.keystonefi.xyz/reference/historical-simulation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
