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.

Clone Algorithm
3
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 5988d918dbab994fa426759d
There was a runtime error.