Back to Community
What's the best way to get started?

Hello, I'm new here.

I have some experience in Python, but no experience in stock trading, etc. However I'm very interested in the idea. What are the best ways to get familiar with the program and company in order to start thinking of algorithms of my own?

Much thanks

6 responses

I remember the net about 15 years ago (I can't believe I've been doing this for 20 years...), but the net was not social. It had a very think skin that could not be penetrated without hours of self-research. The fact that you're even asking this question, in this day-and-age, means that Quantopian as fallen down on it's job to identify you as a introductory trader and point you -- straight -- in the direction you should go.

Try going back to the front page and clicking on that link -- "Backtest - Code a sample algorithm". Not very intuitive is it?

Alternatively you could click:

[That came across as rather haughty, apologies. But searching Google's site: is a great way to find what you need.]

Hi MIke,

Great to have you here. One of the best ways (I say this because I made the tutorial) for someone with Python experience to get caught up with our backtesting and live trading environments is to use our Quantopian Tutorial Series. It'll get you from start to finish using a number of different sample algorithms from both ourselves here at Quantopian as well as the community.



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 Mike and Seong,
The tutorials have great content and help guide you with working examples that can then be customized as desired. Here are the links to all of them in one place. It would be cool to have these links in a Getting Started section at the beginning of the Help docs.

Quantopian Tutorial with Sample Momentum Algorithm - Lesson 1: The basics of the IDE

Quantopian Tutorial with Portfolio Rebalance Algorithm: Lesson 2 - Universe, Fetcher, and Schedule_function

Quantopian Tutorial: Lesson 3 - Basic Fundamentals with Piotroski Score, Growth Stocks, and Uptrending Volatile Small Cap Algorithms

@Seong, don't you think it should be more obvious how one gets going on the Q? If everyone new finds that their only avenue is to ask a "getting started" question -- and they all seem to do to -- that, to me, says the site is begging for change.


I will recommend you before you start jumping and programming to decide what are the strategies that you like. Define what kind of trading style you like if you want do Momentum, or Weekly or Monthly, If you want to do Fundamental Analysis or Technical analysis or both. I have been doing this for short period of time however I have done lots of good progress just by following my own rules and having an strategy in mind. There is an ocean of information and tons of debates of Value investing vs tranding investiment. You need to figure out first what kind of inventor you are if you can see your capital drop -20~-30 percent and how you will react in a bear market. Quantopian is an amazing tool you can backtest your strategies however you never are going to know how the market is going to behave.

In summary my main point to you is to define what type of Investor you are (growth, aggressive, moderate) that will tell you what kind of strategies you need to look and second follow what Warren Buffets said First rule of investing don't loose money and Second rule see the first one. What does he means is that try to reduce your risk to the max. Look to the Risk factors in your backtest and the Max Draw Down so with that in mind you can tune your algo.

And read any material that you can find always remember “Risk comes from not knowing what you’re doing.”

Peace Love & Gains
Erick Gomez

Hello Mike,

You probably have one of those new-fangled tablet pcs or an i-something (or a smart phone the size of a serving platter), so I'd recommend kicking back and reading all of the help, FAQs, blogs, etc. You don't have to take it all in, in detail...just get a sense for the capabilities and where to go when you have questions. It should take you an hour or two, at most, which will be time well spent.

Also, there are a bunch of pitfalls that you'll want to avoid:

  • Excessive leverage (using order_target_percent is a handy function to keep things in check)
  • Excessive trading frequency, leading to commissions eating up return (note that commissions can be set to zero to detect this problem)
  • Placing new orders on top of open or partially filled orders, due to slippage (check for open orders before placing new ones)
  • Running backtests on daily bars (personally, in the end, I find this to be a waste of time, since the algo will be useless for entering the Open contest or trading with your own money, and can be very misleading)
  • Using anything other than the 'history' API to retrieve trade data
  • Not using Pandas extensively (see
  • Writing your own code, when you could import a module instead (see and request new ones)
  • Prematurely thinking that you've discovered some "secret sauce" and not posting your entire algo to this forum for review and assistance
  • Not realizing that you can run as many backtests variants as you want in parallel, by manually launching them in separate browser tabs (you can keep track of which is which by writing out parameters to the log). As a side note, I've always wondered if the whole system could be taken down this way, by a hacker...

Have fun!