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

Input

Import libraries

1
from naas_drivers import yahoofinance
Copied!

Input parameters

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

Model

Get dataset from Yahoo Finance

1
df_yahoo = yahoofinance.get(ticker,
2
date_from=date_from,
3
date_to=date_to,
4
interval=interval,
5
moving_averages=moving_averages)
Copied!

Output

Display result

1
df_yahoo
Copied!
Copy link
Edit on GitHub