This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Writing programming interview questions hasn't made me rich yet ... so I might give up and start trading Apple stocks all day instead. | |
First, I wanna know how much money I could have made yesterday if I'd been trading Apple stocks all day. | |
So I grabbed Apple's stock prices from yesterday and put them in a list called stock_prices, where: | |
The indices are the time (in minutes) past trade opening time, which was 9:30am local time. | |
The values are the price (in US dollars) of one share of Apple stock at that time. | |
So if the stock cost $500 at 10:30am, that means stock_prices[60] = 500. |