Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
My Algorithm is performing very well this year. Is it a fluke?

Hello Quantopian community. This algorithmic trading hobby of mine has sort of been pushed to the back burner, but I still like to use
Quantiopian to test out new valuation metrics and ratios that I learn about, and see how they perform in the historical market. For some reason my latest algorithm has been doing extremely well this year no matter where I test it. I'm sure it must be a fluke, but I haven't been able to get my leverage tracking function up and working. Maybe someone more experienced and up to date could take a look at it and help me get back to a working state. Would greatly appreciate it. Thanks in advance. Also sorry for the super messy code.

Just ran my first real backtest, and the leverage is under 1 -- backtest said 94. Like I said, it's been a while since I've messed with quantopian, so I have no idea of how to identify a fluke now-a-days.

4 responses

Not really. You skip the crash that likely preceded this, so a 75% gain isn't that much considering how many stocks have tripled and the massive gain in the underlying index.

Yes, but if you backtest it starting from anytime this year it performs very well. Before during or after the crash. The gain will actually increase to around 100 if you include the crash.
Edit: Only if you test it from Feburary, so maybe it just gets a lucky pick around then. I now see that it corrects more than the market, but it is randomly boosted in Feburary, making it appear to avoid the crash.

you have to look for 2 things: how does your algo behave in other times (only 2013 and 2020 are good) and why? I tested this thing a bit further and then it appears a bit different. if you can identify why it does so well and you can isolate the underlying behaviour you might have something... but for now I would say: fluke

I found that this year leading into the crash, it was only buying one stock, and then switched to cash during the crash. Ill try to limit the position size of a single stock, and maybe switch to shorts instead of cash. But thanks for the input!