Hello Everyone,
I am not really a python expert, so there is definitely room for improvement there and also it needs a bit of clean up.
I have taken BB, MACD and RSI as indicators to buy and sell SPY.
The algorithm buys if BB, MACD or RSI thinks as it is a buy and shorts SPY, if it thinks its a sell.
I have a stop loss, if the evaluation of the portfolio falls below a certain amount. I think there is room for improvement in stop loss department.
I ran the algorithm in different time periods and it seems to outperform SPY. Can someone please take a look and see if there is a room for improvement or am i doing something wrong here ?
Thanks,
Amol-c