Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Is there a way to track and graph the difference between the benchmark return and model returns ?

I find it more useful to look at a graph of the difference in performance/returns between the benchmark and the algorithm ?

In fact everytime, I am watching the backtest graph as it progresses through the backtest,
visually and mentally I am try to see how the Red/Blue lines diverge and converge, or track each other.

Coz I think that tells a lot about the algorithm than just the overall returns.

Is there a way to track/record and display it in the graph?

Sarvi

1 response

well i guess you could keep track of the portfolio performance by tracking the portfolio value (in the context dictionary). for the benchmark you could just track some etf (i.e. spy for the s&p 500). using this information you could calculate the return difference and plot it using the "record" function.

not sure whether there are more elegant solutions for this though....