Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Interesting Returns... 20000% (RE: Newbie Mistake)

Hey Guys,
Just got started creating algorithms here and tweaked around with the sample algorithms given here on the site and got some pretty interesting results. I know that this is carries a ton of risk as seen in the metrics but just thought it would be cool to share.

2 responses

It spent 1.3 billion and the returns value in the backtester does the calculation with an assumption that no more than the starting capital was utilized, disregards negative cash. I usually record context.portfolio.cash to keep myself in check along that line. Typically the sort of output above can be remedied roughly by skipping any bar/frame where orders are present (that's the line after def handle_data below). This needed more than that, so it has some additional code to help keep you limited to starting capital, and various options that some might find useful. PvR_Ret is a returns calculation based on profit versus risk that aims to provide a returns value only what was spent/risked no matter what the starting capital value is (same as the Quantopian returns below because amount spent close to the 1 million starting capital). Note you can click legend items in the custom chart to toggle them off/on, even here in the forums, to bring into scale whatever you're interested in, nice feature.

Thanks for that! I'm a newbie to quant analysis (seasoned value investor though). Currently trying to self educate myself on the creation of algorithms and create some myself. I thought something was a bit off so that explanation was of much help.