LAB OF SOFTWARE APPLICATION FOR FINANCE
Instructional goals
The aim of the course is to provide basic elements for programming
for solving some classic problems for courses in Mathematics,
Econometrics and Finance. At the end of the course, the student will be able to:
obtain the solution of ordinary differential equations; to draw
and three-dimensional graphs and restrictions of three-dimensional graphs.
three-dimensional graphs; to analyse and set up the pseudocoding of a financial problem involving the use of mathematical and econometric processes and to write the relevant codes.
Intended learning outcomes
The student will have acquired basic knowledge of programming techniques in Matlab and Python. He/she will be able to write codes concerning financial problems, solving mathematical and econometric problems in an appropriate way. He/she will acquire knowledge of financial models and will know how to write codes, modify and edit existing codes to adapt them to new needs.
This knowledge will be assessed by means of classroom exercises and homework, which can be discussed with the teacher.
Ability to apply knowledge and understanding
The student will be able to know the syntaxes and structures necessary for programming; he/she will also be able to provide a pseudocoding of a series of financial, econometric and mathematical cases that are frequently repeated in algorithms used in financial desks.
The assessment of the achievement of these objectives will take place through the evaluation of classroom and home exercises and through the evaluation of in itinere and final tests.
Autonomy of judgement: the student will have developed such knowledge as to be able to assess the correctness and appropriateness of the codes developed, to be able to identify errors and to be able to resolve them.
Learning ability: the student will be able to manage roles involving applied tasks by putting into practice the syntax, structures and coding techniques developed during the lessons and during the exercises carried out individually in the classroom and at home.
Course Contents
Basic principles of computer programming: execute an instruction, iterations, conditional choices. Input and output, pseudocode.
MATLAB: interface, operations on numbers, vectors, and matrices, solution of ordinary differential equations and systems, solution of unconstrained and constrained optimization problems.
Python: editor, packages, base and advanced instructions.
Reference Books
[*] C. Pocci , G. Rotundo, R. De Kok (2016) Matlab economic and financial applications, I ed., Apogeo Education, 8891623027 / 9788891623027
[**] “Python for applications in economics and finance”. Lecture notes.
[***] Slides of the lessons.
Teaching Methods
Frontal instruction; hands on computer exercises
Assessment Method
Tests; the student has to show to be able to write down the MATLAB and Python instructions that solve a specific assignment and to answer to questions on the program; eventually posed as multiple choice tests.
Thesis assignment criteria
N/A
Does the syllabus cover sustainability topics?
Sustainability issues are covered in several lectures in the second part of the course (from lecture 6 to lecture 11). That part is devoted to writing matlab and/or Python codes for the economic-financial models covered in this and other courses. In particular, portfolio issues (frontier estimation), issues of a' la Sharpe style regressions, and issues related to multivariate and smart beta estimation models involve the addition of ESG factors that the student must include in the model. The aim is to estimate the impact and/or the significance (in all models) and the ranking (in penalized regression models) of sustainability factors.
Week 1 Contenuto sessioni on line e on campus
Introduction to the course and to the examination methods. Basic principles of computer programming: execute an instruction, iterations, conditional choices. Input and output, pseudocode.
Introduction to Matlab: interface, numbers, vectors, matrices. Elementary operations with vectors and matrices. Script files. Solving linear systems through matrix multiplication.
[*] Ch 1
[***] Lesson slides
Week 2 Contenuto sessioni on line e on campus
Graphical representations. Basic drawing instruction (plot, surf, bar). Histograms. M-files (function) and their usage.
[*] Ch. 2 and sections 3.1, 2.3, 2.7
[***] Lesson slides
Week 3 Contenuto sessioni on line e on campus
Introduction to Python: interface, basic packages, numbers, vectors, matrices, arrays, lists. Elementary operations with vectors and matrices.
[*] Ch. 2.
[***] Lesson slides
Week 4 Contenuto sessioni on line e on campus
Sources of Financial Data.
Pandas Dataframes, I/o operations, TimeSeries Analysis, Correlations
[**] Python Teaching Notes
[***] Lesson slides
Week 5 Contenuto sessioni on line e on campus
Iterative methods for solving equations and systems of equations. Insights on the Newton method.
[*] Ch. 5
[***] Lesson slides
Week 6 Contenuto sessioni on line e on campus
Midterm test.
Week 7 Contenuto sessioni on line e on campus
Eigenvalues, eigenvectors and their applications: a) PageRank b) PCA.
[*] cap 1,
[***] Lesson slides
Week 8 Contenuto sessioni on line e on campus
Instruction for solving an ODE. The Cauchy problem. [*] chapter 3: 3.1-3.3
Instruction for solving a system of differential equation and representation of the trajectories in the phase space.
Malthus and Verhulst model for epidemiological data.
[*] chapter 4
[***] Lesson slides
Week 9 Contenuto sessioni on line e on campus
Econometric applications for finance.
a)Matlab applications
b)Python applications
[***] Lesson slides
Week 10 Contenuto sessioni on line e on campus
Markowitz model and the efficient frontier
Introduction to constrained optimization. Heuristic Approaches to the estimation error problem.
Matlab: instructions portopt, fmincon, portfolio. Python codes
[*] cap. 6: 6.1-6.4.
[**] Python Teaching Notes [***] Lesson slides
Week 11 Contenuto sessioni on line e on campus
Portfolio models: Risk parity portfolios, risk parity line.
[***] Lesson slides