Who would have been the lucky ones who bought NVIDIA shares before they went up 20% in a single day?
In this tutorial, we will calculate the stock returns of NVIDIA to analyze their statistical behavior.
Data
Thanks to the yfinance
library, we can download the stock data of NVIDIA
with its ticker NVDA
.
import yfinance as yf
df = yf.download('NVDA')
Questions
- How to download stock data of a specific company using Python?
- What command allows filtering data by specific dates?
- How is the daily return of a stock calculated?
- What is the method to visualize the distribution of daily return?
- How to interpret the distribution of daily return?
- How is the cumulative return of an investment calculated?