@John, Thanks for your comments. Algorithm execution at every one hour has been designed deliberately. This works together with
if has_orders(context): return ::: This algorithm returns if there are any open orders. ( I don't wish to place another order if the existing order is outstanding)
if lastboughttoday(context): return ::: This block ensures that I do not place more than one trade in one day.
All of these will also ensure that there will be only one position at any time.
@Cody, thanks for your comments about buying SSO vs. shorting SDS. The reason behind shorting SDS is that leveraged ETFs and inverse or -2x in particular almost always lose a lot more money because of the effect of daily compounding. I attached a the same backtest with going long SSO and it returned about 105% vs. 165% for shorting SDS.
This strategy alone is just one idea that is not meant to sole position of any portfolio. I plan to extend the algorithm further to combine multiple strategies to improve risk adjusted returns.
Thanks for your suggestions.