Skip to content

Instantly share code, notes, and snippets.

View 18182324's full-sized avatar
🎯
Focusing

Milton_FMR 18182324

🎯
Focusing
View GitHub Profile
@18182324
18182324 / Analyzing Trade Entry and Exit Positions with Regression Analysis.py
Created August 31, 2023 16:36
Analyzing Trade Entry and Exit Positions with Regression Analysis with Quandl
# Import necessary libraries
import quandl
import numpy as np
import matplotlib.pyplot as plt
# Set your Quandl API key (you need to sign up on Quandl's website to get your API key)
quandl.ApiConfig.api_key = 'YOUR_API_KEY'
# Define the dataset codes for Google and Yahoo
google_dataset = 'WIKI/GOOGL' # Replace with the correct dataset code for Google
@18182324
18182324 / Comparing GDP Values of BRICS Nations Using Quandl.py
Created August 31, 2023 16:40
Comparing GDP Values of BRICS Nations Using Quandl
# Import necessary libraries
import quandl
import matplotlib.pyplot as plt
# Set your Quandl API key (you need to sign up on Quandl's website to get your API key)
quandl.ApiConfig.api_key = 'YOUR_API_KEY'
# Define the dataset codes for the BRICS nations' GDP
brics_gdp_datasets = {
'Brazil': 'ODA/BRA_NGDPD',
@18182324
18182324 / 1_n factor strategy.py
Created September 7, 2023 20:31
Portfolio Allocatgion 1_N Factor Investing
import yfinance as yf
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
# Define a list of stock tickers for the portfolio
tickers = ['AAPL', 'MSFT', 'GOOGL', 'AMZN', 'TSLA']
# Set the date range for historical data
start_date = '2010-01-01'