Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Beginner assistance

I am a high schooler writing a research paper for my school. I found this website and I would like to use it to create two similar algorithms, one that would succeed and one that would fail so that I can compare the two in my paper. Right now, I'm reading the Quantopian documentation to figure out how to do all of this. However, I would really appreciate some sort of lead or suggestion as to go about doing this.

2 responses

Hello Louis,

You might start with a simple portfolio of ETFs (e.g. SPY, BND, etc.) and set a fixed asset allocation with periodic re-balancing (e.g. quarterly), in daily backtesting mode. For example, you could have an SPY/BND portfolio, and compare allocations of 100/0 and 50/50 I've attached an example algorithm to get you started. Just hit the clone button and run it. You can change the SPY/BND mix on this line:

context.percent = [0.5,0.5]  

Grant

This may be too simple. Pick one algorithm. It will work or it won't. Doesn't matter. Whatever it does, modify it to take the opposite positions (long changes to short; short changes to long) and you will get the opposite result. You will then have two algorithms, one that works and one that doesn't.