DATA contains date and closing stock for the day. Closing stock for the month is equal to the value of closing stock at the end of the month . (eg: closing stock APR = closing stock on 30th APR).
case 1. Least closing stock value in the last 6 months has to be subtracted from the stock value of current month's stock for everyday.
case2. If Least closing stock value in the last 6 months is less than the closing stock of any day of the current month then find the least value of closing stock from the current month and subtract it from each day's stock.
Note : Data provided is static (since it's for practice) . Dynamic logic should be developed.