| Top | Getting Data | Splits & Dividends | The Datetime Index | Frequency & Intervals | Technical Indicators | Foreign Exchange | Cryptocurrencies |
Udemy Finance APIs: Alpha Vantage
| Alpha Vantage | Udemy Course Page | Alpha Academy | Module

About Alpha Vantage:


Pros and Cons of Alpha Vantage:
Pros

Cons


| Top | Getting Data | Splits & Dividends | The Datetime Index | Frequency & Intervals | Technical Indicators | Foreign Exchange | Cryptocurrencies |
Getting Data from Alpha Vantage
Time Series Object
Resulting Data & Types
Setting Specific Time Periods
compact returns the last 100 timestamps (default)
full returns the last 100 timestamps


| Top | Getting Data | Splits & Dividends | The Datetime Index | Frequency & Intervals | Technical Indicators | Foreign Exchange | Cryptocurrencies |
Stock Splits & Dividends
Observing differences in importing from Alpha Vantage versus yfinance
Adj Close - Adjusted for stock splits and dividends
ts.get_daily_adjusted() - also returns the dividend amount and split coefficient
Splits - There have been 3 stock splits within the timeframe of this data
split coefficient == 3 - Investigating when the stock split by 3


| Top | Getting Data | Splits & Dividends | The Datetime Index | Frequency & Intervals | Technical Indicators | Foreign Exchange | Cryptocurrencies |
Datetime Index
Getting a single year


| Top | Getting Data | Splits & Dividends | The Datetime Index | Frequency & Intervals | Technical Indicators | Foreign Exchange | Cryptocurrencies |
Frequency & Interval Settings
get_monthly_adjusted() - monthly data
get_weekly_adjusted() - weekly data
intraday - interval of 60 minutes (default = 15 minutes)
intraday - interval of 1 minute


| Top | Getting Data | Splits & Dividends | The Datetime Index | Frequency & Intervals | Technical Indicators | Foreign Exchange | Cryptocurrencies |
Technical Indicators
- Typically used by day traders and technical analysts to find patterns in historical price and volume data
- Alpha Vantage offers 50 technical indicators
sma50 - 50 day moving average
- 50 and 200 days are typically used
# 50-day slow moving average overview
# Microsoft closing data for same period
# Dataframes combined (removing days with NaN values)
Bollinger Bands
- Middle Band is the same as the SMA50
- Lower is minus 2 std from the SMA
- Upper is plus 2 std from the SMA
# combining with Microsoft close and SMA50
Bands indicate volatility:
- if bands are close together, it indicates low volatility
- if they are farther apart, it indicates higher volatility
- if current price is above the upper band, signals selling
- if current price is below the lower band, signals buying
macd - moving average convergence divergence
(from Investopedia)
Moving average convergence/divergence (MACD, or MAC-D) is a trend-following momentum indicator that shows the relationship between two exponential moving averages (EMAs) of a security’s price. The MACD line is calculated by subtracting the 26-period EMA from the 12-period EMA.

The result of that calculation is the MACD line. A nine-day EMA of the MACD line is called the signal line, which is then plotted on top of the MACD line, which can function as a trigger for buy or sell signals. Traders may buy the security when the MACD line crosses above the signal line and sell—or short—the security when the MACD line crosses below the signal line. MACD indicators can be interpreted in several ways, but the more common methods are crossovers, divergences, and rapid rises/falls.

# combining with Microsoft close and MACDs


| Top | Getting Data | Splits & Dividends | The Datetime Index | Frequency & Intervals | Technical Indicators | Foreign Exchange | Cryptocurrencies |
Currencies / Foreign Exchanges
# Euro to USD
# USD to Euro
# Euro to USD intraday, 60 min
# USD to Euro intraday, 1 min
CURRENCIES PLAYGROUND:
exchange_rate(from_currency, to_currency)


| Top | Getting Data | Splits & Dividends | The Datetime Index | Frequency & Intervals | Technical Indicators | Foreign Exchange | Cryptocurrencies |
Cryptocurrencies
- Alpha Vantage offers data on over 500 cryptocurrencies
Bitcoin to USD
Bitcoin to Euro
Ethereum

| Top | Getting Data | Splits & Dividends | The Datetime Index | Frequency & Intervals | Technical Indicators | Foreign Exchange | Cryptocurrencies |