This is the last chapter of part 1, which focuses on the Julia language. A motivating use case for the topics that we will cover in this chapter is working with financial asset prices. Imagine you want to analyze how the price of a certain stock or the exchange rate between two currencies evolves over time. To be able to handle these questions in Julia, you need to know how to work with time-series data. A frequent feature of real-life temporal data is that it contains missing data for some timestamps. Therefore, the second major topic of this chapter is handling missing values in Julia.
The problem we tackle in this chapter is analyzing the PLN/USD exchange rate that is published by the National Bank of Poland (NBP). The data is made available via a Web API, which is described at https://api.nbp.pl/en.html.
- Understand the format of the data that the Web API exposes.
- Fetch the data by using HTTP GET requests for a specified range of dates.
- Handle errors when the requested data is not available.
- Extract the PLN/USD exchange rate from the obtained result of the query.
- Perform simple statistical analysis of the fetched data.
- Plot the fetched data with a proper handling of missing values.