LAB OF SOFTWARE APPLICATION FOR FINANCE
Instructional goals
The course aims at providing base elements for computer programming on some of the most classic topics in Mathematics, Economics, and Finance. At the end of the course, the student is going to be able to:
Get the solution of ordinary differential equations; draw 2D plots, 3D surfaces, and the restriction of a 3D surface on a specific plane; plane; students will be able 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 problems of mathematics, statistics and financial mathematics. He/she will acquire knowledge of financial models and will be able to write codes, modify and adapt existing codes to suit 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 syntax and structures necessary for programming; he/she will also be able to provide a pseudocoding of a series of economic, econometric and mathematical problems that are frequently repeated in the operational context.
The achievement of these objectives will be assessed through the evaluation of exercises carried out in the classroom and at home, and through the evaluation of ongoing 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.
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 in finance.
Matlab and Python Applications
[***] Lesson slides
Week 10 Contenuto sessioni on line e on campus
Markowitz model and the efficient frontier
Introduction to constrained optimization. Euristics...
Matlab: instructions portopt, fmincon. Costruzione di una function per i vincoli non lineari.
Python: ..
[*] cap. 6: 6.1-6.4.
[***] Lesson slides
Week 11 Contenuto sessioni on line e on campus
Portfolio models: Equal risk contribution
[***] Lesson slides