danvn / algorithms-hw3 Goto Github PK
View Code? Open in Web Editor NEWWrite a python program that takes as input the name of a CSV file containing the historical quotes of a specific symbol (stock), utilizes the maximum subarray method (CLRS 4.1, Sep 11 lecture slides) to compute the optimal (i.e., maximum profit) buy and sale date pair based on the Open price for each day. Run your program on three different stocks and report your results (stock symbol, start date, end date, buy date, sale date, maximum profit).