Back to Community
Combination of BollingerBand (BB), Moving Average Convergence Divergence (MACD) and Relative Strength Index (RSI)

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

Clone Algorithm
107
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 55ff67ef09d8ea0e0f052640
There was a runtime error.
3 responses

Hi Amol,

Can you replicate this algo with long_only strategy?

Sameer

no position control. when doing backtest you can see that the machine buy and sell far from max initial capital

Hi Amol.. I think this is leverage... and I dont see... and I dont see any... stoploss in place... it doesnt seem.. to add up... pls. check. thanks