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!