<jupyter_start><jupyter_text><jupyter_code>#Simple Moving Averages
import pandas as pd 
from alpha_vantage.timeseries import TimeSeries
from alpha_vantage.techindicators import TechIndicators
import matplotlib.pyplot as plt
api_key = '<KEY>'
ts = TimeSeries(key=api_key, output_format='pandas')
data_ts, meta_data_ts = ts.get_intraday(symbol='MSFT', interval='1min', outputsize='full')

period = 60

ti = TechIndicators(key=api_key, output_format='pandas')
data_ti, meta_data_ti = ti.get_sma(symbol='MSFT', interavl='1min',
                                    time_period=period, series_type='close')

df1 = data_ti
df2 = data_ts['4. close'].iloc[period-1::]

df2.index = df1.index

total_df = pd.concat([df1, df2], axis=1)
print(total_df)

total_df.plot()
pl.show<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12392638036809817, 'fraction_numerical': 0.015950920245398775, 'mean_word_length': 4.787234042553192, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '77370', 'license': 'MIT', 'n_tokens_mistral': 314, 'n_tokens_neox': 304, 'n_words': 54, 'path': 'Simple_Moving_Averages.ipynb', 'repo_name': 'SuperGeekBrain/coal-exploration', 'size': '826'}