5 Analyzing time series data with arrays

This chapter covers

  • Analyzing stock prices with Fortran arrays
  • Declaring, allocating, and initializing arrays
  • Using whole-array arithmetic to quantify stock performance and risk

An array is a sequence of data elements that are of the same type and contiguous in memory. While this may seem restrictive, it comes with its advantages. First, it allows you to write simpler code using expressive one-liners that work on many elements at once. Whereas arrays have been part of Fortran since its birth, whole-array operators and arithmetic were introduced in Fortran 90, allowing programmers to write cleaner, shorter, and less error-prone code. In a nutshell, arrays allow you to easily work on large datasets and ...

Get Modern Fortran now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.