Laboratory Introduction to Coding and Data Management for Economics and Political Science

A.Y. 2023/2024
3
Max ECTS
20
Overall hours
SSD
INF/01
Language
English
Learning objectives
To introduce scripting programming, and the key objects of the programming language Python;
To present the main libraries Python dedicated to data management analysis and visualisation, for applications in economics and finance
Expected learning outcomes
-At the end of the module the student will be able to:
-implement scripts in Python, understanding the meaning and theeffects of the instructions in the code
-manage techniques for data manipulation, analysis and visualisationin relation to applications to economics and finance
-implement scripts in Python for data manipulation, analysis andvisualisation
Single course

This course cannot be attended as a single course. Please check our list of single courses to find the ones available for enrolment.

Course syllabus and organization

Single session

Responsible
Lesson period
Second trimester
Course syllabus
The lectures will be focused on the following topics:
1. Outline of the Python language. Comparison to several other compiled or interpreted programming languages. Showcase of the Python abilities.
2. Usage of Python in the cloud. Get a local Python environment up and running. Execution of Python commands. Running Python programs. Installing code libraries.
3. Functions: basics of functions, defining functions, applications of functions, recursive function calls.
4. Python essentials: data types, input and output, iterating, comparisons and logical operators, coding style, and documentation.
5. Object-oriented programming: classes, objects, methods, names and name resolution.
6. Python for scientific computing: introduction of the most used scientific libraries, code speed optimisation, vectorisation.
7. The NumPy library: arrays, arithmetic operations, matrix multiplications, broadcasting, mutability, and copying arrays.
8. The Matplotlib library: the MATLAB-style API, the object-oriented API, 2D and 3D plots, subplots, and style sheets.
9. The SciPy library: SciPy vs NumPy, statistics, roots and fixed points, optimisation, integration, and linear algebra.
10. The Pandas library: Pandas series, Pandas DataFrames, and on-line data sources.
Prerequisites for admission
No previous knowledge is required, however it is preferable to have knowledge of at least another interpreted programming language, for instance: R, MATLAB, Mathematica, JavaScript or PHP.
Teaching methods
Lectures are planned with the help of Jupyter notebooks and teaching materials that will be made available step by step on the teaching website on the Ariel platform.
Teaching Resources
Jupyter notebooks and teaching materials provided by the Professor will be made available step by step on the course website on the Ariel platform. In particular, the teaching material will refer to the following bibliography:
1. T. J. Sargent, J. Stachurski, "Python Programming for Economics and Finance". December 2022 edition;
2. T. J. Sargent, J. Stachurski, "Quantitative Economics with Python". December 2022 edition;
3. Y. Hilpisch, "Python for finance". O'Reilly. 2nd edition. 2018;
4. M. Lutz, "Learning Python". O'Reilly. 5th edition. 2015.
Assessment methods and Criteria
The exam consists in the delivery of a final paper, whose content is to be agreed in advance with the Professor. For instance, the paper may be focused on the analysis, manipulation and visualisation of economic, financial or social data with Python. The aim of the paper is to verify that the student has understood the programming tools introduced during the laboratory lectures and that he is able to use them in a correct, conscious and critical way.
INF/01 - INFORMATICS - University credits: 3
Lessons: 20 hours
Professor: Bodini Matteo
Professor(s)
Reception:
To be agreed by scheduling an appointment
Department DEMM - office 200 (first floor, via Livorno 1) or Microsoft Teams