Simple exercise to calculate a fibonacci sequence and plot respective ratios which are used in technical financial analysis (for more details on Fibonacci Retracement see https://www.investopedia.com/ask/answers/05/fibonacciretracement.asp). This code gives you an understanding on how the ratios are calculated.
Note that it's unclear (to me at least) why Fibonacci ratios are able to explain some of the movements of stock prices. I guess it's a self-fulfilling prophecy...