OpenChart
Free Desktop charting with Claude or Codex. Describe alerts, research chart moves, and choose your data providers.
An interactive portfolio case study exploring DeFi market stress, liquidation risk, and decision-support analysis.
Translation pending
FinanceJupyter Notebook · TypeScriptGitHub @RahilBhavanOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Stop-loss stress test of one day of hourly ETH data against illustrative Aave V3 and Morpho parameters.
Translation pending
Taken from the repository README
Loading the full README.
Read the full README ↗Live: summer-fi-risk-analysis.vercel.app
This is an independent portfolio case study. A small Python model replays 24 hourly ETH price and gas observations for 5 August 2024 against static stop-loss buffers. It uses illustrative Aave V3 and Morpho parameters. A Next.js page lets a reader change the market, entry LTV and buffer and see the outcome. The repository is not affiliated with Summer.fi, Aave or Morpho.
All numbers come from data/aug_5_crash_data.csv and reports/sweep_results.csv.
scripts/risk_model.py holds a DeFiRiskModel. At each hourly row it computes LTV as debt / (collateral x price). It checks the liquidation threshold first, then the stop-loss trigger (threshold minus buffer). Gas does not change LTV. It adds slippage (0.1% + gas/100 x 0.5%, capped at 5%) and a fixed 300,000-gas cost to the modeled exit value. Only a static strategy exists. web-showcase/src/app/riskModel.ts mirrors the model for the interactive page, and tests/test_ts_parity.py checks that both give the same status, trigger hour and exit values. notebooks/aug5_analysis.ipynb plots the data and the sweep, with its executed output committed.
Needs Python 3.14 (the version tested; pandas==3.1.0 needs 3.11 or newer) and Node 22.18 or newer (the parity test runs the TypeScript model with Node's built-in type stripping). No network or keys are needed after install.
python3 -m venv .venv && . .venv/bin/activate
pip install -r requirements.txt
python -m pytest tests # 13 tests passed on 2026-10-24
python scripts/risk_model.py --combined-sweep # rewrites reports/sweep_results.csv (identical to the committed file)
python scripts/risk_model.py --protocol AaveV3 --ltv 0.70 --buffer 0.05
jupyter nbconvert --to notebook --execute notebooks/aug5_analysis.ipynb --stdout > /dev/null
cd web-showcase
npm ci
npm run lint && npm run build
npm run dev
data/: the 24-row hourly price and gas CSV.scripts/: the Python risk model and command-line entry point, plus the Node helper the parity test calls.tests/: 13 pytest tests: the Python model, and its agreement with the TypeScript model.notebooks/: plots of the data and the sweep.reports/: the sweep CSV and a written backtest report.web-showcase/: the Next.js case-study page and docs viewer.reports/backtest_report_aug5.md: assumptions, sweep counts and limits.CONSULTING_REPORT.md: the case-study write-up and recommendation.PROJECT_OVERSIGHT.md: scope notes for the workstream.The CSV is described as a "supplied scenario". Its source is not recorded in this repository, and I have not checked it against on-chain or exchange data. Treat the prices and gas values as illustrative inputs, not as a market record.
tests/test_ts_parity.py compares it with the Python model on the 50-run sweep grid and four off-grid inputs. It does not prove the two agree on every input./docs.MIT, see LICENSE. It covers this project's code, not the supplied scenario data, whose source is uncited.
Part of Rahil Bhavan's projects.