separated fundamentals db from technical analysis; removed nan to zero casting problem; improved min/max