curve factory: depends on root type (realtime or historical)