Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
create a graph

hello,

how to create a graph for an algorithm and show the index from where it is selected as a reference?
e.g.:- if I select stocks from QQQ, then graph should show 2 lines, 1 for QQQ and 1 for my portfolio.

thanks
-kamal

1 response

Maybe just set a custom benchmark like below. See the documentation here https://www.quantopian.com/help#overview-setbenchmark

  set_benchmark(symbol('QQQ'))

Attached is an algorithm with QQQ as a benchmark.