Links

Get data from ticker

Tags: #yahoofinance #trading #naas_drivers #investors #snippet #dataframe
Author: Florent Ravenel​
With this template, you can get data from any ticker available in Yahoo finance.

Input

Import libraries

from naas_drivers import yahoofinance

Input parameters

👉 Here you can change the ticker, timeframe and add moving averages analysis
ticker = "TSLA"
date_from = -100
date_to = 'today'
interval = '1d'
moving_averages = [20, 50]

Model

Get dataset from Yahoo Finance

df_yahoo = yahoofinance.get(ticker,
date_from=date_from,
date_to=date_to,
interval=interval,
moving_averages=moving_averages)

Output

Display result

df_yahoo