Suppose by some magic, I know all stock price of several stocks (Apple, Netflix, Boeing ... for instance) from tomorrow until the end of next year.
So basically I have a list of vectors X1, X2, X3, ... with X1 is the daily closing price of Apple every day from tomorrow, X2 is the daily price of Netflix etc.
Suppose that I can sell and buy stock with no fee.
Suppose that I have now 1 million dollars.
How can I maximize my total amount of money in the last day, i.e. what stocks I should buy and shell at what day to maximize my cash in the end?
I have no knowledge in finance. I was reading some blogs about porfolio optimization such as https://towardsdatascience.com/efficient-frontier-optimize-portfolio-with-scipy-57456428323e but they mention Modern Portfolio Theory that calculate the optimized return given the risk, but in my case I don't think there is any risk because all the prices are provided beforehand?