Make test results time-invariant#14
Conversation
|
A comment in |
a95b6ea to
4f97421
Compare
4f97421 to
e1cb8fb
Compare
5b0c53b to
b5960a0
Compare
b5960a0 to
b0d4a19
Compare
1196352 to
d6cbc95
Compare
|
I think the latest commits finally reflect an approach that will lead to consistent test results over time, along with some quality of life additions ( As a result, simulations can now be made time-invariant, so I will merge to avoid bloating the PR. There is more to investigate with consistency between dividend-adjusted and non-dividend-adjusted results given equivalent portfolios over identical time windows. I hope to modify the tests' assert statements after that's been diagnosed since a fix would produce different numbers than I'd calculate now anyway. |
Progress toward figuring out a way to reliably reverse adjustments made to historical price data (splits, dividends, etc.) so test results remain consistent over time. At the moment, results for a script I run today will be slightly different in a few months and noticeably different in a few years.
Comparisons of strategies against each other calculated at the same time are OK, but comparing a calculation from 2022 to one from today is not apples-to-apples. For example, maybe the differently-adjusted price data leads a strategy to sell an extra share of an asset during a rebalance in today's simulation where it wouldn't have done so in the past. The differences aren't large, but it would be nice to achieve full reproducibility.