Links

Get data from ticker

Tags: #yahoofinance #trading #naas_drivers #investors #snippet #dataframe
Author: Florent Ravenel
Description: This notebook provides a way to access financial data from a given ticker symbol using the YahooFinance API.

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