Bloomberg Interview Question

Can you write an algorithm for calculating stock prices throughout a day