Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
First Basic Testing Method (3% above average plus 30 day market activity)

Hi all!

I am rather new to this trading site so I have been playing around with very basic modifications to the initial algorithms to see what kind of methods work best in when to buy / when to sell. This algorithm here has been my best shot thus far, and I was curious if you guys could recommend some more parameters to check in order to make the algorithm more tightly sealed and on point when it comes to decision making. I like the idea of basing some parameters of the decision making on a monthly, weekly, or daily time increment, as it seems to save the user from losing out of many of their funds very quickly if the market takes an odd turn. Let me know if you all have some beginners advice, and best of luck on your algorithms as well!

Thank you for your time,

Mark Milutinovic

2 responses

Mark, nice start. There are several directions how to grow this algo:

  • Add more securities. Try adding more stocks manually to a symbols() list, playing with a basket using set_universe, or delving into fundamentals data.
  • Use more robust ordering methods. The order_target() functions will automatically seek to their target positions so you don't have to worry about cash management as the portfolio grows/shrinks. One of the "gotchas" is to check for open_orders before placing new orders in the algo.
  • Use record to graph custom signals (cash balance, leverage, positions in portfolio etc.)
  • If you get stuck, try the built-in debugger to figure out code errors and algo behavior

To get more ideas and learn other API functions, take a look at Seong's tutorials. And then when you have something, see how it competes in the contest. If you get stuck along the way, post back here or shoot us a private message.

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

Hi Alisa!

Thank you for the reply! It was very helpful feedback. I will definitly start working on improving the algorthim in one or more of these ways.

Mark Milutinovic