MultiversX Tracker is Live!

A weighted DCA strategy

All Cryptocurrencies

by COINS NEWS 270 Views

A weighted DCA strategy

This sub loves DCA and we also love buying dips. So I thought I'd share the algorithm that I use for my weighted DCA strategy. DCA allows us to buy more units at lower prices due to even payments at each time period but what if we alter the payment size depending on the asset price? This will allow us to buy even more assets at lower prices, especially in a crabbing market with BTC pissing about between 30-40K for the past month or so. I'll apply this strategy to BTC but I personally use it with all of the assets that I am accumulating. Let's get to it.

Before we start, we need to decide on some parameters, namely:

- the maximum price we want to pay for BTC, P_max;

- the minimum price we assume BTC may reach during the period, P_min;

- minimum payment each period, D_min;

- maximum payment each period, D_max.

Say I have $10000 that I want to invest over the next 6 months, but I'm willing to put it in within the next 3 months if prices are low enough. Then, if I'm making weekly purchases, my minimum and maximum payments would be 10000/26 = 384.61 and 10000/13=769.23, lets round to $385 and $770.

A reasonable max price to pay for BTC would be $40000, and a floor guess of $20000.

So we want a function that will increase as price decreases. We could pick a simple linear function, but we want to conserve funds if prices are close to our max buy price. We use a function of the form

https://preview.redd.it/ctallz702g971.png?912&format=png&auto=webp&s=a30a6d06221d715489631d9078643a11acec5ac3

So as the price decreases, we can increase our purchase amount exponentially. Now, we can define a parameter that allows us to control how aggressive we want to be. The more aggressive we are, the more we buy as the price decreases and wait if the price is higher. If the price decreased slightly from our maximum buy of $40000 to $39000, an aggressive buyer wouldn't increase the amount they are buying. If we wanted to be neutral an aggression parameter of 50% would mean that if the price was $30000, we'd buy about $577.5 on that given day (halfway between our minimum and maximum purchase amounts).

So how can we use our aggression parameter? Well, we can define the point between $20000 and $40000 at which we would make a buy of $577.5 (the halfway spot of daily purchase). The more aggressive we are, the closer we'd like this spot to be to $20000.

​

https://preview.redd.it/9v7cx76z3g971.png?2013&format=png&auto=webp&s=5d43688d35a758b9e03536f42a157d092e2a2818

If we give ourselves an aggression value of 80%, this point will be 80% of the distance from P_max towards P_min. This is the point where we make a purchase of size midway between minimum and maximum daily buy.

​

https://preview.redd.it/6x7phtjz4g971.png?1282&format=png&auto=webp&s=12a6c7d348b8c24f06f30c4b9e329172f1ad78a6

Okay so with an aggression factor of 80%, we have three points that we can fit our quadratic curve to, finding our parameter vector β. We can see that it's much more aggressive than a linear line between $20,000 and $40,000. Here we have a price between $228 at P_max and $457 at P_min.

​

https://preview.redd.it/fa7q6nxx5g971.png?1214&format=png&auto=webp&s=e6629d8e8dfa43f6c7c2cfecc06ea173d4870dd4

This aggression parameter is a trade-off between taking advantage of larger price drops and making larger purchases altogether. We don’t know whether the price will drop down to (or below) $20000, if it does, our average price will be dramatically reduced, but if it doesn't, we'll be holding a lot less BTC.

So, how would this strategy have faired over the past two months? I'm bearish on BTC and even I think 80% aggression is a bit high. Running the model with 70% aggression parameter, aiming to inject $10000 over a maximum of 2 months and a minimum of 1 month gives us the parameters:

​

https://preview.redd.it/hhdktrr58g971.png?873&format=png&auto=webp&s=6f85073095094c02965a50b314a5a96ca57554af

with these parameters over the past two months. The buy amounts are:

​

https://preview.redd.it/oew8m363eg971.png?1200&format=png&auto=webp&s=e76ea5cc03e2d60a4576831b69f743ec1067e37d

We can see that the adapted strategy takes advantage of the lower prices. The average price of the standard DCA strategy is $38,550, whereas that of the weighted DCA is $38,400. Not a huge amount of difference. But we can see that the price doesn't go near the expected floor.

What if the price of BTC continued in a downward trend?

Creating a simple random walk, where BTC drops 1000 with probability 0.8 and increases 1000 with probability 0.2, we can create compare the two strategies:

​

https://preview.redd.it/xrhfh106hg971.png?1414&format=png&auto=webp&s=a9ae9fc7298fc2ea48476b259236619c21f47c84

This is where the weighted strategy comes into its element. Admittedly, with a set amount of capital, the weighted DCA will run out of money before the end of the time period. Despite this, the aggressive strategy still picked up more BTC and at a lower price (0.35 BTC at an average price of 28613 vs 0.3 BTC at a price of 33506).

If a fast drop happened towards the beginning of the period followed by a recovery of the price, we should see the weighted-DCA take advantage of the temporary lower price:

​

https://preview.redd.it/1k2rde90kg971.png?1422&format=png&auto=webp&s=a60c4a9bcc311965bd448c96973754efbac05e3b

Again, the weighted DCA uses up its capital much quicker but accumulates at much better prices. The weighted DCA picks up 0.485 BTC at $20,387 whereas the standard DCA accumulates 0.39 at $25,640. The difference in performance here is stark here as this (manhandled) situation is one where the weighted-DCA will be most powerful.

So, over a long period, what will do better? We'll see, I'm running this method now and will compare it to standard DCA once we achieve the next all-time high. But in this crabby market, it is doing slightly better than DCA.

​

If you guys are interested, I'll create a google sheet where you can play around with your own values. Even if you don't want to follow it by the book, it could be good as a sanity check whenever you're making a large purchase.

​

Edit: just whipped up a little sheet with the payment calculator. It's super bare and I'll all some tabs tomorrow with maybe a price simulator or something.

https://docs.google.com/spreadsheets/d/10WeRuCixKe9P2igF55NMdhl8fuIhS18lAVh9mUeEdoU/edit?usp=sharing

Edit2: hit me up with any suggestions for the algorithm. Someone mentioned putting it into a little app. I’ll potentially put an online calculator onto my blog website (it’s statistics techniques/strategies applied to crypto, if anyone is interested). Let me know if you’d want something like that and how you’d want it to function.

Edit3: typo in paragraph 2. Had 6 months and 2 months but it should have been 6 months and 3 months.

submitted by /u/TeddyousGreg
[link] [comments]

Get BONUS $200 for FREE!

You can get bonuses upto $100 FREE BONUS when you:
💰 Install these recommended apps:
💲 SocialGood - 100% Crypto Back on Everyday Shopping
💲 xPortal - The DeFi For The Next Billion
💲 CryptoTab Browser - Lightweight, fast, and ready to mine!
💰 Register on these recommended exchanges:
🟡 Binance🟡 Bitfinex🟡 Bitmart🟡 Bittrex🟡 Bitget
🟡 CoinEx🟡 Crypto.com🟡 Gate.io🟡 Huobi🟡 Kucoin.



Comments