Sep-26-2022, 03:24 PM
Verify it yourself.
pct_change = percent_change(portfolio, "2013-01-01", "2013-01-10") print(pct_change) # Or just print a slice pct_change[:10] weighted_change = pct_change * portfolio.values() print(weighted_change)I don't trust anyone to do anything correctly. I test and verify. You should do the same with your code.