here are a couple of requests about backtesting of trading strategies after the latest post on catching overbought stocks. I thought that would be an interesting experiment and I have decided to try it on Power BI instead of the usual python. It is easier in my opinion also.
The most challenging part of this task is not so much about the codes. It is coming up with the programming logic behind. Here is mine.
Bob earns 4k a month and he is interested to invest 10% of his income into the stock market. Bob wonders if it would be better to just DCA every month or time the market by waiting for a dip. Since I have written about the % from 50MA deviation, this would be a perfect backtesting case study.
1. DCA Strategy vs %<50MA Strategy
In the DCA strategy, he would invest 10% or $400 at the end of every month to buy whatever quantity of stocks based on the closing price on that day....