Fortran

Guide To Learn

Reading stock data from files

Now that we have the list of stock symbols that we’ll work on, let’s use this information to load the data from file and store it in our newly declared dynamic arrays. The prototype of our main loop should look like the following listing. Listing 5.6 Reading stock data from a file using a read_stock subroutine ❶ For […]

Finding the best and worst performing stocks

Before we do any data analysis, we need to take care of the logistics. These steps will generally apply to each of the three challenges in this exercise: To start, we can estimate the performance of different stocks by calculating their gain over the whole period of the time series data–from January 2000 to May […]

Getting the data and code

The full code for the stock analysis exercise is available as a GitHub repo at https:// github.com/modern-fortran/stock-prices. If you use git, you can clone it directly from the command line: Otherwise, you can download it as a zip file from http://mng.bz/OMZo. The repository already includes the stock price data needed for this exercise in the data directory. However, if […]

Analyzing stock prices with Fortran arrays

We’ll learn how Fortran arrays work in a real-world application–analyzing stock price time series. This has been an increasingly popular topic since the early days of computer programming, and Fortran has been used in the bowels of many trading and banking systems, mainly thanks to its robustness, reliability, and efficiency. In this chapter, we’ll work […]

Scroll to top