pyppr.matching_ppr_cost_rate#
- pyppr.matching_ppr_cost_rate(ua_cagr, nper, ua_tr, ppr_ev, ppr_tcr, ppr_standard_withdrawal)#
- Compute the PPR annual cost rate that makes the PPR’s tax-net final value match that of an investment in its underlying assets, with a defined extra return. - Given:
- the CAGR of the PPR’s underlying assets, - ua_cagr, compounded once per period, of which there are
- npertotal,
- the tax rate, - ua_tr, the investor would pay on the capital gains in the underlying assets, had he invested in them directly,
- the tax credit rate, - ppr_tcr, the investor gets in his IRS for investing in a PPR,
- the extra after-tax value, - ppr_ev, the PPR can/should generate comparing to its underlying assets. Expressed in percentage and can be negative,
- and whether the PPR will be withdrawn in standard conditions or not, - ppr_standard_withdrawal.
 
- Return:
- The PPR annual cost rate that makes the PPR and an investment in its underlying assets generate the same tax-net final value, plus/minus the defined extra return. 
 - Parameters:
- ua_cagrscalar or array_like of shape(M, )
- Cumulative annual growth rate of the PPR’s underlying assets, in percentage Example: 0.05 
- nperscalar or array_like of shape(M, )
- Number of compounding periods 
- ua_trscalar or array_like of shape(M, )
- Tax rate the investor would pay on the capital gains in the underlying assets Example: 0.28 
- ppr_evscalar or array_like of shape(M, )
- PPR’s extra after-tax final value comparing to its underlying assets Example: -0.03 means that the final after-tax investment value generated by the PPR is 3% less than that of an investment made directly in the PPR’s underlying assets 
- ppr_tcrscalar or array_like of shape(M, )
- Tax credit rate the investor gets in his IRS for investing in a PPR Example: 0 or 0.2 
- ppr_standard_withdrawalbool
- Whether the PPR will be withdrawn in standard conditions or not. 
 
- Returns:
- outarray_like
- PPR annual cost rate. If all input is scalar, returns a scalar float. If any input is array_like, returns the annual cost rate for each input element. 
 
 - Warning - matching_ppr_cost_rateconsiders the PPR’s tax credit is reinvested into the PPR, itself not generating any tax credit.- Notes - Returns the result of \[V_0 + (PPR_n - V_0)\,(1 - tr_{PPR}) + TC_0 + (TC_n - TC_0)\,(1 - tr_{PPR}) = [ \, V_0 + (UA_n - V_0)\,(1 - tr_{UA}) \, ] \, (1 + ev_{PPR})\]- which, according to The Math Behind the Functions, in its longest form, can be decomposed to \[V_0\,(1 + tcp_{PPR})\,(1 + r)^n\,(1 - cr_{PPR})^n\,(1 - tr_{PPR}) + V_0\,(1 + tcp_{PPR})\,(tr_{PPR}) = V_0\,(1 + r)^n\,(1-tr_{ETF})\,(1 + ev_{PPR}) + V_0\,(tr_{ETF})\,(1 + ev_{PPR})\]- solved to \(cr_{PPR}\), which gives the following formula: \[cr_{PPR} = 1 - \sqrt[n]{\frac{(1+r)^n\,(1-tr_{UA})\,(1 + ev_{PPR}) + tr_{UA}\,(1 + ev_{PPR}) - tr_{PPR}\,(1 + tcp_{PPR})} {(1 + r)^n\,(1 + tcp_{PPR})(1 - tr_{PPR})}}\]- You should take care to define the PPR’s tax credit rate according to the law. We recommend you to only consider inputting 0 or the current credit rate (at the time of this writing, 0.2) in the \(ppr_{tcr}\) parameter, even if only part of the investment will generate the credit. In that case, split the investment into two parts, one with \(ppr_{tcr}\) = 0 and the other with \(ppr_{tcr} = 0.2\). - Examples - >>> import pyppr - There’s a PPR that tracks the ETF I’m interested in investing in. Should I invest in the PPR or directly in the ETF? Here’s the scenario: - I expect the ETF to grow at a CAGR of 7%. 
- I expect to hold this investment for the next 20 years. 
- When withdrawing, I expect to pay 28% on capital gains. 
- Given the limitations and hurdles of the PPR, I require it to generate an extra 8% return, to choose it over the ETF. 
- I already invest in another ETF and I max out my tax credit when investing in it. 
- This PPR charges a management commission of 0.75% per year, and no other costs. 
- I will withdraw the PPR under standard conditions. 
 - >>> match = pyppr.matching_ppr_cost_rate(0.07, 20, 0.28, 0.08, 0, True) >>> if ( match < 0.0075 ): ... print('I should invest directly in the underlying assets.') >>> else: ... print('I should invest in the PPR.') - What range would the PPR’s cost rate have to be in, for it to deliver somewhere between 6% and 9% extra value than investing in its underlying assets directly? - >>> import numpy as np >>> matches = pyppr.matching_ppr_cost_rate(0.07, 20, 0.28, np.array([0.06, 0.09]), 0, True) >>> print(matches) [0.00578394 0.00436104] >>> print(f'{matches[1]:.2%} - {matches[0]:.2%}') 0.44% - 0.58%