My Initial Solution:
I've adopted a lean approach. Focusing on understanding the problem more before committing to a particular direction or more advanced solution. While still having something pretty neat working.
To run the code, simply execute the following command:
node command_line_version.mjs stock.txt