DecCF./ˈdɛk.ɛf/

Property plans

A property plan gives each home its own asset accounts, operating payments, purchase and sale transactions, and report group. Add its component to your model and use its ordinary outputs in calculations or presentation widgets. Loans, mortgage policy, interest deductions and property tax assessments are composed separately.

Ready home choices

In the portal's model editor, modules.housing.sym.keepSellBuy('en') supplies the English choices Keep, Sell and Buy:

Omit the language or pass 'en' for English labels; pass 'sv' for Swedish labels. These immutable choices retain the same values in both languages. Use the chosen value in your purchase and sale assumptions; selecting a choice alone does not create a transaction. Supported languages are 'en' and 'sv'.

Configure a property plan

Legal ownership weights must sum to one. Explicit zero shares are retained, and omitted people receive zero. Unknown people and negative weights are errors. Payment weights are proportional and need a positive total; they do not change legal ownership. Without either allocation, the declared owner holds the home and pays its costs. Actual person-owned asset and expense accounts support owner columns, while the shared bank receives one cash movement. Changes in declared legal shares transfer carrying value between owners through balanced net-worth accounts.

Allocation weights can also use numeric calculation outputs from a declared repeat(). For example, weights:allocations.outputs.weight pairs the current calculated weight with the same stable ID in owners:people.outputs.person. Declare both repeats as model components. This works for legal ownership and payment shares and keeps the same sum, nonnegative-value and owner-key validation. It does not limit the general property API to two owners. The complete API reference provides a runnable modules.housing.propertyPlan(...) example with repeated calculated weights.

Market value uses effective annual growth compounded monthly, including the first active month. Regulatory valuation is an independent assumption; it never grows automatically with market value. The plan uses a monthly timeline.

For a purchase, set openingValue: 0 and supply purchase: {atPeriod, price, costs}. Periods are zero-based. Acquisition occurs at the beginning of the selected period and includes that month's operating costs and growth. Purchase fees are a separate expense by default. Set capitalizeCosts: true explicitly to include them in carrying value instead. An opening asset and an enabled purchase cannot be combined.

For a sale, supply sale: {atPeriod, price, costs}. Sale occurs at period end, after the full month's operating costs and growth. The sale month has zero closing asset value and active: false; its operating payment remains included. Later payments and asset values are zero. A transaction outside the calculation horizon has no trigger. Sale cannot precede purchase. Purchase and sale may occur in the same month. enabled accepts a boolean or an explicit 0/1 source, allowing transaction assumptions to remain editable when they are inactive. Each property can be acquired and disposed at most once. Timing and enabled sources can change while an event is pending; completed transactions stay completed. Changing a sale source after disposal cannot restore the property, its operating payments or regulatory value.

Use operatingCosts instead of monthlyCost for named cost lines:

Each line accepts an input, expression or calculation source. home.operatingCosts.fee exposes its current scalar amount. Transaction prices, costs, valuations and growth also accept ordinary sources. Monetary sources must use the model's currency. Sources must be available before end-of-period payments.

home.outputs contains marketValue, carryingValue, regulatoryValue, valueBeforeSale, active, operatingCost, purchaseCosts, saleCosts, realizedBookGain, the payment flows, and the published breakdown record. The breakdown includes the actual property name, value changes, named costs, transaction amounts and owner shares. Its monetary fields and named cost values are Money values in the calculation currency; the ordinary scalar outputs remain numeric for formulas. A RecordTable can use repeated homes.outputs.breakdown with rowLabelPath: "name"; a Breakdown can read the scalar outputs.

Realized book gain is sale price minus carrying value immediately before disposal. Sale fees remain separately visible. This is not Swedish taxable home-sale gain: original acquisition basis, deductible improvements, eligible selling costs, deferral and tax rules must be modeled separately. The default gain/loss categories are generic property book-result categories and do not silently add taxable capital income. An explicit supplied income account can opt into a separately designed tax composition.

home.accounts exposes unique per-home account maps: assets, equity, operating, purchaseCosts, saleCosts, gains and losses. The optional accounts override has the same map structure; supplied accounts must have the expected owner and type. Supply an independent account for each home. Default asset, equity and operating accounts use a separate property_accounts category branch, such as personal.expenses.property_accounts.housing.utilities.electricity. They retain the chosen cost code's labels and semantic hierarchy, while household budget accounts keep their standard account-plan categories. This lets several homes coexist with ordinary budget expense allocation without merging accounts. Standard leaf-category selectors do not select these property accounts; use the exact property report group or explicit accounts, or broader personal.expenses, personal.assets and personal.equity selections. With default ownership, the account-map key is owner; the shared cash owner's offset equity uses cashOwner.

The component includes a report group named property with its actual label and exact property accounts. It excludes the shared bank and independently composed loans. To combine home and loan details, add an ordinary report group listing home.reportGroups.property.accounts plus the explicit loan debt and interest accounts. Repeat-safe recipes preserve distinct accounts for multiple homes even when owners and categories match. Add the property component once; its supplied accounts are declared by that component.