Repository navigation
Conversation
Fit explicit HMRC England and Northern Ireland count and value assumptions after wealth and geography exist, with independent purchase draws and hard stock caps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep the seeded transaction draw calibrated while allowing larger property portfolios to trade more often. Document this explicit modelling assumption rather than tune seeds to a particular dataset. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Give both purchase inputs the same index as their respective stocks, including when generating tables with model versions predating #2241. Cover missing and stale indices and calibration-to-base-year materialisation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the single average price with Table 8b household price-band draws before stock-capped value fitting, retaining observed count and value targets. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cover seeded reproducibility, ownership, stock and minimum-price bounds, weighted targets, saved inputs and higher-rates SDLT. Add an aggregate-only local enhanced FRS validation command. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Defer the uprating type-only dataset import and record price-band counts, stock capacity, price adjustment, caps and positive HRAD reform exposure in aggregate validation output. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
33 of 69 tasks
This branch has not been deployed
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.
Draft for the d833 batch, landing only on Max's go.
Fixes #556. Pairs with PolicyEngine/policyengine-uk#2241, which makes additional-dwelling and non-residential purchases explicit inputs. This supplies independent annual purchases after wealth, geography and calibration-year uprating exist, before weight calibration. Each purchase is positive, at least £40,000 and no greater than its household's corresponding property stock.
This must land in the same batch as #569, which targets household SDLT at the OBR total less corporate SDLT. Without these purchases, calibration would push main-home SDLT to absorb the missing higher-rates share. #569's SDLT target test should be checked on the combined rebuilt batch; this PR leaves that test and its target logic unchanged.
create_datasets.pyis touched only to insert the purchase stage and record its metadata.Methodology choices for Max to review:
property_purchaseddraw or global NumPy state. Purchase prices uprate on exactly the corresponding stock indices, including calibration-to-base-year materialisation and table generation on older model versions.Sources: HMRC UK Stamp Tax Statistics 2024-25, corrected tables, Tables 6b/8a/8b. HMRC Table 6b's all-buyer HRAD totals are 211,700 transactions, £77.970bn value and £5.435bn gross SDLT (£5.44bn rounded); its surcharge-only receipts are £2.790bn.
Read-only validation applied the imputation to the supplied
enhanced_frs_2023_24.h5household table (source year 2023), projecting stocks and weights with the #2241 model's dataset indices and re-imputing for each year. The script reads only four household columns and prints weighted aggregates and boolean checks. This is an annual imputation check on an already-built older dataset, not a full recalibrated 2024-25 release.For source-year 2023, HRAD is 186,994 transactions / £68.805bn / £4.041bn gross SDLT; non-residential is 25,024 / £6.955bn / £90.673m, against 24,800 / £6.955bn / £230m. Every annual run was reproducible, only eligible stock owners purchased, every price met the floor/cap, counts were within 5% and values matched the targets numerically.
Gross SDLT uses the actual #2241 progressive scale at 1 January (including standard rates), rather than just the surcharge. HMRC receipts span a financial year, policy changes and replacement-home refund timing. Residential receipts are 15.4% below the proportional reference in 2024; the +2pp exposure is non-zero. Non-residential receipts are about half the household reference and are not calibrated. The capped price distribution needs review before batch release. On this older table, 67.3% of weighted HRAD purchases and 22.5% of non-residential purchases hit the stock cap in 2024; fitted band-price multipliers are 2.4275 and 3.5540 respectively. These aggregate checks establish exposure, not a final receipts fit or the result of rebuilding the current survey.
Validation and tests:
git diff --checkpassed.🤖 Generated with Claude Code