Phase 4: the VRP series — HAR walk-forward, ex-ante vs ex-post, lookahead guard - #6
Merged
Merged
Conversation
Corsi (2009) HAR in logs with direct 30-day-horizon regression and lognormal retransformation; ABD (2007) continuous/jump split via the BNS test; expanding-window walk-forward where training sets contain only rows whose forward window has closed, checked by a lookahead guard that is itself under test. Panel gains first/last log-mids so 30-day windows include weekend/holiday gap returns (conventions rule 5). Stylized-facts module uses Newey-West inference because the 30-day windows overlap. Purity acceptance test: the forecast at t is bit-identical when all data after t is deleted.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was built
Acceptance tests (brief section 5, Phase 4)
118 tests, coverage 93.3%, mypy --strict clean.
First real output (auto-extends with the backfill)
With EVZ joined to the currently-ingested ticks, the only fully-covered forward windows are early March 2020 - and the ex-post VRP there is negative (mean -0.0145 annualised variance, positive on 1 of 10 days): implied variance going into the COVID month priced far less than materialised. The canonical crash-month loss, produced by the pipeline unprompted. Ex-ante forecasts appear once ~300 training days of closed windows exist (the backfill is working through 2007 now).