Dear Community,
I tried to built an algo which is buying stocks when the RSI is showing an oversold market and selling when its overbought.
Please read my code an help me to fix the problems which remain.
The Algo is not buying because of some reason...
I also have a problem with some commands (line 20, 26, 45).
Kind regards and thanks for advice...
here you have some further information for my task..
- Strategy: Invest 100% if a signal is bullish; 0% if bearish. Bullish: fast technical indicator (TI) >=slow TI.
Bearish: when not bullish.
Exception: max investment on Mondays: 50%. - Tis are assigned individually. If you have not been assigned a TI, contact us by email. You can select TI parameters yourself (we recommend defaults from stockcharts.com. There you can also find calculation formulas for TIs).
- Underlying stock: SPY (its an S&P 500 ETF). NB: This was not discussed in class.
- Investment timeframe: Jan 1, 2010 - Apr 1, 2017.
- Initial investment: $1,000,000.
- Calculate the signal 1 minute before the market close (c-1). Invest at market close (c) on a daily basis.
- Create a Quantopian account and see if someone may have implemented a similar algorithm already. You can clone that algo and use it as a starting point.
- You should publish your algo as a new forum post in the Quantopian board with a one sentence description of your investment strategy.
- NB: Most likely the returns of your strategy will be negative. It is OK - the purpose is to validate your ability to take part in the seminar.