Title: | Assorted Functions and Observations by P0bs |
---|---|
Description: | Provides assorted functions by p0bs. |
Authors: | Robin Penfold [aut, cre] |
Maintainer: | Robin Penfold <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.3.3 |
Built: | 2024-10-18 05:16:20 UTC |
Source: | https://github.com/p0bs/p0bservations |
This function applies the prevailing tax bands and rates to give a simple calculation for UK Income Tax and National Insurance (to the nearest couple of pounds). Please note that these are approximations, so do not rely on them for financial returns or planning. The output is a list, containing the following measures: 'income_net' for the net income (after Income Tax and National Insurance); 'income_tax' for the Income Tax liability; 'ni' for the National Insurance liability; and 'total_tax' for the combined Income Tax and National Insurance liability.
liability_tax(income_taxable, tax_year_end)
liability_tax(income_taxable, tax_year_end)
income_taxable |
The taxable income level (i.e. after deductions for things like pension contributions). |
tax_year_end |
The calendar year in which the tax year ends, as a YYYY integer. For example, tax year 2023/24 would be 2024. |
liability_tax( income_taxable = 38000, tax_year_end = 2024 )$total_tax
liability_tax( income_taxable = 38000, tax_year_end = 2024 )$total_tax
This function uses the Milevsky-Robinson to analyse the probability of retirement ruin, by parsimoniously meshing investment risk and return, mortality estimates and spending rates without resorting to opaque Monte Carlo simulations. For further details, see: Milevsky, M. and C. Robinson; "A Sustainable Spending Rate without Simulation"; Financial Analysts Journal, Volume 61, Number 6. (2005). Please note that these are approximations, so do not rely on them for financial returns or planning.
probability_ruin( return_expected, return_sd, life_remaining_expected, rate_spend )
probability_ruin( return_expected, return_sd, life_remaining_expected, rate_spend )
return_expected |
The expected real return of the entire pension portfolio |
return_sd |
The projected standard deviation of the returns of the entire pension portfolio |
life_remaining_expected |
The median projected remaining lifespan of the individual in question |
rate_spend |
The annual spending rate applied by the individual to their pension portfolio |
probability_ruin( return_expected = 0.07, return_sd = 0.2, life_remaining_expected = 28.1, rate_spend = 0.05 )
probability_ruin( return_expected = 0.07, return_sd = 0.2, life_remaining_expected = 28.1, rate_spend = 0.05 )
This function uses the Milevsky-Robinson to analyse the spend rate for a given probability of retirement ruin, by parsimoniously meshing investment risk and return, mortality estimates and spending rates without resorting to opaque Monte Carlo simulations. For further details, see: Milevsky, M. and C. Robinson; "A Sustainable Spending Rate without Simulation"; Financial Analysts Journal, Volume 61, Number 6. (2005). Please note that these are approximations, so do not rely on them for financial returns or planning.
probability_ruin_rate( return_expected, return_sd, life_remaining_expected, value_probability_ruin )
probability_ruin_rate( return_expected, return_sd, life_remaining_expected, value_probability_ruin )
return_expected |
The expected real return of the entire pension portfolio |
return_sd |
The projected standard deviation of the returns of the entire pension portfolio |
life_remaining_expected |
The median projected remaining lifespan of the individual in question |
value_probability_ruin |
The desired probability of retirement ruin (which is used to solve for the corresponding spend rate) |
probability_ruin_rate( return_expected = 0.07, return_sd = 0.2, life_remaining_expected = 28.1, value_probability_ruin = 0.1 )
probability_ruin_rate( return_expected = 0.07, return_sd = 0.2, life_remaining_expected = 28.1, value_probability_ruin = 0.1 )
This function retrieves data on UK annuity rates from Sharing Pensions. Rates are available for different specifications and ages. See the website for further details. Please note that these are approximations, so do not rely on them for financial returns or planning.
rate_annuity(value_age, value_specifications)
rate_annuity(value_age, value_specifications)
value_age |
These are the choices for the age of the annuitant, namely: '55', '60', '65', '70' or '75'. The ensuing annuity rates imply that the annuity begins to be paid immediately and thereafter on a monthly basis. |
value_specifications |
These are the specifications available, varying by: whether the annuity is on a single basis or a joint basis (and, if so, whether the last remaining spouse receives half or all of the annuity); whether the annuity is guaranteed for ten years or not; and whether the payments will escalate at 3
|
<https://www.sharingpensions.co.uk/annuity_rates.htm>
## Not run: rate_annuity(value_age, value_specifications) ## End(Not run)
## Not run: rate_annuity(value_age, value_specifications) ## End(Not run)
Error function to stop the function if the value entered is (or is below) zero
stop_not_positive(value_entered)
stop_not_positive(value_entered)
value_entered |
The value to be error-checked by the function |
## Not run: stop_not_positive(value_entered = age) ## End(Not run)
## Not run: stop_not_positive(value_entered = age) ## End(Not run)
Error function to stop the function if zero or more than one value is entered
stop_not_scalar_double(value_entered)
stop_not_scalar_double(value_entered)
value_entered |
The value to be error-checked by the function |
## Not run: stop_not_scalar(value_entered = age) ## End(Not run)
## Not run: stop_not_scalar(value_entered = age) ## End(Not run)
A dataset containing the main tax parameters used for calculating net income for the UK (outside of Scotland).
tax_parameters
tax_parameters
A data frame with 3 rows (one for each tax year) and 14 variables:
the calendar year in which the end of the tax year occurs
the lower level breakpoint for National Insurance
the upper level breakpoint for National Insurance
the lower level breakpoint for personal allowance
the upper level breakpoint for personal allowance
the income breakpoint for higher rate income tax
the income breakpoint for upper rate income tax
the lower level tax rate for National Insurance
the upper level tax rate for National Insurance
the rate at which personal allowance drops after 'level_allowance_upper'
the basic rate of income tax
the higher rate of income tax
the upper rate of income tax
the rate of sales tax, also called VAT
https://www.crunch.co.uk/knowledge-tax/tax-rates-thresholds-and-allowances-for-current-tax-year/