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.