Fun with a ‘SPY Climber’

F

After a long work day I often challenge myself to write the least amount of code to generate the most profitable equity curve. I never have any intent to trade the thing –it’s deliberately overfit– but I find it to be good calming way to unwind. 

Some people have a Zen garden on their desk. To each his own.

Last night I wasn’t up for a challenge, but I still wanted the satisfaction of a pretty P/L curve. Fortunately I came across this post by ‘Relaxed Trader’ and it seemed to fit the bill. 

This diagram below shows the logic to to be implemented; i’ve embedded the backtest for my Quantconnect implementation below. With code.

Note: This is for fun, do NOT trade this. 

Image courtesy of relaxedtrader.com
Image courtesy of Relaxedtrader.com

 

 

About the author

quantish
By quantish

quantish

Automate everything.