simplybusiness / haskell-club

Learning a Haskell for great glory (public repo)
MIT License
1 stars 0 forks source link

Add support for "marginal rates" #1

Open daniel-barlow opened 7 years ago

daniel-barlow commented 7 years ago

With any model that has {pro,re}gressive rates it is important to know that the premium is a continuous function of the number of units. Otherwise there are weird discontinuities in the premium payable as a business size increases. One approach which guarantees this, is to use "marginal" rates: if there is an inflection at, say, £40000 turnover, then charge x% on the first £40k and y% on (remaining turnover - 40000). HMRC do this for income tax.

For example, if you have a rate of 2% for the first £30000 and 1% for higher values, then a premium for £52000 is

30000 0.02 + (52000-30000) 0.01