unison-calculators
This is a set of calculation classes used for building front-end deal calculators. This is the math component.
NPM module here
Explanation of basic deal math (to be continued.)
Sharing percentage - How much Unison shares in a home's appreciation
Investment percentage - How much Unison invested in a deal, expressed as a percentage of the asset value
Leverage - For every percent Unison has invested in an asset, how many percentage points do they share in the asset's appreciation. Leverage can vary based on an asset's risk profile.
Example Formulas:
S = Sharing percentage
s = Sharing amount
I = Investment percentage
i = Investment amount
L = Leverage
A = Appreciation
// Sharing percentage (S) equals the investment percentage (I) times the leverage (L)
S = I * L
// ex. .35 = .1 * 3.5
// Sharing amount(s) equals sharing percentage(S) times apprciation (A)
s = S * A
// ex. 35,000 = .35 * 100,000
Utility Calculator
UtilCalculator
The util calculator can be used to do basic math for Unison deals.
For instance, I could run:
let calculator = new UtilCalculator('HomeOwner')
calculator.minSharingPercentage(3.5)
calculator.minInvestmentAmount(500000)
calculator.maxInvestmentAmount(500000)
calculator.sharingPercentage(.2, 3.5)
calculator.investmentPercentage(500000,100000)
calculator.unisonShare(100000,.35)
calculator.leverage()
calculator.leverage({qualifiesForNewPricing: true})
let calculator = new UtilCalculator('HomeBuyer')
calculator.minSharingPercentage(3.5)
calculator.minInvestmentAmount(500000)
calculator.maxInvestmentAmount(500000)
calculator.sharingPercentage(.2, 3.5)
calculator.investmentPercentage(500000,100000)
calculator.unisonShare(100000,.35)
calculator.leverage()
calculator.leverage({isNewConstruction: true})
API documentation:
new UtilCalculator('HomeOwner')
calculator.minSharingPercentage(3.5)
calculator.minInvestmentAmount(500000)
calculator.maxInvestmentAmount(500000)
calculator.sharingPercentage(.2, 3.5)
calculator.investmentPercentage(500000, 100000)
calculator.unisonShare(100000, .35)
calculator.leverage({qualifiesForNewPricing: true})
Scenario Calculators
HomeBuyerScenarioCalculator
The HomeBuyer scenario calculator can be used to calculate the outcome of a homebuyer deal.
To get started initialize a HomeBuyerCalculator instance and run the #calculate function.
#calculate takes four arguments 1) initialHomeValue, 2) unisonInvestment, 3) finalPriceChange, 4) and optional configuration object
For instance, I could run:
let calculator = new HomeBuyerScenarioCalculator()
calculator.calculate(500000,50000,100000,{
isNewConstruction: false
})
And expect
{
finalPriceChange: 100000,
initialHomeValue: 500000,
unisonInvestment: 50000,
unisonLeverage: 4,
unisonSharingPercentage: 0.4,
unisonInvestmentPercentage: 0.1,
futureSalePrice: 600000,
unisonPayment: 90000,
unisonShareInChange: 40000
}
API documentation:
new HomeBuyerScenarioCalculator()
calculator.calculate(500000, 50000, 100000, {
isNewConstruction: false
})
HomeOwnerScenarioCalculator
The HomeOwner scenario calculator can be used to calculate the outcome of a homebuyer deal.
To get started initialize a HomeBuyerCalculator instance and run the #calculate function.
#calculate takes four arguments 1) initialHomeValue, 2) unisonInvestment, 3) finalPriceChange, 4) and optional configuration object
For instance, I could run:
let calculator = new HomeOwnerScenarioCalculator()
calculator.calculate(500000, 50000, 100000, {
qualifiesForNewPricing: false
})
And expect
{
finalPriceChange: 100000,
initialHomeValue: 500000,
unisonInvestment: 50000,
unisonLeverage: 4,
unisonSharingPercentage: 0.4,
unisonInvestmentPercentage: 0.1,
futureSalePrice: 600000,
unisonPayment: 90000,
unisonShareInChange: 40000
}
API documentation:
new HomeOwnerScenarioCalculator()
calculator.calculate(500000, 50000, 100000, {
qualifiesForNewPricing: false
})
Mortgage Calculators
HomeBuyerMortgageCalculator
The homebuyer mortgage calculator can be used to calculate mortgage payments with and without Unison.
To get started, initialize a new calculator with (optionally) an object containing any assumptions you want to overwrite.
You can then use the #calculate function to see payment outcomes for various combinations.
#calculate takes three arguments 1) homePrice, 2) clientDownPaymentPercentage, and 3) unisonDownPaymentPercentage
For instance, I could run:
var calculator = new HomeBuyerMortgageCalculator({assumptions: {mortgageYears: 30}})
calculator.calculate(500000,.1,.1)
And expect:
{
assumptions: {
mortgageYears: 30,
annualMortgageInsurancePremium: 0.0074,
annualMortgageInterestRate: 0.04,
annualPropertyInsuranceRate: 0.003,
annualPropertyTaxRate: 0.0125,
},
monthlyMortgagePayment: -1910,
monthlyPMIPayment: 0,
monthlyPropertyTaxPayment: -521,
monthlyPropertyInsurancePayment: -125,
totalMonthlyPayments: -2556,
clientDownPaymentAmount: 50000,
unisonDownPaymentAmount: 50000,
downPaymentAmount: 100000,
hasPMI: false,
}
Here are the default assumptions for any new calculator:
const DEFAULT_ASSUMPTIONS = {
mortgageYears: 30,
annualMortgageInterestRate: .04,
annualPropertyTaxRate: .0125,
annualPropertyInsuranceRate: .003,
annualMortgageInsurancePremium: .0074,
}
API documentation:
new HomeBuyerMortgageCalculator(options)
calculator.calculate(500000,.1,.1)