Abstract
We’ve all heard time and again that Dollar Cost Averaging (DCA) is the smartest investment approach when compared to speculative retail day trading or lump sum timing the market - In this post we back test a DCA strategy to find out does it actually work.
TLDR - Scroll to the end to see data analysis - peace.
What on Jupiter is a DCA strategy?
A full discussion is beyond the scope of this work, and I will bore you, trust me.
Here is a simple explanation of the variation we will be looking at, we open a trade when the price is above a long term EMA but it has closed below a short term EMA. We do the opposite for our short trades.
As seen below, limit orders are set to ‘buy-the-dip’ with increasing size as the price moves away from our entry. Both the order volumes and limit orders have been set to scale exponentially as price moves against us so that we get the best average entry price.
Fundamentals, technicals… the price don’t care.
Before that lets go back to launch day, you were airdropped / purchased your first bags of JUP.
Jup York Times Breaking!! - 31 January 2024
"
Shadowy super cat @meow unleashes a hidden bag of JUP - “you thought stress testing Solana and zer0 business was a joke ” - The launchpad liquidity pool on the brink of bailout.
"
jk, but on a serious note we had and have no idea what will happen to a token’s price.
Tale of two traders on launch day:
Trader 1: Gets airdrop of 3000 JUP, sells half @ 1 USD => 1500 JUP & 1500 USD
Trader 2: Has 3000 USD capital, invests half @ 1 USD => 1500 JUP & 1500 USD
They want to accumulate JUP from the volatility but avoid being left behind or being caught in a disaster, so they decide to run a bi-directional DCA bot.
The boring stuff … how it works etc.
If you are familiar with DCA bots, and the concept of safety orders just skip this part.
How the bot works:
First we split our capital in half, we use the 1500 USD to buy more JUP as price goes lower. We do the opposite when selling our 1500 JUP, this way we are maintaining both buy and sell positions. Upon closing the trade, we pocket the difference in JUP (since our strategy is to accumulate)
Safety orders:
When in a trade, once a set price deviation (% from initial order) occurs we want to have limit orders ready and waiting.
Volume Scale / Multiple:
The volume multiplier we put on safety orders to ensure we get bigger orders filled at lower prices.
Step Scale or Step multiple.
We also want to ensure that our orders are skewed cover a sufficient price range, so we apply a multiplier to the first deviation, we exponentially increase the distance we wait to make a new safety order.
Lastly, we need to take special care to not exceed the max amount of capital available for safety order.
I know that is a lot to take in, perhaps the tabled illustration makes it clearer:
Table of sample trades:
The Results:
DCA params:
base_order = 20 USD
trade_max_amt = 1500 USD / 1500 JUP
target_profit = 3 %
base_deviation = 4 %
max_safety_orders = 6
vol_multiple = 2
step_multiple = 1.5
fast_ema_period = 10
slow_ema_period = 20
(Long Bot) Performance Metrics:
Profit: 272.6 JUP using 1500 USD !!!
Avg amount locked in deal: 143.26530612244898 USD
Avg trade duration: 19.88 hours
Total exposure time: 52.62% of 77.125 total days.
Amount of trades: 49 trades
Closer look at how it counter trades the trend in the last 200 bars and manages to exit despite longing the dip
Seems to have trades all over the chart.
(Short Bot) Performance Metrics:
Profit: 224.72 JUP from 1500 JUP with a return of 14.98 % !!!
Avg amount locked in deal: 138.34 USD
Avg trade duration: 17.77 hours
Total exposure time: 46.08 %
In position 853.0 hours of 1851.0 total hours
Amount of trades: 48 trades
Last 200 Bars, very quick entries and exits with the trend.
Total shorts, managed to escape a legendary pump
Conclusion:
The bi-directional DCA managed to increase our JUP holdings by 33%! We beat the buy and hold, since price has trended down in recent times.
Despite using half of our money (the USD portion) to short a legendary pump the total portfolio value increased by roughly 15% in about 2.5 months… roughly.
I am personally impressed by how the strategy manages to use about 10% of its capital on average, so this means the free capital can be used to fill the safety orders of other bots.
This fact that these strategies are unoptimized, literally “eye balled parameters values” shows how effective good trade management and lucid expectations can turn even a random strategy profitable.
Observations for further testing
- allow for multiple deals to use free capital
- run optimization as this seems very promising.
-end