BTC-----
ETH-----
SOL-----
BNB-----
XRP-----
AVAX-----
BTC ETH SOL AVAX LINK

quantitative portfolio rebalancer

No emotions. No human error. Structural limits on every DCA dollar you deploy.

AQMath runs institutional-grade portfolio math on a secure backend engine — Risk Parity, KKT optimization, and volatility-weighted DCA. No accounts, no guesswork.

deleverage shield continuous de-risk — exposure scales down as drawdown and downside volatility rise
follow for updates & news
aqmath --live-engine
$ aqmath engine v2.0 — initializing...
data pipeline: 3 market data sources × 180-day history → covariance matrix
$
$
$ _
--what-you-are-watching

The engine loop, live

A simulation of the exact cycle the engine runs on our backend: recompute the covariance matrix, read the drawdown / downside-volatility regime, scale exposure continuously. Every number shown is real — taken from the 8.7-year, 5-token validation backtest.

  • risk parity + KKT projection on live market data
  • continuous de-risk — no indicators, no timers
  • 0 bytes persisted — portfolio processed in-memory

What is AQMath, How It Works & Why

A privacy-first quantitative rebalancer for passive crypto investors.

--what

AQMath is a quantitative portfolio rebalancer built for passive crypto investors.

It combines institutional-grade mathematics — Risk Parity, Karush-Kuhn-Tucker (KKT) optimization, and volatility-weighted Dollar-Cost Averaging — to keep your portfolio balanced without emotion, guesswork, or centralized data collection.

Non-Custodial Math Processing. Your portfolio data is sent only during DCA/Optimize and never persisted. No accounts. No tracking. Just math.

--how

1. Add your tokens and target allocations (or let the engine calculate them using 180-day historical volatility).

2. Click SYNC to get live prices — spot prices come from Binance’s public market data, with CoinGecko as automatic fallback. Read-only market data: no API keys, no account linking.

3. Use DCA Distribution to invest new capital only into underweight tokens, filtered by volatility and trend.

4. (Black) Run the AQMath Engine to re-compute optimal weights using full covariance matrix and KKT projection.

--why

Most portfolio tools either collect your data or offer only basic rebalancing. AQMath is different:

→ Institutional-grade math (same concepts used by multi-billion funds)
→ Non-Custodial — your portfolio stays in your browser’s localStorage, backend processing is ephemeral
→ Transparent, auditable logic (no black boxes)
→ €999 / year — transparent pricing, processed via USDC & EURC

Your balances are ephemeral — processed in-memory, never stored. No exchange API keys required. No data to sell.

Every cycle ends the same way: investors ride the rally, freeze in the crash, and sell the bottom — not for lack of intelligence, but because emotion always outruns discipline. AQMath removes emotion from the loop. While others refresh charts at 3 AM, your portfolio is already de-risking itself: as drawdown deepens and downside volatility rises, exposure scales toward stablecoins — automatically, continuously, by math you can audit line by line.

protect the downside. let the math hold the line.
--deleverage-modulator · v14.0

Deleverage Modulator — validated on real data

v14.0 scales exposure continuously off rising drawdown and rising downside volatility — no indicators, no timers, no correlation gate. It ramps exposure toward its target steadily in either direction, and uses threshold rebalancing.

0% -50% -100% -83.8% B&H -35.0% modulator Buy & Hold Deleverage Modulator
−48.8ppmax drawdown cut
0.93Sharpe (B&H 0.75)
32.9%CAGR (8.7y)

Across an 8.7-year, 5-token backtest (ADA/BNB/ETH/XRP/XLM) the modulator held peak drawdown to 35.0% versus 83.8% for Buy & Hold, and beats Buy & Hold on Sharpe (0.93 vs 0.75) at 32.9% CAGR. On a sealed out-of-sample second half never used to pick the preset it still roughly halved drawdown (~24% vs ~63%) at a higher Sharpe (0.48 vs 0.37). v14 adds threshold rebalancing (only trades when target exposure drifts > 8%), cutting rebalances ~64%. Backtest basket is survivor tokens; past results don't guarantee future performance.

--run-the-backtest

--community-signals

Fed the engine a deliberately broken book to blow past the risk caps — it held every one and scaled the risky sleeve exactly where it said it would. The allocation math is real, and that’s the part most tools fake.
r/quant · portfolio stress-test verification
I swept 225 parameter combinations around the published point — a plateau, not a spike. The grid’s best corner sits elsewhere, so the parameters weren’t max-picked. On the overfit axis, this is clean.
r/quant · independent deleverage sweep, 225 combinations
On a basket of five tokens each down ~90% from their highs, the modulator held drawdown to 32% versus 84% for buy-and-hold. There it’s not a tweak — it’s survival.
r/quant · independent deleverage backtest, adverse basket
--mathematical-core
The Math Behind Your Portfolio

The covariance matrix runs on our secure backend. All computation is stateless — data is processed in-memory and discarded immediately. Nothing is written to disk.

  • High-variance assets receive smaller dynamic caps
  • Correlated assets are penalized through covariance
  • Underweight assets are prioritized only when they improve the risk-balanced structure
01
--risk-model
The covariance matrix estimates how assets move together. Risk Parity then targets equal risk contribution — so no single token dominates your volatility.
[ read mathematical proof in docs ]
02
--optimization
KKT projection keeps allocations inside volatility caps and prevents oversized high-risk positions. When drawdown is severe, the Deleverage Shield instantly cuts exposure — stopping you from buying into a crash.
[ view formula ]
03
--privacy
Amounts, targets, and allocation weights stay in your browser’s localStorage. Data sent to the backend is processed in-memory and discarded immediately — nothing is persisted.
[ see the privacy data flow ]
04
--deleverage-modulator
Continuous regime modulator: exposure scales down as drawdown and downside volatility rise — no indicators, no timers, no correlation gate. It moves exposure toward its target at 30% of the gap per bar in either direction, with no hard floor; parked DCA cash redeploys once exposure recovers above 40%.
[ see 8.7-year backtest ]
--trust-anchors
math fully documented — audit the model
no cookies · no tracking · simple analytics
portfolio never stored — in-memory only
GDPR / DSGVO compliant infrastructure
BETA ACCESS
7 slots remaining
Limited slots · Access review required · Full engine access
  • Full Risk Parity optimization (same as Black)
  • Deleverage Modulator with continuous drawdown protection
  • Unlimited tokens and portfolio optimization
  • Automatic 180-day historical data pipeline
  • DCA distribution with full safety pipeline
  • Non-custodial privacy — no server stores your portfolio
  • 365-day access from activation
  • Send a message — we review and activate within 48h
Request Access
BLACK Annual Access
€999 / year  ·  ~$1,090 USD
Annual access · Paid in USDC or EURC · No name, no card, no bank record required.
  • Risk Parity optimization with full Covariance & Variance Matrix
  • Deleverage Modulator with continuous drawdown protection
  • Dynamic volatility-based allocation caps
  • Automatic 180-day historical data pipeline
  • Unlimited token support and portfolio optimization
  • Non-custodial privacy — no server stores your portfolio
  • Annual access only — no monthly or quarterly plans
  • Digital access — no refunds after activation [why?]
Apply for Access
--why-we-work-this-way
Why USDC & EURC only?
Credit cards and bank transfers require your name, address, and card number. We don't want that data — and we shouldn't have it. Stablecoins let us skip all of it. You pay from a wallet, we see a transaction. Nothing personal is collected or stored.
Why limited slots?
Every user who runs the engine triggers real matrix computations on real data. These operations scale with user count. We keep the base small so every member gets fast compute, reliable uptime, and direct support — not a support ticket queue.
Why no refunds?
Access is delivered the moment your key is sent — the engine is live, the pipeline starts, your slot is reserved. There is nothing to reverse. We are transparent about this before you pay, not after.
Why manual review?
We communicate directly with every member. No automated onboarding, no helpdesk. If something doesn't work for your setup, you reach a person who built the engine — not a chatbot. The review is to make sure AQMath is the right tool for you.

--frequently-asked-questions

How does the engine calculate risk?
The Black engine uses a Variance Matrix, asset Covariance, volatility estimates, and KKT-style projection to calculate Risk Parity allocations where each asset contributes a controlled share of portfolio risk. You can audit the full mathematical model in our [Documentation].
How is AQMath actually private?
We don’t track your wallet, and we never store your identity or portfolio in any database. Your token balances are stored only in your browser’s localStorage. During DCA and Optimize, position data is sent to our backend, processed in-memory, and discarded immediately — nothing is persisted. The only thing we keep server-side is a one-way hashed beta-activation record (see the beta-key question below) — never your financial data. Your financial privacy is architecturally enforced. Read the full privacy architecture in our [Documentation].
Do beta keys track my IP address?
No — not in any readable form. A beta key is tied to one device/network so it can’t be shared, but we only ever store a one-way hash of your key and a one-way HMAC fingerprint of your IP. Neither can be reversed back to your real key or IP. It exists purely to enforce one-key-one-user and to rate-limit brute-force attempts — never for tracking or profiling. Full details are in Section 8 of our Privacy Policy.
What's included in Beta vs Black?
Beta access includes the full engine — Risk Parity optimization, Deleverage Shield, DCA distribution, unlimited tokens, and the automated data pipeline. It's the same math as Black, limited to 10 slots with a 365-day activation period. Black adds annual renewals and direct support.
Why are market widgets separated from features?
Live markets are informational context: ticker data, Fear & Greed, BTC dominance, movers, and exchange status. They support decision-making but are intentionally separate from the product feature story.
What is the Safe-Haven (USDC) feature?
When enabled, USDC acts as a stablecoin buffer inside your portfolio. Any surplus from hard caps or unallocated DCA budget flows into USDC instead of being lost. Toggle it OFF to treat USDC as a normal token.
How do I apply for Black access?
DM us on Telegram or X. Annual access is €999 / year (~$1,090 USD). No call required — send a message, we review and send your activation key within 48h. Payments accepted exclusively in USDC and EURC.
Do you offer monthly plans?
No. AQMath is annual only — €999/year, no monthly or quarterly plans. All sales are final after activation because digital access is delivered instantly and fully. There is nothing to "return" once your key is live. This is standard for any software that delivers immediately on payment.
Is AQMath a trading bot?
No. AQMath is an analytical web application. We do not execute trades, manage funds, or interact with any exchange or smart contract. You see the math, you make the decision.
Is there a mobile app?
No. AQMath is a web application only. Any app using our name on any app store is unauthorized and not affiliated with us.
AQMath does not provide financial advice. All calculations are based on historical data and mathematical models.
Mathematical processing runs on our secure backend; your portfolio data is processed in-memory and never persisted.
© 2026 AQMath — Secure Backend Engine. Private. Non-Custodial.
Documentation · Impressum · Privacy & Legacy Policy · Terms · Follow: X (Twitter)
Portfolio
$0.00
Positions
0
Status
Add positions or import CSV/JSON
--allocation
Tokens
--overview
Total
$0.00
P&L
Largest
Max Drift
DCA needed
Allocation
No scheduled rebalance.
--holdings-rebalance-engine
[∅]
Portfolio empty
--portfolio-history
Automatically updated after DCA distribution.
--live-markets
--deleverage-backtesting
How it works: Upload historical price CSVs for your tokens (up to 5). The engine runs the exact same deleverage modulator (v14.0 — validated on 5-token 8.7y real data) used in production. Both strategies receive identical DCA capital on the same schedule. Buy & Hold buys tokens unconditionally and stays fully exposed. Deleverage scales exposure continuously off rising drawdown and rising downside volatility — no indicators, no timers, no correlation gate. It moves exposure toward its target at 30% of the gap per bar in either direction, with no hard floor, redeploying parked DCA cash once exposure recovers above 40%. v14 adds threshold rebalancing — only trading when target exposure drifts > 8%, cutting rebalances ~64%. It is scored on risk-adjusted return (Sharpe), not on beating Buy & Hold.
weighted 0.7 / 0.3 exit fast · re-enter slow REGIME SIGNAL drawdown ↑ + downside vol ↑ base_risk 0.7·dd_sig + 0.3·vol_sig target = 1 − risk continuous · no floor EXPOSURE exit 30%/bar · enter 25%/bar continuous DD + downside-vol modulator · v14.0 no indicators · no timers · no correlation gate
--price-data
CSV format: Header with date column (event_date/date/Date) + price column (close_price_usd/Close/price). Equal-weighted portfolio.
Token 1
Drop CSV or click
Token 2
Drop CSV or click
Token 3
Drop CSV or click
Token 4
Drop CSV or click
Token 5
Drop CSV or click
--backtest-settings
--changelog
    OUT-OF-SAMPLE VALIDATION

    New-Token Stress Test

    Generated 2026-07-21 · production v14 · no re-tuning

    We re-ran the shipped AQMath Shield on a fresh batch of coins — including ATH, SUI and XMR, which were never used to build or tune the model. The question: on coins it has never seen, does the Shield still do its job — cut the deep crashes while keeping healthy long-run growth? Across 182 equal-weight baskets (3-, 4- and 5-coin combinations) plus dead-coin and short-history stress cases, the answer is yes.

    Each basket is an equal-weight mix rebalanced on the same schedule, with an identical $1,000 start and $100 monthly top-up for both the Shield and plain Buy & Hold. Nothing about the model was changed, re-fit or re-tuned for these coins — it is the exact configuration running in production today. That makes this a clean out-of-sample read, not a backtest polished after the fact.

    182
    baskets tested
    3-5 coin equal-weight combos
    100%
    cut the crash
    smaller max drawdown vs holding (182/182)
    -45 pp
    median crash cut
    typical drawdown reduction
    1.40x
    median end value
    vs buy & hold, same DCA
    Max Drawdown: Shield vs Buy & Hold Lower is better. Production v14 modulator on baskets it was never tuned on. 0% 20% 40% 60% 80% 100% ATH/SUI/XMR 64% 16% ATH/SUI/DOGE 75% 17% ATH/XMR/BTC 48% 14% SUI/XMR/SOL 55% 19% SUI/DOGE/SOL 70% 21% ATH/SUI/XMR/DOGE/BTC 56% 15% SUI/XMR/DOGE/SOL/ADA 61% 19% XMR/DOGE/SOL/BTC 71% 25% DOGE/SOL/BTC/ETH 78% 27% XMR/DOGE/BTC/ETH/ADA 78% 29% SUI/XMR/BTC/ETH 46% 18% XMR/DOGE/SOL/BTC/ETH 70% 25% Shield (v14) Buy & Hold
    Every basket cut the crash Distribution of drawdown reduction across all 182 baskets — not one landed on the wrong side of zero. 0 14 28 43 57 1 +20 3 +25 8 +30 31 +35 49 +40 57 +45 25 +50 8 +55 crash cut (percentage points — further right = more protection)
    Growth of $1,000 + $100/mo DCA - ATH/SUI/XMR/SOL/DOGE (log scale) Same schedule for both. The Shield trades a little upside for far less pain. $803 $1,276 $2,027 $3,219 $5,113 2024-06 2024-12 2025-06 2026-01 2026-07 Shield (v14) Buy & Hold
    How deep the losses got - ATH/SUI/XMR/SOL/DOGE Depth of decline from the last peak. The Shield stays far shallower. 0% -15% -30% -45% -60% 2024-06 2024-12 2025-06 2026-01 2026-07 Shield (v14) Buy & Hold

    Stress cases

    Harder tests: a dead coin (CEL / Celsius, collapsed 2022), a very short history (PYTH), and the full 13-coin basket. Lower drawdown is better.

    BasketShield DDHold DDCrash cutShield CalmarHold CalmarDays
    SOL/SUI/DOGE/CEL(dead)20.4%72.4%+52.1 pp1.070.131173
    ATH/SOL/PYTH(short)11.9%67.5%+55.6 pp0.00-0.46767
    BTC/ETH/XMR/CEL(dead)24.0%67.3%+43.3 pp1.050.612837
    ALL 13 tokens15.1%47.5%+32.4 pp0.33-0.20767

    How to read this

    Bottom line

    On coins the model had never seen before, the Shield cut the worst drop in every single basket — a typical crash cut of roughly 45 percentage points — while still compounding to a median 1.40x the end value of simply holding. It trades a sliver of the wildest upside for far shallower, shorter drawdowns, which is exactly the job of a risk shield: keep you in the game through the crashes so the recoveries actually count.

    Past performance does not guarantee future results. Educational backtest on historical data; not financial advice. Aggregate: median crash cut -45 pp (range -23 to -59 pp), Calmar improved in 182/182 baskets, Sharpe improved in 172/182.

    Live Paper Trading — Forward Log

    Dual-speed engine on the ATH/SUI/XMR/SOL/DOGE basket: the strategic (KKT/ERC) optimizer ran once and its base weights were frozen on 2026-07-21 — it is deliberately NOT re-run daily. Every evening after the daily close, only the fast loop runs: fetch clean prices, apply the frozen weights, let the v14 Deleverage Shield adjust risky exposure, and append one point to this curve. Next strategic re-optimisation: 2027-01-17 (180-day cycle). Same $1000 start + $100/30d DCA schedule as the study above.

    $3,304
    virtual equity
    as of 2026-07-25 · $3,500 invested
    27%
    risky exposure
    shield active (defensive)
    -0.15
    Calmar ratio
    annual return / max drawdown (17.7%)
    -0.23
    Sharpe ratio
    risk-adjusted return, 5% risk-free
    4
    forward days
    logged since the freeze — no re-tuning
    2027-01-17
    next re-optimisation
    macro loop, 180-day cadence
    Virtual Equity — Live Paper Trading (log scale) Left of the amber line: historical simulation. Right of it: the live forward log on frozen weights — updated after every daily close. $815 $1,277 $2,002 $3,137 $4,918 2024-06 2024-12 2025-07 2026-01 2026-07 ▼ WEIGHTS FROZEN 2026-07-21 forward log → Virtual Equity Buy & Hold Invested (DCA)
    Drawdown — Deleverage Shield vs Buy & Hold Distance below the last equity peak. Shallower green dips = the Shield doing its job. -0% -16% -32% -49% -65% Deleverage (paper account) Buy & Hold 2024-06 2024-12 2025-07 2026-01 2026-07
    Deleverage Shield — risky exposure 100% = fully deployed. Dips = capital moved to stablecoin during market shocks. 0% 25% 50% 75% 100% 2024-06 2024-12 2025-07 2026-01 2026-07

    Current Portfolio — token quantities

    What the paper account holds at the last close (2026-07-25): the frozen base weights sized by the Shield's current risky exposure. The rest is parked in stablecoin.

    AssetFrozen weightClose priceQuantityValue% of equity
    DOGE32.7%$0.073017.362401$209.956.4%
    SUI25.6%$0.71231.244753$164.375.0%
    XMR23.9%$365.520.419454$153.324.6%
    SOL17.8%$73.911.55113$114.643.5%
    ATH0.0%$0.000$0.000.0%
    USDC (stablecoin)$1.002,662.01$2,662.0180.6%

    Paper trading — no real funds. Telemetry generated 2026-07-25 by the daily loop (deleverage v14.0, weights v1 frozen 2026-07-21). Past performance does not guarantee future results; not financial advice.

    System Documentation

    AQMath Quantitative Portfolio Rebalancer — Technical Reference
    v1.0 — June 2026

    1. What is AQMath?

    AQMath is a quantitative portfolio rebalancer purpose-built for the crypto market. It combines institutional-grade mathematical models — the same class of optimization used by multi-billion-dollar hedge funds — with a privacy-first architecture that ensures your financial data never leaves your control.

    At its core, AQMath solves a deceptively complex problem: when you add new capital to your crypto portfolio, which tokens should you buy, and how much of each? A naive approach (split equally) ignores that some positions are already overweight while others are dangerously underweight. AQMath’s DCA engine uses smart proportional allocation, filtered through a DCA safety pipeline, to ensure every dollar you invest moves your portfolio closer to its optimal structure.

    The system operates on a hybrid architecture: your portfolio data (token amounts, entry prices, targets) is stored exclusively in your browser’s localStorage, while computationally intensive math (covariance matrices, DCA allocation planning, volatility analysis) runs on our secure backend engine. This means you get institutional-quality analysis without your holdings being stored on any server.

    🔐 NON-CUSTODIAL PRIVACY

    AQMath’s privacy model is non-custodial by design: the backend receives position data in-memory during a single DCA request, computes the result, and discards everything. No persistence. No logs of your amounts. No database of your identity or portfolio. Your financial state lives exclusively in your browser’s localStorage — the server never retains it.

    1.1 Who Is AQMath For?

    AQMath is designed for a specific type of crypto investor:

    • Passive DCA investors who regularly add capital and want to know the mathematically optimal way to distribute it across their portfolio — not just “buy more BTC” but “buy more of whatever is most underweight right now.”
    • Long-term holders who believe in their token thesis (6–18+ months) but want to avoid emotional rebalancing decisions driven by market hype or fear.
    • Privacy-conscious users who refuse to connect wallets, hand over API keys, or trust a centralized service with their portfolio data. AQMath requires zero accounts, zero wallet connections, and zero data sharing.
    • DeFi participants who hold tokens across multiple chains and wallets and need a unified view with quantitative allocation — without giving any single service visibility into their total exposure.
    • Risk-aware allocators who understand that a 30% position in a single altcoin is not “diversified” just because it has a high target — and want structural limits (hard caps, risk budgets, circuit breakers) enforced automatically.

    AQMath is not a trading bot. It does not execute trades, predict prices, or time the market. It is a mathematical allocation engine that tells you exactly how to distribute new capital for maximum portfolio balance — and then gets out of your way.

    2. System Architecture

    AQMath uses a hybrid architecture that separates data ownership from computational power. Your browser owns the data; the backend owns the math. This is fundamentally different from traditional portfolio tools that store everything on centralized servers, creating a single point of failure and a tempting target for data breaches.

    System Architecture Diagram
    BROWSER (localStorage) Portfolio: amounts, targets Entry prices, cost basis OHLC history via backend (180d) DCA results → updated amounts Safe-Haven toggle, ATH tracker positions during DCA prices + risk weights SECURE BACKEND ENGINE DCA Distribution Engine AQMath Engine (Black) Circuit Breaker + Hard Caps Volatility Calculator Safety Factor + Trend Filter EXTERNAL APIs Binance (live prices) CoinGecko (OHLC history) Data Pipeline (OHLC) PRIVACY BOUNDARY Positions sent during DCA, never stored. Amounts sent only during DCA, never stored. No server-side persistence.

    2.1 Data Flow

    Understanding the data flow is critical to understanding AQMath’s privacy guarantees. Every interaction follows the same pattern: your browser sends the minimum information needed for computation, and the backend returns results without retaining any state.

    1. User enters tokens + targets → stored exclusively in browser localStorage. No network request is made.
    2. SYNC clicked → live spot prices are pulled from Binance’s public market data (CoinGecko as fallback) — read-only market data. Your holdings are never transmitted.
    3. DCA Distribute clicked → positions (including amounts) and DCA budget are sent to the backend engine via a single HTTPS POST request.
    4. Backend computes → the DCA engine builds a plan-based proportional allocation, filtered through the full safety pipeline. All computation happens in-memory. Nothing is written to disk or database.
    5. Results returned → updated token amounts are sent back to the browser and written to localStorage. The backend discards the request data immediately after responding.

    2.2 Data Cleaning Pipeline

    Before price data reaches the optimization engine, it passes through a multi-stage cleaning pipeline that ensures mathematical integrity. Raw market data from multiple sources (CoinGecko, Kraken, Coinbase) is often noisy — containing duplicates, exchange-specific outliers, and occasional gaps. The cleaning pipeline applies four sequential filters:

    1. Deduplication — removes duplicate timestamps, keeping the latest entry per date.
    2. Outlier Removal — rejects prices that deviate more than 2 standard deviations from a 7-day rolling window, eliminating flash-crash spikes and stale quotes.
    3. Gap Interpolation — fills gaps of 2 days or fewer using linear interpolation, preserving trend continuity.
    4. Multi-Source Merge — when the same token is collected from multiple exchanges, the median price is used to eliminate exchange-specific bias.

    This pipeline runs daily at 01:00 UTC via a scheduled cron job. The result is a clean, continuous price series suitable for covariance and volatility calculations.

    2.3 Non-Custodial Privacy Model

    AQMath’s privacy architecture is non-custodial by design. The backend processes your DCA request statelessly — it receives position data, computes optimal allocation, returns results, and discards everything from memory. No persistent record of your holdings is ever created server-side:

    • No portfolio or financial database exists — there is nothing to hack, leak, or subpoena
    • No portfolio amounts are logged or stored server-side after a DCA response
    • No wallet addresses, API keys, or identity information is ever collected
    • The backend cannot reconstruct your portfolio even if it wanted to — it simply doesn’t retain the data
    • Your browser’s localStorage is the single source of truth for your financial state
    🔐 WHY THIS MATTERS

    In 2023–2025, multiple centralized portfolio trackers suffered data breaches exposing user holdings. With AQMath, a server breach would reveal nothing about your portfolio — because there is nothing to find. Your financial sovereignty is guaranteed by architecture, not by promises.

    3. Portfolio Tracking

    Your portfolio is a collection of token positions stored entirely in your browser’s localStorage. For each token, AQMath tracks your holdings, target allocation percentage, current price, staking yield, entry price history, and DCA cost basis. Together, these parameters form the complete state of your portfolio and drive every calculation in the system — from allocation metrics to risk budget enforcement.

    Portfolio Position Overview (example)
    PORTFOLIO TOTAL: $100,000 BTC Bitcoin 0.45 BTC target: 25% current: 27% ETH Ethereum 12.5 ETH target: 20% current: 15% USDC USD Coin 20,000 USDC target: 25% current: 20% P&L +18% +24% 0%

    3.1 Position Metrics

    Every time the UI renders or a DCA calculation runs, the system computes real-time metrics for each token. It measures how much each position is currently worth, what share of your total portfolio it represents, and how far it has drifted from your intended target.

    The DCA engine uses delta — the dollar gap between where a token is and where it should be — to prioritize which tokens receive new capital first. Tokens that are most underweight relative to their target get funded first. Safe-haven tokens (stablecoins) bypass this filter entirely and always receive capital when designated.

    3.2 P&L Tracking

    Profit and loss is tracked against your cost basis — the true dollar-cost-averaged entry price across all purchases. As the DCA engine buys more tokens over time, it accumulates your cost basis and total tokens acquired, giving you an accurate average price and return percentage for each position.

    4. DCA Distribution Engine

    The DCA engine is the heart of AQMath. Given a budget (e.g., $500), it determines exactly how to distribute that capital across your portfolio’s underweight tokens — not equally, not randomly, but proportionally to how far each token is from its target, adjusted for risk.

    The engine builds an allocation plan without ever touching your actual tokens: it hands each token a share of the budget in proportion to how far it sits below its target, adjusted for risk. Tokens that reach their target drop out and their share is redistributed to the rest. Every planned buy must clear a per-token minimum (default $20) — any buy that would fall below that floor is dropped and its budget re-planned across the remaining tokens, so you never place fee-eating sub-dollar buys.

    DCA Budget Flow (example: $500)
    $500 DCA Budget DCA ENGINE DCA safety pipeline plan-based allocation non-custodial BTC +$142 ETH +$89 SOL +$54 USDC +$215 ✓ on target ▼ underweight ▼ underweight ▶ safe-haven

    4.1 How It Works (High-Level)

    Before any allocation happens, each token is evaluated through the DCA safety pipeline (see Section 5). Only tokens that pass all filters are eligible to receive DCA funds. The allocation then follows a simple principle: the more underweight a token is relative to its target, the larger share of new capital it receives — tempered by a risk adjustment that reduces allocation for highly volatile assets.

    After each round, cost basis and token counts are updated automatically. Over multiple DCA cycles, the engine naturally balances your portfolio toward its ideal allocation.

    4.2 Small DCA Rule

    When the DCA budget is very small, the engine allocates the entire amount to the single most underweight eligible token.

    📊 WHY SINGLE-TOKEN FOR SMALL AMOUNTS

    If you DCA $20 across 5 tokens, each gets $4 — likely below exchange minimums, and fees would consume a significant percentage. The small DCA rule puts the full $20 into the token that needs it most. Over multiple DCA cycles, the algorithm naturally balances across all tokens. The same fee-avoidance logic applies to larger budgets: every buy must clear a configurable per-token minimum (default $20) — any token whose share would fall below that floor is skipped and its budget redistributed to the more underweight tokens, so even a $500 DCA never places tiny sub-dollar buys.

    5. DCA Safety Pipeline

    AQMath implements a multi-layer safety pipeline for DCA allocation designed for crypto markets. Traditional systems would halt trading on a 15% dip — but in crypto, 15–20% pullbacks happen regularly and are often excellent buying opportunities. Each layer operates independently and in strict sequence. Note: This pipeline governs only how new DCA capital is allocated — it does not trim or sell existing positions.

    DCA Safety Pipeline
    L1 Circuit Breaker pauses DCA while Shield is defensive (exposure below redeploy) L2 Safety Factor reduces buy size for volatile assets L3 Trend Filter enforces buy-the-dip discipline L4 APY Filter skips self-sustaining tokens L5 Hard Caps max concentration per token L6 Risk Budget caps total risky exposure L7 Safe-Haven Redirect surplus flows to stablecoin

    L1 — Circuit Breaker

    The circuit breaker halts all DCA distribution whenever the Deleverage Shield is in its defensive state — when target exposure drops below the redeploy threshold (~40% of the risk budget). Because exposure is driven mostly by drawdown and downside volatility, it engages during any meaningful downturn, not only brief flash crashes, and stays paused through a sustained bear market. It resumes automatically once exposure recovers back above the threshold.

    L2 — Safety Factor

    A per-token risk adjustment that reduces buy size for high-volatility assets. More volatile tokens receive proportionally less capital, ensuring that risky positions don’t get outsized allocations even when they’re the most underweight.

    L3 — Trend Filter

    Skips tokens currently trading above their moving average — effectively enforcing a “buy the dip” discipline. Capital flows to tokens during pullbacks, not during rallies.

    L4 — APY Filter

    Tokens earning high staking yields compound on their own and are excluded from DCA distribution. The engine redirects that capital to lower-yield tokens that need active injection.

    L5 — Hard Caps

    No single risky token can exceed a structural concentration limit. If allocation would push a token beyond this cap, the excess is trimmed and redirected to the surplus pool.

    🔧 DYNAMIC CAPS (Black Feature)

    The Black engine replaces the flat cap with volatility-adaptive limits: high-volatility tokens receive smaller caps (as low as 10%), while low-volatility tokens can hold larger positions (up to 40%). Each token’s maximum weight is dynamically scaled between 10% and 40% based on how volatile it is relative to the most volatile token in the portfolio. The more volatile a token, the tighter its cap.

    L6 — Risk Budget

    Total risky exposure is capped at a percentage of your portfolio, ensuring a safety buffer always exists. If risky tokens exceed the budget, all allocations are scaled down proportionally.

    L7 — Safe-Haven Redirect

    All surplus capital from hard caps and risk budget scaling flows into your designated stablecoin. This capital sits in a safe buffer until you decide to redeploy it through DCA.

    6. Volatility Calculation

    Volatility is the foundational risk metric used throughout AQMath. It feeds into the safety factor, the circuit breaker threshold, and (in Black) the covariance matrix. The system computes a rolling volatility estimate for each token by measuring the magnitude of daily price swings — a standard approach in quantitative finance.

    6.1 Portfolio Volatility

    Portfolio-level volatility is a weighted aggregate of each token’s individual volatility, proportional to its share of total portfolio value. Safe-haven tokens and frozen positions are excluded since they have near-zero volatility by definition. This portfolio-level metric drives adaptive thresholds across the entire safety pipeline.

    📘 COVARIANCE MATRIX (Black Feature)

    The Black engine computes a full covariance matrix estimating how assets move together. Two tokens with moderate individual volatility but high correlation (like ETH and SOL) have amplified combined risk. The optimizer uses this to ensure each asset contributes equal risk — preventing hidden concentration through correlation.

    8. AQMath Engine (Black)

    The AQMath Engine is the Black-tier optimization layer that sits alongside the DCA engine. While the DCA engine distributes a fixed dollar budget, the AQMath Engine answers a deeper question: what should the target weights themselves be? It uses institutional-grade quantitative methods — the same class of algorithms deployed by multi-billion-dollar hedge funds — to compute mathematically optimal portfolio weights from first principles.

    The engine runs a three-stage pipeline: it builds a full covariance matrix from 180 days of cleaned price history, solves for Equal Risk Contribution (true Risk Parity), and applies KKT projection with dynamic volatility caps to enforce structural limits.

    AQMath Engine Pipeline
    COVARIANCE 180 days of prices Risk matrix ERC SOLVER Equal Risk Contribution Equal risk weights KKT PROJECT Dynamic caps (10–40%) 60% risk budget WEIGHTS new targets

    8.1 Equal Risk Contribution (ERC)

    Traditional portfolio optimization (Markowitz mean-variance) requires estimating expected returns — a notoriously unreliable process that amplifies estimation errors into extreme allocations. Risk Parity sidesteps this entirely by optimizing for equal risk contribution rather than equal weight or maximum return.

    The ERC solver uses a fixed-point iteration algorithm that converges to weights where each asset contributes exactly an equal share of total portfolio risk. The process works as follows:

    • Each token’s risk contribution is calculated by multiplying its weight by its marginal contribution to overall portfolio volatility.
    • The solver repeatedly adjusts weights — increasing allocation to tokens that contribute too little risk, decreasing those that contribute too much.
    • The algorithm typically converges to a stable solution within 5–15 iterations.

    The result is a portfolio where BTC and a small-cap altcoin each contribute the same amount of risk — preventing any single asset from dominating your portfolio’s volatility profile, even if it has the largest allocation.

    8.2 KKT Projection & Structural Limits

    The raw ERC weights may violate real-world constraints (e.g., a 35% allocation to a single token). The KKT projection step enforces structural limits through iterative clipping:

    • Dynamic per-token caps — each token’s maximum weight is computed from its volatility. The more volatile a token is compared to the rest of the portfolio, the tighter its cap (as low as 10%). Stable, low-volatility tokens can hold up to 40%.
    • Risk budget — total risky exposure is capped at 60%. If ERC weights exceed this, all allocations are scaled down proportionally.
    • Minimum floor — tokens below 1% are removed, preventing dust allocations.
    • Surplus redistribution — capital freed by capping is redistributed to uncapped tokens proportionally.

    The projection runs iteratively (up to 10 rounds) until all constraints are simultaneously satisfied.

    8.3 Correlation & Covariance Analysis

    The engine computes a full NxN covariance matrix from 180 days of cleaned, aligned price history. This matrix captures not just individual asset volatility but how assets move together. Two tokens with moderate individual volatility but high correlation (e.g., ETH and SOL tend to move in the same direction 85% of the time) have amplified combined risk — a relationship that simple weight-based allocation ignores entirely.

    The AQMath Engine returns:

    • Covariance matrix — upper-triangle annualized covariances for all token pairs
    • Top correlations — the 6 highest-correlated pairs, sorted by correlation strength
    • Portfolio volatility — the aggregate annualized volatility after KKT projection
    • Per-token diagnostics — ERC weight, KKT weight, risk contribution, volatility, dynamic cap, and capped status
    📈 WHY RISK PARITY MATTERS

    A naïve equal-weight portfolio of BTC + SOL + DOGE allocates 33% each. But DOGE’s volatility is roughly 3x BTC’s, meaning DOGE contributes ~60% of total portfolio risk despite holding only 33% of value. ERC automatically corrects this: it would allocate ~55% to BTC, ~25% to SOL, and ~20% to DOGE — ensuring each token genuinely contributes one-third of the risk.

    8.4 Deleverage Modulator

    The Deleverage Modulator is a continuous de-risking mechanism that scales exposure down as portfolio drawdown and downside volatility rise — no indicators, no timers, no correlation gate. Unlike simple "pause DCA" strategies that only stop new purchases, the modulator performs true portfolio de-risking — it scales down ALL existing positions proportionally, moving capital into stablecoins (USDC) as the regime deteriorates.

    ⚠ TRUE DE-RISK vs PAUSE BUTTON

    As the regime deteriorates, the modulator does two things simultaneously: (1) reduces all existing token positions by scaling their weights down proportionally — this is the actual "selling" of exposure; (2) reroutes all new DCA contributions into USDC while defensive. A strategy that only pauses DCA while letting existing positions ride through a -80% crash is not a shield — it’s just a pause button.

    How It Works

    • Two-signal regime read — the engine tracks only rising drawdown and rising downside volatility over a 20-day window. No moving averages, no timers, no correlation gate.
    • Continuous scaling — target exposure = 1 − (0.7·dd_sig + 0.3·vol_sig), a smooth 0–100% dial rather than discrete tranches. There is no hard floor: in a deep, volatile crash exposure can approach zero.
    • Capital preservation — while defensive the portfolio holds the majority in cash-equivalent (USDC), absorbing only a fraction of ongoing crash damage. Exposure scales continuously with the regime, holding cash when drawdown and downside volatility are elevated.
    • Steady ramp, trade less — exposure moves toward its target at 30% of the gap per bar, whether de-risking or re-entering. To avoid over-trading, v14 only rebalances when the target drifts more than 8% from the position it is holding — this deadband (not a slower re-entry) is what prevents whipsaw, cutting turnover ~64%. Parked DCA cash redeploys once exposure recovers above 40%.
    Deleverage Modulator Lifecycle
    NORMAL High exposure DCA active low dd + vol risk budget: 95% dd↑ vol↑ exit fast DE-RISK Positions scaled down DCA → USDC 30% of gap / bar no hard floor HEAL regime eases RE-ENTER 30% of gap / bar Steady ramp hysteresis no whipsaw REDEPLOY Parked USDC back in Building position exposure ≥ 40% 106 DCA events FULL 100% deployed Normal ops risk on low dd + vol
    Deleverage Modulator: Exposure & USDC Timeline
    100% 50% ~0% EXPOSURE USDC risk budget ~0% (no hard floor) DE-RISK re-enter redeploy 100% DE-RISK minimal USDC USDC ↑ re-entering → USDC drains USDC ↑ 2017 2018 2020 2022 2025 normal exposure de-risk re-enter redeploy full recovery

    The shield’s effectiveness comes from asymmetric crash math: during a -80% market crash, a shielded portfolio (with minimal exposure) loses only a fraction of that damage. When the market eventually recovers, the preserved capital base compounds — leading to dramatically better long-term outcomes compared to holding through the full crash.

    8.5 Performance: Drawdown & Risk-Adjusted Scoring

    The chart below compares the Deleverage Modulator against a classic Buy & Hold strategy over an 8.7-year, 5-token backtest spanning multiple bull/bear cycles (including the 2022 crypto winter and 2024 corrections). Both strategies receive identical DCA capital on the same schedule for a methodologically fair comparison. The curves track peak-to-trough drawdown — how deep each strategy fell from its highs. The modulator is scored on risk-adjusted return (Sharpe) and drawdown; the v14 preset now beats Buy & Hold on Sharpe, though not on raw dollars.

    Peak-to-Trough Drawdown · Deleverage Modulator vs Buy & Hold (v14.0)
    0% -50% -100% -83.8% B&H -35.0% modulator Buy & Hold Deleverage Modulator
    📊 BACKTEST METRICS (8.7 YEARS, 5 TOKENS)
    Modulator Max Drawdown
    35.0%
    B&H Max Drawdown
    83.8%
    Drawdown Reduction
    −48.8pp
    Sharpe (Modulator vs B&H)
    0.93 vs 0.75
    CAGR (8.7y)
    32.9%
    Regime Signal
    drawdown + downside vol

    A fraction of the pain, and now a higher Sharpe. Across the full 8.7-year, 5-token backtest the modulator cut peak drawdown from 83.8% (Buy & Hold) to 35.0% — a 48.8-point reduction — while lifting Sharpe from 0.75 (Buy & Hold) to 0.93 at 32.9% CAGR. Exposure is a continuous 0–100% dial driven only by drawdown and downside volatility: it moves toward its target at 30% of the gap per bar in either direction, and redeploys parked USDC once exposure recovers above 40%. v14 adds threshold rebalancing — only trading when target exposure drifts > 8%, cutting rebalances ~64% with an identical signal. There are no timers, no tranches, and no correlation gate.

    Honestly scoped: this does not beat Buy & Hold on raw dollars. Buy & Hold ends the sample higher in absolute value because it stays fully exposed through the bull run — the modulator is not designed to win that race. Its edge is risk-adjusted: less than half the drawdown and a higher Sharpe (0.93 vs 0.75). Crucially this edge is not only in-sample: on a sealed second half of the data never used to choose the v14 preset, the modulator still cut peak drawdown from ~63% to ~24% and kept a higher Sharpe (0.48 vs 0.37) at a comparable total return. Methodology note: the backtest basket is composed of tokens that survived to today (survivorship bias); we stress-tested that directly by dropping a dead token — Terra Classic (LUNC), which fell from ~$121 to ~$0 — into the basket, and the modulator’s peak drawdown barely moved (~23%) while Buy & Hold’s worsened by up to ~18 points. Past results do not guarantee future performance.

    8.6 Testing & Validation

    The v14.0 Deleverage Modulator was measured on real market data, not hand-guessed. We replayed the full 8.7-year, 5-token price history through the exact production formula — a continuous exposure dial driven only by drawdown and downside volatility — and scored it on drawdown, Sharpe, and CAGR.

    ✅ VALIDATED ON REAL DATA

    Over ~8.7 years (3,184 days) of real market data across 5 tokens (ADA, BNB, ETH, XRP, XLM) — spanning the 2018 and 2022 bear markets — the modulator cut peak drawdown from 83.8% to 35.0% and lifted Sharpe from 0.75 to 0.93 at 32.9% CAGR. The modulator is out-of-sample honest: on a sealed second half never used to pick the preset, it still roughly halved drawdown (~24% vs ~63% Buy & Hold) at a higher Sharpe (0.48 vs 0.37).

    Validation Process

    • Signal construction — each bar we compute rolling drawdown from the running equity peak and downside volatility over a 20-day window, then map each to a 0–1 signal (dd_sig, vol_sig).
    • Exposure formula — target exposure = 1 − (0.7·dd_sig + 0.3·vol_sig), a continuous dial with no hard floor and no correlation gate.
    • Hysteresis + threshold rebalancing — exposure moves toward target at 30% of the gap per bar in either direction, and (v14) only trades when the target drifts more than 8% from the held position — ~64% fewer rebalances with an identical signal. Parked USDC redeploys once exposure recovers above 40%.
    • Engine/backtester parity — the same formula runs in the Python engine (deleverage.py) and the server-side backtester, verified to produce matching drawdown and Sharpe on the full sample.
    Backtest Results: Drawdown Reduction
    Buy & Hold 83.8% Max DD -48.8pp Deleverage v14.0 35.0% Max DD Sharpe: 0.75 full exposure 8.7y real data Sharpe: 0.93 CAGR: 32.9% Final $493.8k v14.0 · FULL-SAMPLE

    Validation Checks

    The modulator is validated through the following checks on the full 8.7-year, 5-token sample:

    • Formula parity — the Python engine (deleverage.py) and the server-side backtester produce matching exposure, drawdown, and Sharpe.
    • Drawdown reduction — peak drawdown cut from 83.8% (Buy & Hold) to 35.0%.
    • Beats Buy & Hold on Sharpe — Sharpe 0.75 → 0.93 at 32.9% CAGR.
    • Threshold rebalancing — a steady 30% of gap/bar ramp in either direction, trading only on > 8% exposure drift (~64% fewer rebalances), confirmed with no whipsaw.
    • Out-of-sample check — on a sealed second half never used to pick the preset, the modulator still roughly halved drawdown (~24% vs ~63% Buy & Hold) at a higher Sharpe (0.48 vs 0.37); a fuller walk-forward multi-fold study is still worthwhile.
    • Survivorship stress (dead token) — adding Terra Classic (LUNC), which collapsed from ~$121 to ~$0, to the basket left the modulator’s peak drawdown essentially unchanged (~23%), while Buy & Hold’s worsened by up to ~18 points; on the same window the modulator still cut drawdown ~49 points versus Buy & Hold. The drawdown defense does not depend on hand-picking surviving tokens (though raw return figures remain flattered by crypto’s post-crash rebounds).

    9. Privacy & Data Separation

    AQMath’s privacy is not a feature bolted onto the product — it’s the foundational architectural principle. The system is designed so that your financial data is mathematically isolated from the computation layer.

    🔵 Stays in Browser (localStorage)

    • All token amounts and quantities
    • Entry prices and cost basis
    • Target allocation percentages
    • DCA history and portfolio snapshots
    • Safe-haven toggle state
    • Portfolio ATH tracker
    • 30-day price history cache
    • Beta key JWT token

    🟢 Backend Receives (DCA & Backtest, Ephemeral)

    • Token symbols (e.g., BTC, ETH)
    • Current amounts and prices
    • Target percentages
    • DCA budget amount
    • Cost basis and total tokens
    • Frozen and safe-haven flags
    • Backtest price series (CSV you upload) — processed in-memory, then discarded

    9.1 What the Backend NEVER Sees

    This is the most critical section. The following data is architecturally impossible for the backend to access:

    🔒 ARCHITECTURAL PRIVACY GUARANTEES

    No database table maps users to portfolios. No log file records your holdings. Even with full server access, an attacker would find zero information about any user’s financial state.

    DataWhy Backend Can’t See It
    Wallet addressesNever entered — AQMath doesn’t connect to wallets
    Exchange API keysNever requested — price sync uses public endpoints
    Transaction historyNever transmitted — only current state during DCA
    User identityNo accounts, no email, no registration
    Total portfolio valueSent during DCA but never persisted
    Historical allocationsSnapshots exist only in localStorage
    Entry pricesSent during DCA for avg calc but not stored
    Beta key identityJWT validated but not linked to portfolio data

    The backend processes your DCA request in a single HTTP round-trip: receive positions → compute allocation → return results → discard. There is no database table that maps users to portfolios. There is no log file that records your holdings. Even if someone gained full access to the server, they would find zero information about any user’s financial state.

    9.2 Non-Custodial Privacy Model

    AQMath implements a practical non-custodial privacy model:

    • The backend proves that the DCA allocation is mathematically optimal through detailed buy summaries (e.g., “BTC: +$142.30 (0.002371 tokens)”).
    • The backend does not retain the inputs. After the HTTP response is sent, the request data is garbage-collected from memory. No disk write. No database insert.
    • The browser verifies the results by applying updated amounts and re-rendering the portfolio.

    The backend does not retain your data after the HTTP response is sent — request data is garbage-collected from memory with no disk write, no database insert, and no logs of your holdings. Your portfolio lives in your browser’s localStorage, and nowhere else.

    🔐 COMPARISON WITH TRADITIONAL TOOLS

    Traditional trackers store everything on centralized servers — one breach exposes all users. AQMath stores nothing server-side. No accounts, no wallet connections, no analytics tracking. Your portfolio lives in your browser, and nowhere else.

    FeatureTraditional TrackersAQMath
    Data storageCentralized server databaseBrowser localStorage only
    Account requiredEmail + password + often KYCNone — zero registration
    Wallet connectionOAuth or wallet connectNever — manual input only
    Breach riskSingle DB exposes all usersNothing to breach
    Data portabilityExport via API (if allowed)JSON export/import from localStorage
    Analytics trackingGoogle Analytics, MixpanelSimple Analytics (privacy-first)

    AQMath gives you the computational power of a quantitative hedge fund’s allocation engine while maintaining the data sovereignty of a paper notebook.