Skip to content

Instantly share code, notes, and snippets.

@quantra-go-algo
Last active December 28, 2021 07:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quantra-go-algo/b91f24287e84a8301315ce04cc217486 to your computer and use it in GitHub Desktop.
Save quantra-go-algo/b91f24287e84a8301315ce04cc217486 to your computer and use it in GitHub Desktop.
# Import libraries
import numpy as np
import pandas as pd
import yfinance as yf
from math import sqrt
import matplotlib.pyplot as plt
# Set the start and end date
start = '2018-01-01'
end = '2021-07-12'
# Set the ticker
symbol = 'HINDUNILVR.NS'
# Get the data from Yahoo! Finance
df = yf.download(symbol, start, end)
# Disply the data
df.tail()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment