I encourage you to press the "Clone Algorithm" button below. That will copy the code into your "My Algorithms" page. You can then hack, edit, tweak, modify, and change it as you see fit. A couple easy changes you can try:
- Change the sid to a different stock
- Change the vwap to be a different number of days
You can see how the backtest results change with even tiny code updates.
This very basic algorithm comes from our help documentation. In the backtest object below, click the "Source Code" tab to see the code. Read the comments in that code carefully, and you'll get a good idea how to write an algorithm in Quantopian.
Also, you might find the Video Tutorial helpful. It walks you through the same programming concepts. Watch it on YouTube.
P.S. This algorithm was last updated on 11/13/12.