Final Project for the Trading com Dados Summer Course in collaboration with FIU (Florida International University)
After completing the weekly classes, we have gained proficiency in Python and the relevant libraries for the financial market. This knowledge equips us to successfully complete our final project, addressing the following questions:
-
Obtain Adjusted Close (Adj Close) data for 5 stocks of your preference (they can be from any country)
-
In order for us to understand the behavior of these data, use the pandas library to analyse basic statistics of each stock, such as: count, mean, std, min, max and percentiles.
-
Plot these stocks using the plotly library
-
Now, standardize the stocks' prices so they all start from 1. Create a new dataframe with this data.
-
Plot the new standardized data using plotly library
-
Now, let's measure the impact of inflation and interest rates on the financial market.
Using what you learned through this course, create:
a 2-axis plot of Interest Rates and the S&P 500 using plotly. a 2-axis plot of Inflation and the S&P 500 using plotly. Hint: Use what you learned in Module 02. Also, the symbol for the S&P 500 in the yfinance library is "^GSPC"
- Let's create a dataframe with fundamentals for the following companies: 'AAPL', 'MSFT', 'AMZN', 'GOOGL', 'META'
You should obtain the following fundamentals:
'MarketCap', 'EnterpriseValue', 'Revenue', 'ProfitMargin', 'OperatingMargin','dividendRate', 'beta', 'ebitda'
- Create a panel for the stocks mentioned in question 7, using the same metrics
-- Obtaining Adjusted Close (Adj Close) data for 5 stocks
!pip install yfinance
import yfinance as yf
assets = ['PETR4.SA', 'VALE3.SA', 'MGLU3.SA','ITUB4.SA','GOAU4.SA']
adj_close = yf.download (assets , start = '2020-01-01')['Adj Close']
adj_close
-- Using pandas library to analyse basic statistics of each stock, such as: count, mean, std, min, max and percentiles
import pandas as pd
pd.set_option('display.float_format', '{:.1f}'.format)
adj_close.describe()
-- Standardizing stock prices so everyone starts at 1
adj_close_std = adj_close/adj_close.iloc[0]
adj_close_std
-- creating a dataframe with fundamentals for the following companies:
['AAPL', 'MSFT', 'AMZN', 'GOOGL', 'META']
create database ecommerce1;
use ecommerce1;
- creating a Panel with 'EnterpriseValue', 'Revenue', 'ProfitMargin', 'OperatingMargin','dividendRate', 'beta', 'ebitda'
YFinance
Nasdaq DataLink
Plotly
Projeto Final do Curso de Verão Trading com Dados em colaboração com a FIU (Florida International University)
Após concluir as aulas semanais, ganhamos proficiência em Python e nas bibliotecas relevantes para o mercado financeiro. Esse conhecimento nos capacita para concluir com sucesso nosso projeto final, abordando as seguintes questões:
-
Obtenha dados de fechamento ajustado (adj close) para 5 ações de sua preferência (podem ser de qualquer país.
-
Para entendermos o comportamento desses dados, utilize a biblioteca pandas para analisar estatísticas básicas de cada ação, como: contagem, média, padrão, mínimo, máximo e percentis.
-
Plote essas ações usando a biblioteca plotly
-
Agora, padronize os preços das ações para que todos comecem em 1. Crie um novo dataframe com esses dados.
-
Plote os novos dados padronizados usando a biblioteca plotly
-
Agora, vamos medir o impacto da inflação e das taxas de juros no mercado financeiro.
Usando o que você aprendeu neste curso, crie:
um gráfico de 2 eixos das taxas de juros e do S&P 500 usando plotly; um gráfico de 2 eixos da inflação e do S&P 500 usando plotly; Dica: o símbolo do S&P 500 na biblioteca yfinance é "^GSPC"
- Vamos criar um dataframe com fundamentos para as seguintes empresas: 'AAPL', 'MSFT', 'AMZN', 'GOOGL', 'META'
Você deve obter os seguintes fundamentos:
'MarketCap', 'EnterpriseValue', 'Revenue', 'ProfitMargin', 'OperatingMargin','dividendRate', 'beta', 'ebitda'
- Crie um Painel para as ações citadas na questão 7, utilizando as mesmas métricas
-- Obtendo de dados de fechamento ajustado (Adj Close) para 5 ações:
!pip install yfinance
import yfinance as yf
assets = ['PETR4.SA', 'VALE3.SA', 'MGLU3.SA','ITUB4.SA','GOAU4.SA']
adj_close = yf.download (assets , start = '2020-01-01')['Adj Close']
adj_close
-- Usando a biblioteca pandas para analisar estatísticas básicas de cada ação, como: contagem, média, padrão, mínimo, máximo e percentis
import pandas as pd
pd.set_option('display.float_format', '{:.1f}'.format)
adj_close.describe()
-- Padronizando os preços das ações para que todos comecem em 1:
adj_close_std = adj_close/adj_close.iloc[0]
adj_close_std
-- Criando um dataframe com fundamentos para as seguintes empresas:
['AAPL', 'MSFT', 'AMZN', 'GOOGL', 'META']
- creating a Panel with 'EnterpriseValue', 'Revenue', 'ProfitMargin', 'OperatingMargin','dividendRate', 'beta', 'ebitda'
YFinance
Nasdaq DataLink
Plotly