This short explainer goes through
- where to download your Gains and Losses sheet on one E*Trade account.
- how to quickly estimate taxes owned.
import numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
import statsmodels.api as sm | |
# Set random seed for reproducibility | |
np.random.seed(42) | |
# Generate synthetic data | |
n_obs = 100 |
# SETUP ----------------- | |
library(httr2) | |
api_base_url = "https://api-prod.etf.com/private" | |
hdrs <- list( | |
`x-limit` = 10000, | |
`User-Agent` = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.3.1 Safari/605.1.15', | |
`Origin` = 'https://www.etf.com', | |
`Referer` = 'https://www.etf.com/', | |
`Accept` = '*/*', |