Compare the performance of a chosen index and a buffer ETF thanks to Highcharts' built-in series compare option, which handles all of the calculations under the hood. Adjust the PERIOD_CAP and PERIOD_BUFFER parameters in the demo, to see how plot lines and plot bands get adjusted automatically at the same time.