Hypno Kitty's avatar
Hypno Kitty
hypnokitty@nostrplebs.com
npub1n8t5...qq0w
Toxic bitcoiner. Also a gay, atheist, gun-owning, psychedelic-using freedom maxi. Deal with it.
Hypno Kitty's avatar
hypnokitty 5 months ago
Just vibe-coded the real-time BTC/gold ratio in python, in case anyone else is interested: # Bitcoin-to-Gold price ratio (BTC-USD / GC=F) from 2022-01-01 to today. # Requires: pandas, yfinance, matplotlib import datetime as dt import pandas as pd import yfinance as yf import matplotlib.pyplot as plt start = dt.datetime(2022, 1, 1) end = dt.datetime.now() tickers = {"Bitcoin": "BTC-USD", "Gold": "GC=F"} # GC=F = COMEX gold futures raw = yf.download( list(tickers.values()), start=start, end=end, interval="1d", progress=False, auto_adjust=False, )["Close"].rename(columns={v: k for k, v in tickers.items()}) # forward-fill gold so weekends & holidays have a price prices = raw.ffill() ratio = prices["Bitcoin"] / prices["Gold"] ax = ratio.plot(figsize=(10, 6), title="BTC / Gold Price Ratio") ax.set_xlabel("Date") ax.set_ylabel("BTC price ÷ Gold price") plt.tight_layout() plt.show()
Hypno Kitty's avatar
hypnokitty 5 months ago
Anyone know of a good website or iOS app that shows the price of BTC in other assets like gold, real-estate, and stocks?