Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
f030eeb to
5ec01ca
Compare
5ec01ca to
1615635
Compare
zhangchiqing
reviewed
Apr 8, 2026
| directMintYT: true | ||
| ) | ||
|
|
||
| access(all) let btc_daily_2022_bear_expectedLiquidationCount: Int = 0 |
Member
There was a problem hiding this comment.
For bear market, it triggers no liquidation?
And why do we use a different HF range (1.1-1.3), instead of the standard (1.1-1.5)? But with 1.1-1.3, a 10% price drop should be enough to trigger liquidation. no?
access(all) let btc_daily_2022_bear_agents: [SimAgent] = [
SimAgent(
count: 1,
initialHF: 1.20000000,
maxHF: 1.30000000,
minHF: 1.10000000,
targetHF: 1.20000000,
debtPerAgent: 133333.00000000,
totalSystemDebt: 20000000.00000000
)
]
Contributor
Author
There was a problem hiding this comment.
why do we use a different HF range (1.1-1.3)
This is an example of surviving the 2022 market which requires a different HF then the standard. You can see the standard version suffers 2 liquidations.
Triggering liquidation is dependent on the HF on the day, it just happens that with this config we are usually at target (1.2) for most major price drops.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes: #221
Description
Verifies 0 liquidations under historical daily BTC data from 2021-2025 (2022 only survives under certain HFs, see this comment). All simulations use
1.3/1.5/1.3/1.1(initial/max/target/min) default health factors.Supports manual liquidation of positions, bringing HFs back to
1.04.Note: uses default strategy health factors instead of the ones specified in the python simulations.
Test Outputs
2021
2022
2023
2024
2025
For contributor use:
masterbranchFiles changedin the Github PR explorer