Awe snap, of course. Thanks for the links.
Changed to show a lot of decimals and as strings.
2017-02-27 12:59 info:52 INFO TSLA 245.92000000000001591616 != 245.91999999999998749445
2017-02-28 12:59 info:52 INFO TSLA 249.98000000000001818989 != 249.97999999999998976818
2017-03-15 12:59 info:52 INFO TSLA 255.95000000000001705303 != 255.94999999999998863132
2017-04-07 12:59 info:52 INFO TSLA 302.53700000000003456080 != 302.53699999999997771738
2017-04-18 12:59 info:52 INFO TSLA 300.78000000000002955858 != 300.77999999999997271516
Just the first line values:
245.92000000000001591616
245.91999999999998749445
log.info('{} {} != {}'.format(
s.symbol,
'%.20f' % data.current(s, 'price'),
'%.20f' % data.history(s, 'price', 1, '1m')[-1]
))
Instead of isclose() I went with this:
dcp = float('%.3f' % dcp)
Posted conclusions, code about prices at https://www.quantopian.com/posts/clarifying-prices-by-various-methods