Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Kick-starter Guide for Newbies

Ok, so I've been developing on the Quantopian platform for about 6 months now and I wanted to share some insight and give some advice to new users to make sure they get the most out of the platform and maximize the use of their time.

  • First of all, the Quantopian Platform works great. As a matter of fact, it is much more well rounded than I expected at this stage and it is well worth investing time into. So you can scratch the doubts in your head and rest assured that you are on a solid platform. Is it perfect yet? No, but it is constantly being improved by what seems like an extremely qualified and responsive team. Kudos!

  • Unless you are working on a single-stock strategy (doubtful and likely inefficient), don't waste your time by back-testing with high-flyers like AAPL, TSLA, SCTY etc. for your back-testing. Yes, your results will always look great and you will get your hopes up that making money this way is easy. Unfortunately that's an illusion that will quickly fall apart when you try to go against a larger pool of stocks.

Instead, use set_universe to define random universes and make sure your algorithm works against different scenarios, or you could be wasting a lot of time.

  • Leverage is not your friend. Make sure you understand exactly how much money your algorithm is actually investing, and make sure your program doesn't keep buying and selling much more than any broker would actually let you borrow.

You can pretty much invest in any random basket of stocks during a 10% market rise, leverage your account 100 times and you will see a 1000% return. But that's not reality. If you are seeing a return like this, assume your program is buying/selling far too large of an amount. Don't quite quit your day job yet. Sorry!

Note that most brokers will have a margin requirement of 30%, so you can leverage your money at the most 3 times (more for day trading). Additionally, anything borrowed will be subject to interest charges, so take that into consideration if you do plan on using leverage which is much more risky.

  • Trading fees and slippage are your enemy. I have dozens of strategies in my head that should in theory make lots of money. However, trading fees and to a much larger degree, slippage (the effect of your order on the actual bid/ask) will drastically reduce your gains.

For example, if you buy $100,000 worth of TSLA shares right now, and sell it 10 seconds later, you will likely only have about $99.500 left. Yep, that's a 0.5% loss in 10 seconds, purely based on slippage and trading fees. Keep in mind that the smaller the order, the less slippage but there is no way to juke the bid/ask spread and slippage is impossible to avoid.

I sometimes turn off slippage and fees during back-testing. To turn your slippage and commissions off, put the following statements into your initialize function:

set_commission(commission.PerTrade(cost=0.0))
set_slippage(slippage.FixedSlippage(spread=0.00))

This will remove the trade fee and slippage impact from your program and can be handy for playing with your strategy. However, results with this setting are far from real and you need to periodically test with full reality settings.

  • Testing is your friend. To get a successful strategy working you will likely be back-testing. A lot! I unfortunately spend much more time testing than actually developing which is the nature of the beast.

  • Nobody will share a great, money making algorithm with you in this forum. Welcome to capitalism! This is a place to share concepts, ideas and challenges, but you will not find anybody share a great, money making algorithm. Why? Because if somebody put in the work, they are not simply going to share a working "ATM" with you for free. Period. This is not software development where you can find working and money making algorithms simply with a quick Google search.

Additionally, any working algorithm, if used by too many people, will become worthless as too many parties are trying to play in the same pool.

  • Getting to a place where you make money will take time. Don't rush it. I've been a software developer my entire life and a day trader for 10 years, and it still took me 6 months to get to a point where I feel like I have a worth-while release candidate for day trading.

Obviously it helps to have a head-start. If you are neither a software developer nor an experienced trader then the hurdle will likely be quite a bit higher for you. That doesn't mean it can't be done, you just need to put in the time and effort to succeed.

That's it for today, folks! Happy Coding!

2 responses

Beat,
This is an amazing guide for newbies! Being one myself, I whole-hearted agree with your points about using set_universe instead of a single stock for testing, and to beware of leverage.

I'd also add that while people in the community aren't going to give away their winning algorithms, lots of questions can be solved by looking at others code and there are some great and interesting examples here. As I continue to work on my first algorithm, the forums are the first place I go looking for examples when I am not sure how to solve something.

I'm also super excited about some of the features in the pipeline, specifically because they will help newbies develop better investment ideas. So stay tuned for more!

Karen

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.

Heya Beat - it's been a year, would you mind giving an update on your live trading experience?