niceguy37
Member of DD Central
Posts: 504
Likes: 254
|
Post by niceguy37 on Sept 9, 2015 14:15:30 GMT
After this release has bedded in chris, you might add some code so that if a lender performs a transfer of funds, purchase or sale, and there is going to be a fraction of a penny left behind, then the system sweeps that fraction up with the transaction. For example, if you've £100.00001, and place a request to transfer £100 the the system should see that there's a fraction of a penny £0.00001 going to be left behind, and so should transfer £100.00001, leaving a much cleaner position.
|
|
SteveT
Member of DD Central
Posts: 6,875
Likes: 7,924
|
Post by SteveT on Sept 9, 2015 17:11:23 GMT
This 100% accurate rounding is going to take some getting used to....
"Purchase loan part 13179099 (old id 11277603) for 0.9999999999999999999999999999999999928016 GBP - annualised rate 10, loan: Burnley Wind Turbine (83)"
|
|
sqh
Member of DD Central
Before P2P, savers put a guinea in a piggy bank, now they smash the banks to become guinea pigs.
Posts: 1,428
Likes: 1,212
|
Post by sqh on Sept 9, 2015 17:26:25 GMT
This 100% accurate rounding is going to take some getting used to.... "Purchase loan part 13179099 (old id 11277603) for 0.9999999999999999999999999999999999928016 GBP - annualised rate 10, loan: Burnley Wind Turbine (83)" Wow, it must be a powerful computer system to calculate to the nearest yocho deci-quadrillionth. Watch out the FBI think it's in Burnley !
|
|
skippyonspeed
Some people think I'm a little bit crazy, but I know my mind's not hazy
Posts: 787
Likes: 424
|
Post by skippyonspeed on Sept 9, 2015 18:22:31 GMT
Why is it necessary to buy and sell fractions of a penny, seems over complicated and ridiculous to me, especially as the loan book only displays whole pennies. Hopefully I will be able to sell all the fractions when the system goes live again
|
|
|
Post by godfrey on Sept 9, 2015 20:36:22 GMT
I'm happy with the second option. Give the roundings to Charity. My spreadsheet is already littered with rounding errors.
|
|
bigfoot12
Member of DD Central
Posts: 1,817
Likes: 816
|
Post by bigfoot12 on Sept 9, 2015 20:41:13 GMT
Why is it necessary to buy and sell fractions of a penny, seems over complicated and ridiculous to me, especially as the loan book only displays whole pennies. Hopefully I will be able to sell all the fractions when the system goes live again If you invested £10.66 (I worked this out earlier and can't remember if that is the exact figure) in one of the 6.75% BTL loans you currently earn £0.06999 per week. If you round down you earn £0.06. This is considerable reduction (in percentage terms). One day AC might have lots of available loans and we might want to diversify across many of them in which case rounding errors become significant. Even ZOPA many years ago had a procedure for rounding the interest correctly. I started off with quite a small test investment in AC. If others do the same and the interest they earn is much lower than they expect they might go elsewhere.
|
|
skippyonspeed
Some people think I'm a little bit crazy, but I know my mind's not hazy
Posts: 787
Likes: 424
|
Post by skippyonspeed on Sept 9, 2015 20:59:46 GMT
Why is it necessary to buy and sell fractions of a penny, seems over complicated and ridiculous to me, especially as the loan book only displays whole pennies. Hopefully I will be able to sell all the fractions when the system goes live again If you invested £10.66 (I worked this out earlier and can't remember if that is the exact figure) in one of the 6.75% BTL loans you currently earn £0.06999 per week. If you round down you earn £0.06. This is considerable reduction (in percentage terms). One day AC might have lots of available loans and we might want to diversify across many of them in which case rounding errors become significant. Even ZOPA many years ago had a procedure for rounding the interest correctly. I started off with quite a small test investment in AC. If others do the same and the interest they earn is much lower than they expect they might go elsewhere. Calculating the interest is a different matter completely, I was talking about buying and selling units. When interest is paid each month I'd rather the amount was to the penny and the fractions left to ride. I do not want to trade fractions of a penny.
|
|
kermie
Member of DD Central
Posts: 691
Likes: 462
|
Post by kermie on Sept 9, 2015 21:10:09 GMT
If you invested £10.66 (I worked this out earlier and can't remember if that is the exact figure) in one of the 6.75% BTL loans you currently earn £0.06999 per week. If you round down you earn £0.06. This is considerable reduction (in percentage terms). One day AC might have lots of available loans and we might want to diversify across many of them in which case rounding errors become significant. Even ZOPA many years ago had a procedure for rounding the interest correctly. I started off with quite a small test investment in AC. If others do the same and the interest they earn is much lower than they expect they might go elsewhere. Calculating the interest is a different matter completely, I was talking about buying and selling units. When interest is paid each month I'd rather the amount was to the penny and the fractions left to ride. I do not want to trade fractions of a penny. But related issues apply to amortizing loans, though: capital repayments quickly result in fractions of pennies of loans being held. So either way you end up with fractions of pennies being held. I guess buy/sell could be artificially limited to whole pennies only, but it doesn't make much odds - in fact it might prevent you selling out completely.
|
|
gt94sss2
Member of DD Central
Posts: 281
Likes: 137
|
Post by gt94sss2 on Sept 11, 2015 0:58:23 GMT
This latest release of the aftermarket allows for fractions of a penny to be bought and sold which allows lenders to use up the final little parts of their funds and we have also reenabled the merging of loan units. However this then magnifies the discrepancies once again which is going to cause it to look like lenders are gaining pennies here and there, when they aren't actually doing so. You have already chosen so as least I know what is responsible for my account buying 0.0006699210599093013440000000000000200000 of a loan Have to say, I would have preferred keeping things rounded up/down to a penny - at least dislay wise if not behind the scenes
|
|
|
Post by geoffrey on Sept 11, 2015 7:46:30 GMT
<START OF RANT>
Behind the scenes it's up to you what you do. But this level of "accuracy" is ridiculous. In fact of course 0.99999999999999451098000000 is not an "accurate" figure. It is itself a rounding error of the type you used get when you asked a calculator to add 1/3 and 2/3. The calculator should give 1 as the answer, but instead it gave 0.9999999 (they've got smarter, and some now store a few more decimal places than they display). Technically the calculator's answer is an error and even if it's smart and displays 1, somewhere in its memory banks that 1 is in fact 0.9999999999999999.
Be that as it may, the energy expenditure on calculating 0.0000000000000000000001 pounds and storing it as an entry, or value, with a corresponding ID in an SQL database is higher than the monetary value represented by several orders of magnitude. This in itself is a good argument for us mortals to realize that the accuracy of any digital system is always only an approximation of an analogue world.
Let's get real, shall we? We can only spend pennies. The ability to spend half a penny disappeared somewhere in the 1970s in the UK. So there really is no point dividing loan parts up into anything smaller than a penny, while another four decimal places would be absolutely sufficient to ensure that interest calculations on those penny holdings are right enough for us not to care about them. Personally I don't care about any fraction of a penny. I don't want to know about it. I don't want quintillionths polluting my spreadsheets and downloads! Other systems allow minimum loan holdings of £10. Some allow £1. Only obsessive-compulsives would care about anything less than a tenth of a penny.
I do, however, care about the stability of the Assetz database. If all the loan parts start "decaying" into micro, nano, pico, femto, atto, zepto or yocto loan parts, the Assetz servers will very soon turn into a white-hot mass of molten lava just trying to calculate the interest due to the quadrillion different yocto parts polluting the database.
</END OF RANT>
|
|
|
Post by Butch Cassidy on Sept 11, 2015 8:02:39 GMT
<START OF RANT>
Behind the scenes it's up to you what you do. But this level of "accuracy" is ridiculous. In fact of course 0.99999999999999451098000000 is not an "accurate" figure. It is itself a rounding error of the type you used get when you asked a calculator to add 1/3 and 2/3. The calculator should give 1 as the answer, but instead it gave 0.9999999 (they've got smarter, and some now store a few more decimal places than they display). Technically the calculator's answer is an error and even if it's smart and displays 1, somewhere in its memory banks that 1 is in fact 0.9999999999999999.
Be that as it may, the energy expenditure on calculating 0.0000000000000000000001 pounds and storing it as an entry, or value, with a corresponding ID in an SQL database is higher than the monetary value represented by several orders of magnitude. This in itself is a good argument for us mortals to realize that the accuracy of any digital system is always only an approximation of an analogue world.
Let's get real, shall we? We can only spend pennies. The ability to spend half a penny disappeared somewhere in the 1970s in the UK. So there really is no point dividing loan parts up into anything smaller than a penny, while another four decimal places would be absolutely sufficient to ensure that interest calculations on those penny holdings are right enough for us not to care about them. Personally I don't care about any fraction of a penny. I don't want to know about it. I don't want quintillionths polluting my spreadsheets and downloads! Other systems allow minimum loan holdings of £10. Some allow £1. Only obsessive-compulsives would care about anything less than a tenth of a penny.
I do, however, care about the stability of the Assetz database. If all the loan parts start "decaying" into micro, nano, pico, femto, atto, zepto or yocto loan parts, the Assetz servers will very soon turn into a white-hot mass of molten lava just trying to calculate the interest due to the quadrillion different yocto parts polluting the database.
</END OF RANT>
Alternatively phrased as KISS
|
|
|
Post by chris on Sept 11, 2015 9:53:06 GMT
<START OF RANT>
I do, however, care about the stability of the Assetz database. If all the loan parts start "decaying" into micro, nano, pico, femto, atto, zepto or yocto loan parts, the Assetz servers will very soon turn into a white-hot mass of molten lava just trying to calculate the interest due to the quadrillion different yocto parts polluting the database.
</END OF RANT> All platforms have to deal with the same issue. If you have £100 invested in a loan earning 10% per annum then how much interest are you paid each month? If the loan amortises over 36 months how much principal do you receive back if each payment is rounded down to the penny? When I coded FC we kept track of all the little extra bits and added them up after each payment so that when they added up to a whole penny they were distributed to the lender. FC have (or had at the time) a very simple loan model so it worked well enough and hit the complexity. When developing AC I followed a similar approach but we quickly out grew it as we developed deferred interest on loan unit sale, a more complex loan model, being able to dynamically change the loan model, etc. Each time anything changed it meant recalculating complicated repayment schedules keeping track of all the fractions. Also because principal repayments were rounded down, as with interest, it meant that loan holdings were always overstated. If you had £100 invested it could actually have been £99.01. Because we had a maximum loan unit size of £100 that meant those with lots of loan units or large sums invested could have had a fairly large discrepancy. Ultimately we switched to the simpler solution (code wise) of just storing the full fractional amount against each user's balances. This gave us the flexibility we needed, and allowed us to also introduce the splitting and merging of loan units to facilitate sale on the aftermarket, but exposes lenders to some of the complexities of how platforms need to work. I'm sure most platforms work either in the same was as FC (and AC at launch) or like we currently do. Some may just keep the fractions of a penny or do something else that I haven't even thought of. I believe Zopa show figures to 8dp so presumably use a similar implementation to us (I don't personally invest with them so I don't know for sure). The main reason we have an issue of sorts is simply that we switched approach half way through the life of the site and that has had a knock on effect in terms of information that used to be displayed not quite tallying with what is now displayed. In terms of server load we allow loan units to be merged together so in terms of live data each lender usually only has one loan unit. Thus negating any issues with small divisions of loans.
|
|
|
Post by chris on Sept 11, 2015 10:33:52 GMT
I fully understand the issues of rounding for display but I find it difficult to believe AC are using a storage type that can hold numbers to this level of accuracy. Is it quad float or F128? Because if it's not, at least half of the digits displayed are just garbage or noise. It's a fixed precision numeric field, not floating point or binary fraction. It's guaranteed accuracy to that precision. See the numeric data type here. For display this is sometimes converted into a float, but anywhere important we use numeric or an equivalent in other programming languages.
|
|
|
Post by bracknellboy on Sept 11, 2015 10:46:05 GMT
So that's a busman's holiday you are on then chris.
|
|
niceguy37
Member of DD Central
Posts: 504
Likes: 254
|
Post by niceguy37 on Sept 11, 2015 10:47:18 GMT
I fully understand the issues of rounding for display but I find it difficult to believe AC are using a storage type that can hold numbers to this level of accuracy. Is it quad float or F128? Because if it's not, at least half of the digits displayed are just garbage or noise. It's a fixed precision numeric field, not floating point or binary fraction. It's guaranteed accuracy to that precision. See the numeric data type here. For display this is sometimes converted into a float, but anywhere important we use numeric or an equivalent in other programming languages. Perhaps a happy medium would be to only display 6 or 8 decimal places in the log, which would make it much more readable, but still persuade those wanting to check the interest calculations that they are still getting their due. And carry on working with however many decimal places you like in the background.
|
|