macOS ◆ xterm-256color ◆ zsh 134 views

A stock trading simulation example. The data is first read from a CSV file containing daily ticker prices for NASDAQ stocks over 2021. Then, different trading strategies are simulated where a stock is purchased if it sees a day-to-day price increase over a certain threshold, and sold if it sees a decrease less than another threshold. Profitable combinations of “buy” and “sell” thresholds are then printed.

Codon is 70x faster than Python on the same code, and 165x faster when run on several threads.