Comparison with existing algorithms
Last updated
Last updated
For now we have seen some examples of implementing PDN autorebalance. Let's consider cases of Alpaca finance, DeltaOne protocol and add one more algorithm to list. Algorithms differ in approach to rebalance trigger condition:
Alpaca calculate position's Debt Ratio, dividing borrowed amounts by assets in farming pool, and when it becomes larger than some threshold, rebalance.
DeltaOne's auto-rebalancer triggers, when absolute price percent change after last rebalance is higher than some threshold.
Approach, that we although want to test is based on calculation of delta deviation. DeltaDiv = (volatile asset amount in farming - volatile asset borrowed)/(volatile asset amount in farming). When DeltaDiv absoluta value is higher than some threshold, we rebalance.
To test It we've taken last 3 months' price data of SOL/USDT Raydium pair and calculated max drawdowns, annualized returns and Sharpe Ratios. Using 30% pool APY, 12.3% SOL borrow rate, 8% USDT borrow rate. From 3 months period we extracted batch of 1 month periods using rolling window with week step. On that samples we calculated mentioned metrics for every rebalance method and corresponding threshold and averaged it over batch.
As we can see, the best result are obtained with 13% delta deviation threshold. 25% price move looks good too. It's reasonable to mention, that relatively good period was taken for testing. The next thing we'll do is try to mine or approximate "bad periods" data: while IL is large, trading fees can increase to offset it. If It's impossible, we'll focus on finding perfect moment for farmers to exit positions before incurring losses.