2021-11-09 15:21:22 +01:00
|
|
|
#%%
|
|
|
|
|
import pandas as pd
|
|
|
|
|
from utils.get_prices import get_crypto_price_crypto_compare, get_stock_price_av
|
2021-11-17 12:07:49 +01:00
|
|
|
from itertools import combinations
|
2021-11-09 15:21:22 +01:00
|
|
|
|
|
|
|
|
#%%
|
2021-11-17 22:28:34 +01:00
|
|
|
crypto_tickers = ["BTC", "ETH", "BNB", "ADA", "SOL", "XRP", "DOT", "LTC", "UNI", "TRX", "FIL", "USD"]
|
2021-11-09 15:21:22 +01:00
|
|
|
etf_tickers = ["GLD", "IEF", "TLT", "SPY", "QQQ"]
|
|
|
|
|
tickers = crypto_tickers + etf_tickers
|
|
|
|
|
|
|
|
|
|
#%%
|
2021-11-17 12:07:49 +01:00
|
|
|
for ticker in etf_tickers:
|
2021-11-09 15:21:22 +01:00
|
|
|
print("Fetching ", ticker)
|
2021-11-17 12:07:49 +01:00
|
|
|
df = get_stock_price_av(ticker, "2017-11-10")
|
2021-11-09 16:12:48 +01:00
|
|
|
|
2021-11-09 15:21:22 +01:00
|
|
|
df.to_csv(f"data/{ticker}.csv", index=True)
|
|
|
|
|
|
2021-11-17 12:07:49 +01:00
|
|
|
crypto_ticker_pairs = list(combinations(crypto_tickers, 2))
|
|
|
|
|
for src_ticker, trg_ticker in crypto_ticker_pairs:
|
|
|
|
|
print("Fetching ", src_ticker, trg_ticker)
|
|
|
|
|
df = get_crypto_price_crypto_compare(src_ticker, trg_ticker, 1500)
|
|
|
|
|
|
|
|
|
|
df.to_csv(f"data/{src_ticker}_{trg_ticker}.csv", index=True)
|
|
|
|
|
|
2021-11-09 15:21:22 +01:00
|
|
|
|
|
|
|
|
# %%
|