37262 - Computer Programming

Academic Year 2025/2026

  • Docente: Mauro Gaspari
  • Credits: 6
  • SSD: INF/01
  • Language: English
  • Teaching Mode: Traditional lectures
  • Campus: Bologna
  • Corso: Second cycle degree programme (LM) in Quantitative Finance (cod. 8854)

Learning outcomes

At the end of the course, the student has a basic understanding of computational tools and terminology, including object oriented programming techniques. He is able to: - use programming languages to write small scale programs; - understand programs written by others; - map financial problems, such as pricing systems and risk measurement models, into computational solutions.

Course contents

Computer programming is a creative task that is learned through practice. It involves finding solutions to problems using programming languages.

The course will introduce basic informatics concepts and terminology such as operating systems, networks, information systems, computer languages, interpreters, and compilers.

Next, using the Python programming language, we will present programming techniques through an interactive, step-by-step approach. This will include introducing concepts and constructs of programming languages, such as variables, expressions, and statements; functions, conditionals, and recursion; iteration; data types; tables; CSV files; spreadsheet creation; and web scraping. Additionally, we will cover object-oriented programming, case studies, and methods for accessing financial data.

Readings/Bibliography

Reference book:

How to Think Like a Computer Scientist: Learning with Python, by Allen Downey, Jeff Elkner and Chris Meyers. Gree Tea Press (link: https://media.readthedocs.org/pdf/howtothink/latest/howtothink.pdf)

Other books:

Finantial Modelling in Python, by S. Fletcher and C. Gardner. Wiley Finance 2009.

Starting Out with Python, Global Edition di Tony Gaddis, Pearson Education Limited (Fifth Ediion) 2021.

Teaching methods

lectures and class exercises.

As concerns the teaching methods of this course unit, all students must attend Module 1, 2 [https://www.unibo.it/en/services-and-opportunities/health-and-assistance/health-and-safety/online-course-on-health-and-safety-in-study-and-internship-areas] on Health and Safety online.

Assessment methods

Written test: consisting of 1 to 3 programming exercises comprising a total of 3 to 5 Python functions that must be written in Python using paper and pen. The test will evaluate the student's programming abilities and will last approximately 90 minutes, with slight variations depending on the difficulty of the exercises.

The exam is graded on a scale of 30 points. Marks will be awarded according to the following criteria based on the number of correctly implemented functions: At least one correct function implemented: 18–19. More than one correct function, but with several incorrect or missing functions: 20–24. One missing function, or all functions implemented but some with errors: 25–29. All functions correct: 30–30L. 

Students with learning disabilities or temporary or permanent disabilities: please contact the relevant University office promptly ( https://site.unibo.it/studenti-con-disabilita-e-dsa/it ). The office will advise students of possible adjustments, that will be submitted to the professor for approval 15 days in advance. He/she will evaluate their suitability also in relation to the academic objectives of the course.

Teaching tools

whiteboard + video projector + laptop

Office hours

See the website of Mauro Gaspari

SDGs

Quality education Decent work and economic growth Industry, innovation and infrastructure

This teaching activity contributes to the achievement of the Sustainable Development Goals of the UN 2030 Agenda.