I have a range of daily dates and closing values of a stock from 2000 to 2020. This historical data is easily downloaded from public Internet sites. My subroutine (below) fi