This outlines & links to important information related to how Mansion calculates values used in assumptions. We've included the Python and JS code for those interested.
An Explanation of the Math and Methods
Newton's Method (used in Mansion Calculator):
The `newton` function implements Newton's method, which is an iterative numerical technique used to find approximations to the roots (or zeros) of a real-valued function.
- `f`: The function for which we want to find the root.
- `df`: The derivative of the function `f`.
- `x0`: Initial guess.
- `tol`: Tolerance level for the approximation (default is 1e-7).
- `maxIter`: Maximum number of iterations (default is 1000).
- The function `f` is differentiable and has a continuous derivative.
- There exists a root close to the initial guess `x0`.
Average Annual Rate of Return (ARR):
The `arr` (or 'irr') function calculates the Average Annual Rate of Return for a series of cash flows. ARR is the discount rate that makes the Net Present Value (NPV) of a series of cash flows equal to zero. This is not the GIPS standards thus we don't represent the output as IRR when displayed.
- `cashFlows`: An array of cash flows.
- Cash flows occur at regular intervals, annually in our calculator.
- The ARR exists and is unique.
Cash Flows Calculation:
The `calculateCashFlows` function calculates various cash flows and values associated with an investment.
- Various parameters related to the investment, such as initial offering value, appreciation rates, cash flow percentages, etc.
- Cash flows and home values grow at constant rates.
- Ownership percentage remains constant throughout the holding period.
Calculation of `totalReturnedValue`:
`totalReturnedValue` is the total amount returned at the end of the investment period. It's calculated as the sum of the last year's cash flow (which includes the net proceeds from the sale of the home) and the dividends received in that year.
Calculation of `arrResult`:
`arrResult` is the Average Annual Rate of Return for the series of cash flows. It represents the annualized rate of return for the investment, taking into account the timing and amount of each cash flow on an annual basis.
1. **Newton's Method**: An iterative method used to find the root of a function. Assumes the function is differentiable and has a continuous derivative.
2. **ARR**: Represents the discount rate that makes the NPV of cash flows zero. Assumes cash flows occur at regular intervals and that the ARR is unique. This is code specific only and IS NOT INTENDED TO REFLECT GIPS OR OTHER STANDARDS FOR IRR.
3. **Cash Flows Calculation**: Calculates the cash flows and values associated with an investment based on various parameters. Assumes constant growth rates and constant ownership percentage.
4. **totalReturnedValue**: Represents the total amount returned at the end of the investment period, including the net proceeds from the sale of the home after disposition expenses assumed at the rate shown.
5. **arrResult**: The annualized rate of return for the investment, considering the timing and amount of each cash flow.
This code provides a comprehensive analysis of an investment, considering various factors like appreciation, cash flows, and ownership percentage. The calculations are based on standard financial principles and make certain assumptions for simplicity and ease of computation.
Smart homes with amazing Charlotte locations, modern workstations, restful beds, hotel-grade cleaning, and 24/7 concierge service. It’s a luxury hotel experience, but better.