Huge Disclaimer: The information in this post is not intended to be and do not constitute financial advice.
Recently, I gave a lot of thought to how to maximise my savings yield after being inspired by FIRE movement (not to be confuse with Fyre Festival) advocates.
I was contemplating on staking a portion of my income in the lottery, in the hopes that it will turn me into a millionaire.
Other alternatives would be robo-advisors or a token sum every month into stocks and shares.
The severity of my headache went up exponentially as I researched about investment options.
It was too much effort for my lazy ass.
By sheer coincidence, I chanced upon Gemini (founded by the famous/infamous Winklevoss twins) and their REST API reference documents.
I connected the dots and had a eureka moment.
REST API + Automated Trading + My Lazy Ass
I had officially embarked on the Bitcoin ##FOMO rocketship.
Since I had zero to zilch experience in investment strategies and technical analysis, I decided to go with the most idiot-proof approach.
Mean Reversion. What's that?
Basically what mean reversion means (heh) is that asset prices will tend to average out over a time period.
By this technical assumption, if I create a buy order when the price dips past 0.8% and sell when it increases by 0.81% (minus the fees), I would be making a profit! Ka Ching!!
Base (USD) | Current (USD) | Total (USD) | Executed (USD) | Fees (0.35%) | P & L (USD) | Side | Trades |
---|---|---|---|---|---|---|---|
58,578.20 | 58,578.20 | 10.00 | 10.00 | -0.035 | 0 | Buy | 1 |
58,578.20 | 59,046.83 | 0 | NA | -0.035 | +0.01 | Sell | 0 |
Base (USD) | Current (USD) | Total (USD) | Executed (USD) | Fees (0.35%) | P & L (USD) | Side | Trades |
---|---|---|---|---|---|---|---|
58,578.20 | 58,578.20 | 10.00 | 10.00 | -0.035 | 0 | Buy | 1 |
58,343.89 | 58,109.57 | 20.00 | 10.00 | -0.035 | 0 | Buy | 2 |
58,109.57 | 58,810.64 | 0 | NA | -0.07 | +0.04 | Sell | 3 |
Base (USD) | Current (USD) | Total (USD) | Executed (USD) | Fees (0.35%) | P & L (USD) | Side | Trades |
---|---|---|---|---|---|---|---|
58,578.20 | 58,578.20 | 10.00 | 10.00 | -0.035 | 0 | Buy | 1 |
58,578.20 | 59,046.83 | 0 | NA | -0.035 | +0.01 | Sell | 2 |
59,043.05 | 59,043.05 | 10.00 | 10.00 | -0.035 | 0 | Buy | 3 |
59,043.05 | 59,515.39 | 0 | NA | -0.035 | +0.01 | Sell | 4 |
Of course, life is never that straightforward.
There were several factors to consider namely:
Because Lambda functions are stateless, a storage solution was required to record the current price of my crypto assets.
AWS Database services like RDS or Dynamo DB felt like overkill.
I ended up going with Amazon ElastiCache for Redis for its simplicity and ease of use.
Up till this point, the only way to receive updates and monitor my bot's performance was through the Gemini console or via Amazon CloudWatch logs.
Too much effort!
With a little elbow grease, I integrated a simple Telegram bot to receive notifications via Amazon SNS.
The adage rings true. If it sounds too good to be true, it probably is.
As it turns out, trying to generate a profit using this strategy is harder than it looks.
Firstly, a minimum of one hundred dollars is required for each trade to even move the needle slightly.
I would go broke in a constant downward trend.
Secondly, given the volatility of crypto trading, I was expecting to hit the desired buy/sell target at a faster pace, which is clearly not the case.
At the end of 3 days, I racked up $12.35 for my AWS costs.
This was the profit generated by the bot.
{
'btc_balance': '0',
'cash_balance': '200.0129643600000007',
'buy': '20',
'sell': '1',
'profit': '0.0129643600000007'
}
A colleague mentioned recently that the best investment is one that allows you to sleep soundly at night and have time for families and love ones. (paraphrase)
Would I sleep soundly if every order was a hundred beans? Probably not.
Would I be mentally present when I am with my family and loved ones? Probably not.
What would be a good investment then? The old cliché. Invest in yourself.
As for myself, I'll be sticking with Dollar Cost Averaging (DCA) for now.
Apparently, Even God Couldn’t Beat Dollar-Cost Averaging.