Back to Community
Trouble transitioning from Research to Algorithms: trading the MACD crossover

Hi there, I'm a beginner having quite a bit of trouble executing my algorithm in the IDE or in the Research environment. I am not a programmer by training, but am comfortable with MATLAB due to my work (transitioning from MATLAB to python has been a challenge). So far I have set up my 'research' environment to mimic 1 stock (AMD) that I trade in real life. After doing research and successfully plotting out the data I tried to implement this strategy in Quantopian IDE. I am getting errors that I do not understand (something about the historical data?). I also don't think that I am loading the correct libraries, but this is a completely new concept to me coming from MATLAB.

Couple questions for the community:

  1. Can anyone help me debug these issues or at least provide some insight into why my algo is failing? I'm not looking for people to write my code for me as I prefer verbose code that I can read step by step/line by line.

  2. Is there a straightforward way to run backtests in research? I tried to follow some guides in notebook but it seems like I don't understand what is going on as well.

  3. Is there a way I can utilize a MATLAB-like IDE like Spyder? I like to write my code line by line and see the output; the fact that I have to compile my code before executing it drives me crazy. I much prefer the research environment more because I can execute code line by line so that I can understand the data structure or debug on the fly.

Thanks for the support. I'm really eager to learn how to use this to apply my own knowledge and skills.

Some background: For the past few years I swing traded 'calibrated' MACD signals for certain stocks with reasonable success. I'd like to take the next step of making this process automated. The example that I use in this post is trading AMD using Google finance charts, 1 month window, 30m intervals. My MACD settings that I use for this stock are Short=30, Long=40, EMA=40.

** Please no comments on how technical analysis is garbage. I am using this as a learning tool for this platform.

Loading notebook preview...
Notebook previews are currently unavailable.